Repository navigation
Dependency audit: what ships stays at 0; a development-tool advisory needs a dated exception - #32
Merged
Merged
Conversation
…sory needs a dated exception picomatch <= 4.0.7 (GHSA-fc5q-39xc-vjpf) has no fixed version and is reached only through development tools. The workflows now run npm audit on what ships, and the architecture lane (AGSC_AUDIT=1) allows a development-tool advisory only while it is listed, with a reason and an expiry date, in tests/arch/audit-exceptions.json.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Active documentation inconsistencies and insufficient expiry-date validation leave the audit exception policy unenforced and allow malformed exceptions to bypass the intended gate.
3 open issues
What changed in this PR
Updates dependency-audit policy so production dependencies must remain vulnerability-free while development-only advisories can be tracked through dated architecture-test exceptions.
Changes:
- Updates both CI workflows to audit only shipped dependencies.
- Adds architecture-lane validation for allowed advisories, exception metadata, and expiry dates.
- Documents the revised audit policy and records the temporary picomatch advisory exception.
| File | Description |
|---|---|
| tests/arch/README.md | Documents the production-audit policy and dated development-dependency exception process. |
| tests/arch/pinned-dependencies.test.js | Adds production audit, exception allowlisting, and expiry validation checks. |
| tests/arch/audit-exceptions.json | Records the temporary picomatch advisory exception and its expiry. |
| docs/ENGINEERING.md | Updates the engineering dependency-audit gate documentation. |
| CONTRIBUTING.md | Updates contributor audit instructions to describe the exception-aware policy. |
| CHANGELOG.md | Records the changed CI and release audit behavior. |
| .github/workflows/test.yml | Changes the test workflow audit to check only dependencies included in what ships. |
| .github/workflows/release.yml | Changes release verification to audit only dependencies included in what ships. |
Review effort: Lite
| assert.match(e.id, /^GHSA(-[0-9a-z]{4}){3}$/u); | ||
| assert.ok(e.package && e.reason, `${e.id} gives no package or reason`); | ||
| assert.match(e.recorded, /^\d{4}-\d{2}-\d{2}$/u); | ||
| assert.ok(e.expires > today, `${e.id} expired on ${e.expires}: update the dependency or review the exception`); |
| npm test # the whole suite, node:test, offline | ||
| npm run test:coverage # coverage of src/: lines 99.9 %, functions 99 %, branches 93 % | ||
| npm run audit # npm audit must report 0 vulnerabilities | ||
| npm run audit # npm audit must report 0 vulnerabilities (a dated exception: tests/arch/audit-exceptions.json) |
| | Validators | `for t in tools/validate-*; do node "$t" --json; done` | The independent checkers over the distribution: rule text, schemas, ontology, vectors, scenarios, diagrams; the discovery document of a fixture build at Level 2 (`validate-wellknown`). | | ||
| | Hygiene | `node tools/public-hygiene .` | "Public means clean": no private path, working-process vocabulary, secret, e-mail address, personal data beyond the canonical name, or forbidden wording in any file of the tree. The allowed hits, each with its reason, are in `.public-hygiene.json`. 0 errors. | | ||
| | Audit | `npm run audit` | `npm audit --audit-level=low`: 0 advisories on the pinned dependency set. | | ||
| | Audit | `npm run audit` | `npm audit --audit-level=low`: 0 advisories on the pinned dependency set. The workflows run `npm audit --omit=dev --audit-level=low` (what ships) and the architecture lane with `AGSC_AUDIT=1`, which allows a development-tool advisory only while it is listed, with a reason and an expiry date, in `tests/arch/audit-exceptions.json`. | |
…cked as calendar dates Review findings: the local command and the release checklist now run the gate the workflows run, and an exception whose dates are not real YYYY-MM-DD days fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


A new advisory (GHSA-fc5q-39xc-vjpf, picomatch <= 4.0.7, no fixed version) turned every test job red. It is reached only through development tools;
npm audit --omit=devreports 0.npm audit --omit=dev --audit-level=low).AGSC_AUDIT=1(already run by both workflows) fails on any advisory that is not intests/arch/audit-exceptions.json, on an expired entry, and on any advisory in what ships.Local: 4,972 tests, 0 fail; lint and hygiene clean.