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

40
.github/workflows/scorecard.yaml vendored Normal file
View file

@ -0,0 +1,40 @@
name: Scorecard
# OpenSSF Scorecard: rates the repo's supply chain practices (pinned
# dependencies, token permissions, branch protection, code review, ...).
# Results go to Security > Code scanning. They aren't published to
# scorecard.dev (no badge): scorecard-action doesn't support publishing
# from a fork.
on:
push:
branches: [main]
branch_protection_rule:
schedule:
- cron: "41 4 * * 1"
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write # the results to code scanning
steps:
- name: Check out code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
publish_results: false
- name: Upload to code scanning
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
sarif_file: results.sarif