Skip to content
Open
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
6 changes: 6 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ jobs:
- name: Validate pinned Rust toolchain alignment
run: pnpm ci:rust-toolchain:test && pnpm ci:rust-toolchain:check

- name: Test production dependency audit gate
run: pnpm audit:prod:test

- name: Audit production JavaScript dependencies
run: pnpm audit:prod

- name: Mainnet readiness matches the committed manifest (recorded fixture, no RPC, no secrets)
run: |
pnpm --filter @sub-rosa/sdk exec tsx scripts/mainnet-ready.ts --strict --fixture
Expand Down
180 changes: 180 additions & 0 deletions audit-exceptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"$schema_comment": "Time-boxed exceptions for production pnpm audit (Issue #529). Each entry needs id, package, reason, expiresOn (YYYY-MM-DD), and trackingIssue.",
"exceptions": [
{
"id": "GHSA-pmwg-cvhr-8vh7",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-pf86-5x62-jrwf",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-6chq-wfr3-2hj9",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-q8qp-cvcw-x6jj",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-hfxv-24rg-xrqf",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-777c-7fjr-54vf",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-p92q-9vqr-4j8v",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-j5f8-grm9-p9fc",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-3g43-6gmg-66jw",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-35jp-ww65-95wh",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-hmw2-7cc7-3qxx",
"package": "form-data",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace form-data before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-pjwm-pj3p-43mv",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-82x6-q7mm-w9cf",
"package": "toml",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace toml before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-v5mp-jgw5-2x6j",
"package": "toml",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace toml before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-mghh-pgcx-3jjj",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-3pq3-5fj3-cg6v",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-542g-h47m-68v8",
"package": "axios",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace axios before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-q3jh-wrc6-jgq8",
"package": "follow-redirects",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace follow-redirects before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-8r9p-f939-6h3c",
"package": "follow-redirects",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace follow-redirects before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-4qx8-w7c3-pj3p",
"package": "toml",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace toml before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-9j65-hcg3-gc64",
"package": "toml",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace toml before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-9qmh-m7c6-f92p",
"package": "toml",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace toml before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-mrhx-c7xc-m3w5",
"package": "zod",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace zod before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-mrwp-f3q8-3g9p",
"package": "follow-redirects",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace follow-redirects before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
},
{
"id": "GHSA-h895-cgqg-jf52",
"package": "toml",
"reason": "Baseline production advisory recorded when enabling the CI gate; upgrade or replace toml before expiry",
"expiresOn": "2027-02-24",
"trackingIssue": "#529"
}
]
}
21 changes: 21 additions & 0 deletions docs/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ The `TypeScript coverage` workflow runs `pnpm time:guard:test` followed by
first-party code calls the clock or timer globals outside `@sub-rosa/time`.
Both commands are blocking CI steps and can be run locally from the root.

## Production dependency audit

Production JavaScript dependencies are audited in the TypeScript coverage
workflow (`.github/workflows/coverage.yml`) via `scripts/audit-prod-deps.mjs`
(`pnpm audit --prod --audit-level=high --json`):

- **Severity threshold:** `high` and `critical` advisories in production
dependencies block by default (override with `--audit-level <level>` or
`PNPM_AUDIT_LEVEL`).
- **Exception process:** Temporary exceptions for unpatched transitive
advisories must be recorded in `audit-exceptions.json` with `id`, `package`,
`reason`, `expiresOn` (`YYYY-MM-DD`), and `trackingIssue`. Expired or
incomplete exceptions fail the check automatically.

Run locally with:

```bash
pnpm audit:prod:test
pnpm audit:prod
```

## Test coverage gate

The repository enforces a minimum **aggregate line coverage** threshold for
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
"line-lengths:check": "node scripts/check-line-lengths.mjs",
"line-lengths:test": "node --test scripts/check-line-lengths.test.mjs",
"wf-creds:check": "node scripts/check-workflow-credentials.mjs",
"wf-creds:test": "node --test scripts/check-workflow-credentials.test.mjs"
"wf-creds:test": "node --test scripts/check-workflow-credentials.test.mjs",
"audit:prod": "node scripts/audit-prod-deps.mjs",
"audit:prod:test": "node --test scripts/audit-prod-deps.test.mjs"
}
}
Loading