mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-11-20 15:52:12 +01:00
ci: signed release provenance, pinned dependencies, security scanning
- Release files get a SHA256SUMS file and a Sigstore-signed build provenance attestation (gh attestation verify). - The workflows read the repo only. A new release job, which runs no build tools, is the only one that can write: it uploads the files with gh and pushes the version bump. The third-party release actions are gone. - Every action is pinned to a commit SHA, esptool and the libraries to exact versions. The release tag reaches the shell through env, and set_version.sh rejects tags that aren't versions. - New workflows: CodeQL (C++ via the native build, JS, Python, Actions), OpenSSF Scorecard, zizmor. Dependabot moves the action pins. - SECURITY.md: private reporting, checking a download. README badges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8c7a2dee12
commit
5c57d1a2cd
9 changed files with 306 additions and 77 deletions
66
.github/workflows/codeql.yml
vendored
Normal file
66
.github/workflows/codeql.yml
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
name: CodeQL
|
||||
|
||||
# Static analysis for security bugs. Findings go to the repo's
|
||||
# Security > Code scanning page and onto the PR's diff.
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "17 3 * * 1"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# The C++ is what the native env builds: the protocol, the config
|
||||
# records, MQTT, the radio frames. The rest needs the ESP32 toolchain,
|
||||
# which CodeQL doesn't trace.
|
||||
- language: c-cpp
|
||||
build-mode: manual
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
- language: actions
|
||||
build-mode: none
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
queries: security-and-quality
|
||||
|
||||
- name: Set up Python
|
||||
if: matrix.language == 'c-cpp'
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Build the native tests
|
||||
if: matrix.language == 'c-cpp'
|
||||
run: |
|
||||
pip install pioarduino==6.2.0
|
||||
pio test -e native --without-testing
|
||||
|
||||
- name: Analyze
|
||||
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
category: /language:${{ matrix.language }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue