Repository navigation
fix(ci): pin standards governance integration to immutable tested revision #992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d3c0510
7a9f8e7
cd0c77f
a93e7ac
d76b947
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # This workflow is managed by gh actions-lock. | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| # Standards-integration contract gate, with zero third-party actions | ||
| # (same pattern as cicd-squabbler.yml): reusable/action resolution is | ||
| # itself one of the failure modes under test, so this gate must be able | ||
| # to run — and to fail honestly — when that resolution is broken. | ||
| # Exit semantics: 0 = contract holds; 1 = config failure (category 3); | ||
| # 3 = required tool unavailable. 3 is a failure of this gate, never a | ||
| # pass: skipped or unavailable work is not successful analysis. | ||
| name: Standards Integration | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: standards-integration-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| contract: | ||
| name: Standards integration contract | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Check out exact event commit without external action | ||
| env: | ||
| REPO: ${{ github.repository }} | ||
| SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On Useful? React with 👍 / 👎. |
||
| TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| AUTH="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$TOKEN" | base64 -w0)" | ||
| git init -q . | ||
| git remote add origin "https://github.com/$REPO.git" | ||
| git -c http.extraheader="$AUTH" fetch -q --depth 1 origin "$SHA" | ||
| git checkout -q FETCH_HEAD | ||
|
|
||
| - name: Run integration contract tests (positive, negative, unavailable-tool) | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -uo pipefail | ||
| rc=0 | ||
| bash test/standards-integration-test.sh || rc=$? | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| if [ "$rc" -eq 3 ]; then | ||
| echo "::error::Standards-integration tooling unavailable (exit 3) — not a pass" | ||
| exit 1 | ||
| fi | ||
| if [ "$rc" -ne 0 ]; then | ||
| echo "::error::Standards-integration contract failed (exit $rc, category=config)" | ||
| exit 1 | ||
| fi | ||
| rc=0 | ||
| bash scripts/standards-integration/check-standards-integration.sh --root . --verify-remote || rc=$? | ||
| if [ "$rc" -eq 3 ]; then | ||
| echo "::error::Published pin could not be verified (exit 3) — not a pass" | ||
| exit 1 | ||
| fi | ||
| if [ "$rc" -ne 0 ]; then | ||
| echo "::error::Standards integration contract failed remote verification (exit $rc)" | ||
| exit 1 | ||
| fi | ||
| echo "outcome=pass category=findings-channel-ready (contract + published pin verified; not a scan result)" >> "$GITHUB_STEP_SUMMARY" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new nested reference has no matching top-level dependency record: the lock defines only
actions/download-artifact@v8.0.2at lines 203–207, not the exact@9000827...key used here.Hypatia.Rules.ActionsLock.validate_transitive_dependencies/1requires every nestedusesvalue to match a dependency key exactly (lib/rules/actions_lock.ex:574-584), so the repository's authoritative-lock test and Governance lockfile verification reject this lock on every run. Regenerate the lockfile so it includes the exact-keyed transitive record.Useful? React with 👍 / 👎.