Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
2 changes: 1 addition & 1 deletion docs/CI-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<p><strong>Triggers:</strong> <code>schedule</code> · <code>workflow_dispatch</code> · <strong>Permissions:</strong> <code>contents</code> · <strong>Concurrency:</strong> no cancel</p>
<table><thead><tr><th>Job</th><th>Runner</th><th>Timeout (min)</th><th>Steps</th><th>Guards</th><th>Artifacts</th><th>Summaries</th></tr></thead><tbody><tr><td>Deep sweep (node 24)</td><td><code>ubuntu-latest</code></td><td>45</td><td>7</td><td>0</td><td>0</td><td>1</td></tr></tbody></table></section>
<section><h2>Pages Deploy <small><code>pages-deploy.yml</code></small></h2>
<p><strong>Triggers:</strong> <code>workflow_dispatch</code> · <strong>Permissions:</strong> <code>contents, pages, id-token</code> · <strong>Concurrency:</strong> no cancel</p>
<p><strong>Triggers:</strong> <code>push</code> · <code>workflow_dispatch</code> · <strong>Permissions:</strong> <code>contents, pages, id-token</code> · <strong>Concurrency:</strong> no cancel</p>
<table><thead><tr><th>Job</th><th>Runner</th><th>Timeout (min)</th><th>Steps</th><th>Guards</th><th>Artifacts</th><th>Summaries</th></tr></thead><tbody><tr><td>Deploy docs/ and smoke the live URL</td><td><code>ubuntu-latest</code></td><td>10</td><td>6</td><td>0</td><td>0</td><td>1</td></tr></tbody></table></section>
<section><h2>npm release (gated) <small><code>release.yml</code></small></h2>
<p><strong>Triggers:</strong> <code>push</code> · <code>workflow_dispatch</code> · <strong>Permissions:</strong> <code>contents, id-token</code> · <strong>Concurrency:</strong> no cancel</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/CI.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<p><strong>المشغلات:</strong> <code>schedule</code> · <code>workflow_dispatch</code> · <strong>الصلاحيات:</strong> <code>contents</code> · <strong>التزامن:</strong> no cancel</p>
<table><thead><tr><th>الوظيفة</th><th>المنفّذ</th><th>المهلة (دقيقة)</th><th>الخطوات</th><th>الحراس</th><th>القطع الأثرية</th><th>ملخصات</th></tr></thead><tbody><tr><td>Deep sweep (node 24)</td><td><code>ubuntu-latest</code></td><td>45</td><td>7</td><td>0</td><td>0</td><td>1</td></tr></tbody></table></section>
<section><h2>Pages Deploy <small><code>pages-deploy.yml</code></small></h2>
<p><strong>المشغلات:</strong> <code>workflow_dispatch</code> · <strong>الصلاحيات:</strong> <code>contents, pages, id-token</code> · <strong>التزامن:</strong> no cancel</p>
<p><strong>المشغلات:</strong> <code>push</code> · <code>workflow_dispatch</code> · <strong>الصلاحيات:</strong> <code>contents, pages, id-token</code> · <strong>التزامن:</strong> no cancel</p>
<table><thead><tr><th>الوظيفة</th><th>المنفّذ</th><th>المهلة (دقيقة)</th><th>الخطوات</th><th>الحراس</th><th>القطع الأثرية</th><th>ملخصات</th></tr></thead><tbody><tr><td>Deploy docs/ and smoke the live URL</td><td><code>ubuntu-latest</code></td><td>10</td><td>6</td><td>0</td><td>0</td><td>1</td></tr></tbody></table></section>
<section><h2>npm release (gated) <small><code>release.yml</code></small></h2>
<p><strong>المشغلات:</strong> <code>push</code> · <code>workflow_dispatch</code> · <strong>الصلاحيات:</strong> <code>contents, id-token</code> · <strong>التزامن:</strong> no cancel</p>
Expand Down
6 changes: 3 additions & 3 deletions docs/VAR1-ANNEX-VERIFIER-STACK-PINNING-DRAFT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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.
17 changes: 13 additions & 4 deletions test/ci/security-workflows-contract.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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";
Expand Down
Loading