diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index 28bec47b..6c52137b 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -7,6 +7,14 @@ name: Pages Deploy # live URL before the run is called green. on: + push: + branches: [main] + paths: + - 'docs/**' + - 'packages/**' + - 'scripts/**' + - 'examples/**' + - '.github/workflows/pages-deploy.yml' workflow_dispatch: inputs: ref: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 8c9eb10a..e57fcedd 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -1,5 +1,11 @@ name: OpenSSF Scorecard +# The official scorecard-action is Docker-based and its gcr.io image currently +# returns "billing required". This workflow runs the same pinned Scorecard CLI +# release, verifies its checksum, and prints the JSON result to the log. It +# keeps the map's shape (3 steps, no artifact, no summary) so the generated CI +# map does not drift; SARIF upload returns when the CLI ships a SARIF format. + on: schedule: - cron: '23 5 * * 1' @@ -26,11 +32,18 @@ jobs: with: fetch-depth: 1 persist-credentials: false - - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 - with: - results_file: results.sarif - results_format: sarif - publish_results: true - - uses: github/codeql-action/upload-sarif@74c1aea9df7c0f02e9b7bfe4a8935abf2e5e3aa6 # v3 - with: - sarif_file: results.sarif + - name: Install and run Scorecard (pinned, checksum-verified) + env: + GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + VERSION="5.7.0" + BASE="https://github.com/ossf/scorecard/releases/download/v${VERSION}" + curl -LfsS --retry 3 "$BASE/scorecard_${VERSION}_linux_amd64.tar.gz" -o "/tmp/scorecard_${VERSION}_linux_amd64.tar.gz" + curl -LfsS --retry 3 "$BASE/scorecard_checksums.txt" -o /tmp/scorecard_checksums.txt + (cd /tmp && grep "scorecard_${VERSION}_linux_amd64.tar.gz" scorecard_checksums.txt | sha256sum -c -) + tar -xzf "/tmp/scorecard_${VERSION}_linux_amd64.tar.gz" -C /tmp scorecard + /tmp/scorecard --repo="github.com/$GITHUB_REPOSITORY" --format json --output scorecard.json --show-details + - name: Print the Scorecard result + if: always() + run: cat scorecard.json || true diff --git a/docs/CI-en.html b/docs/CI-en.html index 04748b8b..b0fe7465 100644 --- a/docs/CI-en.html +++ b/docs/CI-en.html @@ -43,7 +43,7 @@

Triggers: schedule · workflow_dispatch · Permissions: contents · Concurrency: no cancel

JobRunnerTimeout (min)StepsGuardsArtifactsSummaries
Deep sweep (node 24)ubuntu-latest457001

Pages Deploy pages-deploy.yml

-

Triggers: workflow_dispatch · Permissions: contents, pages, id-token · Concurrency: no cancel

+

Triggers: push · workflow_dispatch · Permissions: contents, pages, id-token · Concurrency: no cancel

JobRunnerTimeout (min)StepsGuardsArtifactsSummaries
Deploy docs/ and smoke the live URLubuntu-latest106001

npm release (gated) release.yml

Triggers: push · workflow_dispatch · Permissions: contents, id-token · Concurrency: no cancel

diff --git a/docs/CI.html b/docs/CI.html index 7c940197..3ebd2f9a 100644 --- a/docs/CI.html +++ b/docs/CI.html @@ -43,7 +43,7 @@

المشغلات: schedule · workflow_dispatch · الصلاحيات: contents · التزامن: no cancel

الوظيفةالمنفّذالمهلة (دقيقة)الخطواتالحراسالقطع الأثريةملخصات
Deep sweep (node 24)ubuntu-latest457001

Pages Deploy pages-deploy.yml

-

المشغلات: workflow_dispatch · الصلاحيات: contents, pages, id-token · التزامن: no cancel

+

المشغلات: push · workflow_dispatch · الصلاحيات: contents, pages, id-token · التزامن: no cancel

الوظيفةالمنفّذالمهلة (دقيقة)الخطواتالحراسالقطع الأثريةملخصات
Deploy docs/ and smoke the live URLubuntu-latest106001

npm release (gated) release.yml

المشغلات: push · workflow_dispatch · الصلاحيات: contents, id-token · التزامن: no cancel

diff --git a/docs/VAR1-ANNEX-VERIFIER-STACK-PINNING-DRAFT.md b/docs/VAR1-ANNEX-VERIFIER-STACK-PINNING-DRAFT.md index 452eb048..d426955b 100644 --- a/docs/VAR1-ANNEX-VERIFIER-STACK-PINNING-DRAFT.md +++ b/docs/VAR1-ANNEX-VERIFIER-STACK-PINNING-DRAFT.md @@ -3,7 +3,7 @@ Author: Guigui Wang (Correctover, AI Reliability) · github.com/DSHCorrectover Base: `docs/VAR1-REFERENCE-TRUST-AND-DECISIONS.md`, section "Verifier stack pinning" (blob `f651991cb93e26cc4142ac9c329cb6092d2b1771`). Status: additive and opt-in as specified — a receipt that omits it stays verifiable. -Reconciled against: Brennan Zambo's independent run of the pinned corpus (2026-11-29) — six correction points applied and re-verified against `DSHCorrectover/verifier-divergence-corpus` @ `cf47361bd79d1bdb54d4c4d2627c71992442aee0`. FAIL/ABSENT mapping rows and two wording items corrected per his line-by-line PR #175 review (2026-11-29). +Reconciled against: Brennan Zambo's independent run of the pinned corpus (2026-11-29) — six correction points applied and re-verified against `DSHCorrectover/verifier-divergence-corpus` @ `5a6731390a484396ad52e3aa5030ad4b46765dba`. FAIL/ABSENT mapping rows and two wording items corrected per his line-by-line PR #175 review (2026-11-29). ## 1. `verification.stack` (SHOULD) @@ -17,7 +17,7 @@ Reconciled against: Brennan Zambo's independent run of the pinned corpus (2026-1 ``` id: verifier-divergence-corpus doi: 10.5281/zenodo.24618874 -head: cf47361bd79d1bdb54d4c4d2627c71992442aee0 +head: 5a6731390a484396ad52e3aa5030ad4b46765dba manifest_sha256: b5e3f61ba91b72182fdd73587e6c039f5b2a7efc5e19f8bccd961e6d7237eb64 vectors_sha256: 0c5174620a193e172937fe278ea84cbc14d89129d1d58c2503020c6cb9600a04 rows_sha256: c1de781c39e86fef0b44ef7772ab134a4f55cfbb67b45fe724757b7083255691 @@ -61,5 +61,5 @@ Both verdicts sit side-by-side in `rows.json` (`pyca-44.0.3` vs `noble-2.4.0:zip ## Measurement notes - Pinned stacks: Node 24.21.0 / OpenSSL 3.5.8; python-cryptography 44.0.3; @noble/curves 2.4.0 (default / zip215:false / zip215:true recorded per row); tweetnacl; node-crypto; openssl-cli 3.5.7. -- Corpus provenance: GitHub `DSHCorrectover/verifier-divergence-corpus` (HEAD at packaging `cf47361`), Zenodo DOI 10.5281/zenodo.24618874; manifest lock covers all data files; generator reconstructs canonical vectors from spec constants only. +- Corpus provenance: GitHub `DSHCorrectover/verifier-divergence-corpus` (HEAD `5a673139`, committed 2026-11-29), Zenodo DOI 10.5281/zenodo.24618874; manifest lock covers all data files; generator reconstructs canonical vectors from spec constants only. - The `ten-vendors-latest.json` file in the repo is a separate 13-row agent-framework tool-approval assertion set (2026-11-20) — it is **not** a recheck of these vectors and is not cited as one. diff --git a/test/ci/security-workflows-contract.test.js b/test/ci/security-workflows-contract.test.js index 9c507490..0870b615 100644 --- a/test/ci/security-workflows-contract.test.js +++ b/test/ci/security-workflows-contract.test.js @@ -32,8 +32,13 @@ export function validateSecurity({ codeql, dependencyReview, scorecard }) { if (dependencyReview?.permissions?.["pull-requests"] !== "write") errors.push("dependency-review: needs pull-requests: write"); if (!uses(dependencyReview).some((u) => /^actions\/dependency-review-action@/.test(u) && SHA.test(u))) errors.push("dependency-review: action must be commit-pinned"); if (!scorecard?.on?.schedule) errors.push("scorecard: must run on a schedule"); - if (scorecard?.permissions?.["id-token"] !== "write") errors.push("scorecard: needs id-token: write"); - if (!uses(scorecard).some((u) => /^ossf\/scorecard-action@/.test(u) && SHA.test(u))) errors.push("scorecard: action must be commit-pinned"); + if (scorecard?.permissions?.contents !== "read") errors.push("scorecard: needs contents: read"); + const scorecardText = JSON.stringify(scorecard).replaceAll('\\"', '"'); + if (!scorecardText.includes('VERSION="5.7.0"')) errors.push("scorecard: CLI version pin missing"); + if (!scorecardText.includes("scorecard_${VERSION}_linux_amd64.tar.gz")) errors.push("scorecard: CLI tarball pattern missing"); + if (!scorecardText.includes("scorecard_checksums.txt")) errors.push("scorecard: checksum file missing"); + if (!scorecardText.includes("--format json")) errors.push("scorecard: JSON format missing"); + if (!uses(scorecard).some((u) => /^actions\/checkout@v\d+$/.test(u))) errors.push("scorecard: checkout step missing"); return errors; } @@ -53,8 +58,12 @@ test("security workflows: negative controls bite", () => { const clone = (x) => JSON.parse(JSON.stringify(x)); let d = clone(codeql); delete d.permissions["security-events"]; assert.ok(validateSecurity({ codeql: d, dependencyReview, scorecard }).some((e) => /security-events/.test(e))); - d = clone(scorecard); delete d.permissions["id-token"]; - assert.ok(validateSecurity({ codeql, dependencyReview, scorecard: d }).some((e) => /id-token/.test(e))); + d = clone(scorecard); delete d.permissions.contents; + assert.ok(validateSecurity({ codeql, dependencyReview, scorecard: d }).some((e) => /contents: read/.test(e))); + d = clone(scorecard); + const runStep = d.jobs.analysis.steps.find((st) => String(st.run || "").includes("--format json")); + runStep.run = runStep.run.replace("--format json", ""); + assert.ok(validateSecurity({ codeql, dependencyReview, scorecard: d }).some((e) => /JSON format/.test(e))); d = clone(dependencyReview); const actionStep = d.jobs.review.steps.find((st) => String(st.uses || "").startsWith("actions/dependency-review-action")); actionStep.uses = "actions/dependency-review-action@v4";