Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/CI_github_kc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -45,7 +45,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota-minimal
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-minimal-${{ github.sha }}
path: ./build_output/firmware
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -97,7 +97,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota-kettle-minimal
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-kettle-minimal-${{ github.sha }}
path: ./build_output/firmware
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -149,7 +149,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota-minimal-trampoline
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-minimal-trampoline${{ github.sha }}
path: ./build_output/firmware
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -201,7 +201,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota-kettle-min-tramp
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-kettle-minimal-trampoline-${{ github.sha }}
path: ./build_output/firmware
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -254,7 +254,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota-lite
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-lite-${{ github.sha }}
path: ./build_output/firmware
Expand Down Expand Up @@ -292,7 +292,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -306,7 +306,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota-lite-trampoline
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-lite-trampoline${{ github.sha }}
path: ./build_output/firmware
Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -359,7 +359,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-${{ github.sha }}
path: ./build_output/firmware
Expand Down Expand Up @@ -398,7 +398,7 @@ jobs:
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v5
# - name: Set up Python
# uses: actions/setup-python@v1
- name: Install dependencies
Expand All @@ -412,7 +412,7 @@ jobs:
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}"
platformio run -e tasmota-kettle
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v5
with:
name: firmware-kettle-${{ github.sha }}
path: ./build_output/firmware
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: SBOM

on:
push:
branches: [kettlecompanion, main, master]
pull_request:
branches: [kettlecompanion, main, master]
workflow_dispatch:

permissions:
contents: read

jobs:
lib-manifest-cyclonedx:
name: Vendored-lib CycloneDX
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Generate CycloneDX from lib manifests
run: |
mkdir -p sbom
python3 tools/sbom/generate_lib_cyclonedx.py \
--root . \
--out sbom/kettlecompanion-libs.cdx.json \
--name kettlecompanion-tasmota \
--version "${GITHUB_SHA}"

- name: Gate version coverage
run: python3 tools/sbom/check_min_elements.py sbom/kettlecompanion-libs.cdx.json

- name: Upload SBOM artifact
uses: actions/upload-artifact@v5
with:
name: kettlecompanion-libs-cdx
path: sbom/kettlecompanion-libs.cdx.json
if-no-files-found: error

build-attested-cyclonedx:
name: Build-attested CycloneDX (tasmota-kettle)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install PlatformIO
run: pip install -U "platformio>=6.1.19"

- name: Build firmware
env:
PLATFORMIO_BUILD_FLAGS: "-DBUILD_TYPE=devel"
run: |
set -o pipefail
mkdir -p sbom
pio run -e tasmota-kettle 2>&1 | tee sbom/pio-run-tasmota-kettle.log

- name: Generate build-attested CycloneDX
run: |
PYTHONPATH=tools/sbom python3 tools/sbom/generate_build_attested_cyclonedx.py \
--root . \
--env tasmota-kettle \
--out sbom/tasmota-kettle.build-attested.cdx.json \
--firmware build_output/firmware/tasmota-kettle.bin \
--ldf-log sbom/pio-run-tasmota-kettle.log \
--name kettlecompanion-tasmota
python3 tools/sbom/check_min_elements.py sbom/tasmota-kettle.build-attested.cdx.json

- name: Upload build-attested SBOM
uses: actions/upload-artifact@v5
with:
name: tasmota-kettle-build-attested-cdx
path: |
sbom/tasmota-kettle.build-attested.cdx.json
sbom/pio-run-tasmota-kettle.log
if-no-files-found: error

syft-filesystem:
name: Syft filesystem scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Generate Syft CycloneDX
uses: anchore/sbom-action@v0
with:
path: .
format: cyclonedx-json
artifact-name: kettlecompanion-syft.cdx.json
output-file: sbom/kettlecompanion-syft.cdx.json
upload-artifact: true
Loading
Loading