ci: review fixes for the release job and set_version.sh

- set_version.sh: three of its four patterns only matched digits and
  dots, so FW_VERSION and index.js stayed at v4.0.0.beta and index.html
  at ?v=3.0.14d. They now match any version, and the script fails when a
  file doesn't end up with the new one. test/scripts/test_set_version.sh
  covers it and runs with the native tests.
- Release job: each build's files are collected from its own folder,
  with 4 files each and no name in two builds, before they're signed.
  The version bump is made on the release's branch as it is now, not the
  tag, so a merge during the builds doesn't reject the push.
- Scorecard reports to code scanning only: publishing from a fork isn't
  supported, so no badge.
- New workflows renamed to .yaml like build.yaml. SECURITY.md: the routes
  open in Secured mode, and which jobs can write what.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-31 19:34:14 +01:00
parent 5c57d1a2cd
commit 787cebdb18
9 changed files with 124 additions and 18 deletions

View file

@ -10,7 +10,7 @@ The Home Assistant integration has [its own repo](https://github.com/cjkas/ESPSo
## What the device protects against
The device is meant for a local network. In the Secured mode every route and the socket need a login. The threat model, what is in scope and what isn't, is in [docs/SECURITY_PLAN.md](docs/SECURITY_PLAN.md) and [ADR 0006](docs/adr/0006-two-security-modes-eleven-http-routes.md). Don't expose the device to the internet.
The device is meant for a local network. In the Secured mode the socket and every HTTP route need a login, except the few the login page itself needs (the web UI's files, `/loginContext`, `/login`, `/upnp.xml`). The threat model, what is in scope and what isn't, is in [docs/SECURITY_PLAN.md](docs/SECURITY_PLAN.md) and [ADR 0006](docs/adr/0006-two-security-modes-eleven-http-routes.md). Don't expose the device to the internet.
## Checking a download
@ -26,10 +26,10 @@ Or compare the checksums with the release's `SHA256SUMS` file:
sha256sum --check --ignore-missing SHA256SUMS
```
Releases before 4.0.2 have neither.
Releases up to 4.0.1 have neither.
## How the build is kept clean
- Every action in the workflows is pinned to a commit, and libraries to exact versions. Dependabot proposes action updates after a week's cooldown.
- The workflows can only read the repo by default. Only the release job can write, and it runs no build tools.
- [CodeQL](.github/workflows/codeql.yml) scans the C++, the web UI, the Python scripts and the workflows on every PR. [zizmor](.github/workflows/zizmor.yml) lints the workflows, and [OpenSSF Scorecard](.github/workflows/scorecard.yml) rates the repo's practices. Findings are on the repo's Security tab.
- Every action in the workflows is pinned to a commit, the firmware's libraries and the build's Python tools to exact versions. Dependabot proposes action updates after a week's cooldown.
- The workflows can only read the repo's contents. Only the release job can change them (the release's files, the version bump), and it runs no build tools. The scanning jobs can also report to the Security tab, and the coverage job publishes to GitHub Pages.
- [CodeQL](.github/workflows/codeql.yaml) scans the C++, the web UI, the Python scripts and the workflows on every PR. [zizmor](.github/workflows/zizmor.yaml) lints the workflows, and [OpenSSF Scorecard](.github/workflows/scorecard.yaml) rates the repo's practices. Findings are on the repo's Security tab.