Skip to content

fix(ci): use published well-known paths and verify actions.lock-backed pins - #69

Merged
hyperpolymath merged 3 commits into
mainfrom
fix/ci-contract-gates-20261115
Nov 15, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
fix/ci-contract-gates-20261115

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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.yml now detects www/.well-known/security.txt (the actual tracked published path), checks www/.well-known/{ai,humans,security}.txt, and fails closed for invalid expiry fields. Workflow and publication-path changes trigger its PR check.
  • Workflow Security Linter accepts the managed gh actions-lock preamble only if the SPDX identifier remains within the first six lines.
  • New scripts/check-workflow-uses-lock.sh permits immutable direct 40-hex SHA references or a tag backed by an exact workflow entry and full 40-hex dependency commit in generated actions.lock; missing or inconsistent records fail.
  • Offline fixture tests cover matching lock, intentionally mismatched tag, and direct-SHA acceptance; the linter runs these tests.
  • static-analysis-gate.yml uses actions/download-artifact@v8.0.1 (the version already present in generated actions.lock), rather than its unlocked v8.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

  • Stale validate-rsr / AI-install assumptions; false-green validate-state.
  • Moved metadatastician/standards canonical reusable workflows, permission/allowlist startup failures, e2e toolchain installation and Idris2-Zig ABI mismatch.
  • Resolve all review conversations and obtain true green required checks before any merge.

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.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 15, 2026 15:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T15:19:46.953388Z b6ab734 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-15T15:18:48.426326Z b6ab734 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 8c833fb into main Nov 15, 2026
20 of 22 checks passed
@hyperpolymath
hyperpolymath deleted the fix/ci-contract-gates-20261115 branch November 15, 2026 15:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/check-workflow-uses-lock.sh Outdated
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')"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +66 to +70
- 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 .

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +69 to +70
- name: Check SHA-Pinned or generated lockfile-pinned Actions
run: bash scripts/check-workflow-uses-lock.sh .

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants