ci: CI hardening + Scorecard (#14)#61
Merged
Merged
Conversation
…y job, Scorecard (#14)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14
Hardening moves on
ci.yml/deploy.ymlpermissions: contents: readon both workflows;deploy.ymlonly elevates (pages: write,id-token: write) on thedeployjob, not thebuildjob.ci.ymlcancels superseded runs on PRs only (cancel-in-progress: ${{ github.event_name == 'pull_request' }}) — pushes tomainalways run to completion.deploy.ymlkeeps its existingpagesconcurrency group.uses:across all workflows now pins a 40-hex commit SHA with a version comment, matching the pattern already used incodeql.yml(untouched by this PR). Verified with a full-directory sweep — see below.appande2einci.ymlkeep their exact names — these are theprotect-mainruleset's required-check names.New workflows
verify-mask.yml(job idverify, workflow name "Mask integrity"): flood-fill-checks the committed mask (app/public/data/mask.bin) with the same probes aspipeline/verify_mask.py. Path-filtered topipeline/**,app/public/data/**, and the workflow file itself, on bothpull_requestandpush: main— deliberately not a required check, so a skipped run (unrelated paths) can never block a PR. Slim on purpose:verify_mask.pyonly importsnumpy+scipy.ndimage, no rebuild/geo stack. Rehearsed locally in an isolated venv (numpy 2.5.1, scipy 1.18.0) against the real committed mask — exit 0, 28/33 harbors OK, 5 known-disconnected (tracked, Mask: 5 harbors remain disconnected — Schlei fairway, Dyvig channel, Gråsten bridge (sub-cell features) #9).scorecard.yml(job idanalysis, workflow name "Scorecard"): OpenSSF Scorecard, runs on push tomain, weekly (Monday 03:30 UTC), and on branch-protection-rule changes. Uploads SARIF to code scanning. Not a required check.README
Added CI / CodeQL / Scorecard badges as the first line block, above the banner image.
Deferred
mainrun publishes results after merge — expected, not a bug in this PR.Verification
grep -rn 'uses:' .github/workflows/ | grep -v '@[0-9a-f]\{40\}'→ empty (full pin sweep clean).yaml.safe_load.verify_mask.pyrehearsed against the real committed mask in a slim venv (numpy+scipy only) — exit 0.codeql.ymluntouched (0 lines changed).Acceptance evidence (to confirm on this PR)
app+e2egreen under the new pinned actions.Mask integrityruns on this PR (the workflow file itself matches its ownpathsfilter) and passes.DeployandScorecardsucceed onmain, then work through any Scorecard findings viagh api repos/DocGerd/sail_command/code-scanning/alerts.