Repository navigation
fix(ci): use published well-known paths and verify actions.lock-backed pins - #69
Conversation
Use actual www/.well-known security metadata, require valid expiry, validate SHA resolution through generated actions.lock with negative tests, and align download-artifact use with its locked version.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6ab7347aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rel=".github/workflows/$(basename "$file")" | ||
| while IFS= read -r line; do | ||
| # Comments (including workflow examples) do not match the anchored selector. | ||
| spec="$(printf '%s\n' "$line" | sed -nE 's/^[[:space:]]*uses:[[:space:]]*([^[:space:]#]+).*$/\1/p')" |
There was a problem hiding this comment.
Parse list-item action declarations
The selector only matches lines whose first YAML token is uses:, but the normal step shorthand is - uses: .... The new positive fixture uses exactly that form, so bash tests/workflows/check-workflow-uses-lock_test.sh currently exits with FAIL: no active action uses found; consequently the workflow linter fails at its self-test on every run, while list-form actions in mixed-style workflows are also skipped by the security check. Make the YAML list dash optional in this selector.
Useful? React with 👍 / 👎.
| - name: Self-test lock integrity checker (positive and negative) | ||
| run: bash tests/workflows/check-workflow-uses-lock_test.sh | ||
|
|
||
| - name: Check SHA-Pinned or generated lockfile-pinned Actions | ||
| run: bash scripts/check-workflow-uses-lock.sh . |
There was a problem hiding this comment.
Trigger linting when checker inputs change
When a PR modifies only scripts/check-workflow-uses-lock.sh or tests/workflows/check-workflow-uses-lock_test.sh, this workflow is skipped because its pull_request.paths and push.paths sections still match only .github/workflows/**. A repository-wide search shows no other workflow invoking these new checks, so the enforcement or its tests can be changed without running either command; include both paths in the workflow triggers.
Useful? React with 👍 / 👎.
| - name: Check SHA-Pinned or generated lockfile-pinned Actions | ||
| run: bash scripts/check-workflow-uses-lock.sh . |
There was a problem hiding this comment.
Reconcile upload-artifact refs before enabling the check
After the self-test is fixed, this newly enabled command still exits with status 1 on the current tree: static-analysis-gate.yml contains four actions/upload-artifact@v7.0.2 uses, while its per-workflow entry in actions.lock lists only actions/upload-artifact@v7.0.1. The separate v7.0.2 dependency record does not satisfy the script's exact per-workflow lookup, so this lint step remains unconditionally red until the lockfile is regenerated or those workflow refs are aligned.
Useful? React with 👍 / 👎.



Corrective scope
This PR fixes known false-negative/false-positive CI checks without touching licence or SPDX attribution and without hand-editing generated
actions.lock.wellknown-enforcement.ymlnow detectswww/.well-known/security.txt(the actual tracked published path), checkswww/.well-known/{ai,humans,security}.txt, and fails closed for invalid expiry fields. Workflow and publication-path changes trigger its PR check.gh actions-lockpreamble only if the SPDX identifier remains within the first six lines.scripts/check-workflow-uses-lock.shpermits immutable direct 40-hex SHA references or a tag backed by an exact workflow entry and full 40-hex dependency commit in generatedactions.lock; missing or inconsistent records fail.static-analysis-gate.ymlusesactions/download-artifact@v8.0.1(the version already present in generatedactions.lock), rather than its unlockedv8.0.2.Validation / constraints
Checks must run on this PR's latest commit. A passing job is not evidence that any other failing workflow is fixed. No reusable workflow pins, write permissions, licence/SPDX data or dependency lockfile entries were manually relaxed/edited.
Outstanding, separately scoped
validate-rsr/ AI-install assumptions; false-greenvalidate-state.metadatastician/standardscanonical reusable workflows, permission/allowlist startup failures, e2e toolchain installation and Idris2-Zig ABI mismatch.