Repository navigation
build(site): keep pnpm-lock.yaml one YAML document and clear GHSA-rj75 - #40
Merged
Merged
Conversation
pnpm 12.10.1 wrote its own pinned version into site/pnpm-lock.yaml as a separate first YAML document. GitHub's dependency graph reads only that document, so the SBOM listed 15 pnpm packages instead of the docs site's ~490 and Dependabot closed alerts #2, #3 and #4 as fixed with braces 3.0.3, http-cache-semantics 4.2.0 and postcss-selector-parser 6.1.4 still locked. - pmOnFail: ignore in site/pnpm-workspace.yaml stops pnpm writing the env document; mise already pins pnpm 12.10.1 equal to packageManager. The lockfile loses the 158-line env document and nothing else. - Override postcss-nested to 7.0.2 (postcss-selector-parser ^7, locked 7.1.6) to clear GHSA-rj75-hqrm-r3gf. The built site/dist is byte for byte identical to main's. - lint:pnpm-lock (scripts/verify_single_yaml_document.py) fails the check gate and a lefthook pre-push job when the lockfile holds more than one document, none, or no packages, with tests for each planted defect. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Dependency ReviewThe following issues were found:
|
…edger PR #40 makes GitHub's dependency graph read site/ again, so dependency-review-action 5.0.0 sees every docs site package as added and fails on braces 3.0.3 (GHSA-vfj7-8cjw-p6xm, high, no patched release). The OpenVEX ledger already argues braces 3.0.3 and http-cache-semantics 4.2.0 not_affected, but the action has no VEX input: its one suppression surface is allow-ghsas, which src/filter.ts at a1d282b matches on the GHSA id alone. - scripts/vex_to_osv_config.py --workflow renders the allow-ghsas line of .github/workflows/dependency-review.yml from the GHSA ids of the ledger's not_affected and fixed statements (mise run security:vex), and with --check fails when the two sets differ in either direction. - --pnpm-lock holds every pkg:npm PURL in the ledger to the versions site/pnpm-lock.yaml locks, both ways (a moved version, a gone package, or a second locked copy the statement does not name), which puts back the version scoping a version-blind allow list drops. - security:vex:check passes both flags inside mise run check, and its sources include the pnpm lock and the workflow. - packages/atif-cli/tests/test_vex_drift_gate.py plants each defect and asserts the real tree is green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
pnpm 12.10.1 writes its own pinned version into
site/pnpm-lock.yamlas a separate first YAML document. GitHub's dependency graph reads only that document, so the SBOM listed the 15@pnpm/exe.*packages instead of the docs site, and Dependabot closed alerts #2, #3 and #4 as fixed while braces 3.0.3, http-cache-semantics 4.2.0 and postcss-selector-parser 6.1.4 were still locked. Upstream: dependabot/dependabot-core#15904, pnpm/pnpm#13805.pmOnFail: ignoreinsite/pnpm-workspace.yamlstops pnpm writing the env document. mise already pins pnpm 12.10.1 equal topackageManager, so pnpm's own version switching adds nothing.site/pnpm-lock.yamlloses the 158-line env document. The rest is unchanged except the override below. A fresh resolve from scratch also yields one document, but drifts other versions, so the document was dropped by hand andpnpm install --frozen-lockfileand--lockfile-onlyaccept it without rewriting.postcss-nested: 7.0.2(path@expressive-code/core@0.44.2->postcss-nested@6.2.0->postcss-selector-parser@6.1.4) clears GHSA-rj75-hqrm-r3gf. Lock diff:postcss-nested6.2.0 -> 7.0.2,postcss-selector-parser6.1.4 -> 7.1.6, nothing else. No OpenVEX change was needed.mise run lint:pnpm-lock(scripts/verify_single_yaml_document.py) is a leg ofmise run checkand a lefthook pre-push job. It fails on more than one document, none, or noimporters:/packages:entries.packages/atif-cli/tests/test_pnpm_lock_guard.pyplants each defect (10 tests).Gates
mise run docs:install: ok.mise run docs:gate: build 21 pages, astro check 0 errors/warnings/hints, vitest 64 passed.site/distis byte for byte identical to a build of origin/main (diff -rqempty, expressive-codeec.*.cssidentical), so code blocks render as before.trivy fs --scanners vuln --vex security/atif-sql.openvex.json site/pnpm-lock.yaml: 0 vulnerabilities (without the VEX file: braces CVE-2026-93687 and http-cache-semantics CVE-2026-93748 only; postcss-selector-parser gone).osv-scanner scan source --lockfile site/pnpm-lock.yaml: 576 packages; braces and http-cache-semantics remain (suppressed byosv-scanner.toml, 0 unsuppressed); main's lock showed 591 packages and GHSA-rj75 too.lint:pnpm-lockred (2 YAML documents, exit 1); removed -> green (576 packages).mise run check: green, 2364 passed, 1 skipped in 273 s (2354 before, +10 new tests).Review
gh api repos/laithalsaadoon/atif-sql/dependency-graph/sbomshould list the docs site's npm packages again, and Dependabot alerts chore(deps): bump the python-minor-patch group with 9 updates #2 and chore(deps-dev): update uv-build requirement from <0.12,>=0.11.14 to >=0.11.14,<0.13 #3 should reopen (their VEX statements cover them in trivy; the alert state itself needs a dismissal citing the VEX ids).pmOnFailwould bring the document back;lint:pnpm-lockturns that into a red check.Lead review (2026-10-08)
Re-ran in a fresh worktree of
factory/5-pnpm-single-doc-lock:docs:install(frozen),pnpm install --lockfile-onlyand a plainpnpm installall leavesite/pnpm-lock.yamlunchanged and one document;lint:pnpm-lockred (exit 1) on a planted env document and on origin/main's own two-document lock, green on the branch (576 packages);docs:gate0 errors, vitest 64 passed; the guard's 10 tests pass; ruff, ruff format, ty andlint:hooksclean. The lock pins postcss-nested 7.0.2 and postcss-selector-parser 7.1.6, outside GHSA-rj75's range (< 7.1.6). The branch's base is 150bda3; main since then moved only.github/workflows(PRs #31, #32), which this branch does not touch.Send-back 2026-10-08: dependency review reads the ledger
dependency diff reviewfailed on 3911258 (run 37826910179): withsite/back in GitHub's graph, dependency-review-action 5.0.0 reads every docs site package as added and fails on braces 3.0.3 (GHSA-vfj7-8cjw-p6xm, high, no patched release). The OpenVEX ledger already argues itnot_affected, but the action has no VEX input. Commit 3936358 fixes that without a second suppression record:.github/workflows/dependency-review.ymlgetsallow-ghsas: GHSA-ch52-4w7c-c8xp, GHSA-vfj7-8cjw-p6xm, rendered bymise run security:vexfrom the GHSA ids of the ledger'snot_affectedandfixedstatements, with a comment saying so and why (the action'ssrc/filter.tsat a1d282b matchesallow-ghsason the GHSA id alone, version- and package-blind). http-cache-semantics 4.2.0 (GHSA-ch52, high) is listed too, since it would fail the same job next.scripts/vex_to_osv_config.pygains--workflow(render rewrites the oneallow-ghsas:line;--checkfails when the workflow's set and the ledger's differ in either direction, or when the line is missing or doubled) and--pnpm-lock(everypkg:npm/<name>@<version>must be a versionsite/pnpm-lock.yamllocks, and the lock must hold no other version of that name the statement does not name, since the allow list would hide the advisory on that copy too).security:vex:checkpasses both insidemise run check; itssourcesadd the lock and the workflow. The ledger'stoolingline names the new output; no statement changed.packages/atif-cli/tests/test_vex_drift_gate.py(11 tests): the real tree is green; red on a ledger GHSA missing from the workflow, an extra workflow GHSA with no statement, a statement demoted tounder_investigation, braces moved to 3.0.4 in the lock, a second braces copy locked, braces gone, and a workflow with noallow-ghsas:line; render rewrites a stale line to the committed one; a scopedpkg:npm/%40types/...PURL decodes.Gates (send-back)
mise run --force check: green, 2375 passed, 1 skipped in 264 s (2364 before, +11), ruff, ruff format, ty, pyright 0 errors,lint:workflows,lint:hooks,lint:pnpm-lockall clean.security:vex:checkon the real tree:allow-ghsas matches ... (2 GHSA ids),osv-scanner.toml matches ... (67 lines)(unchanged file). Planted in the real tree throughmise run security:vex:check: braces 3.0.4 in the lock, an extraGHSA-aaaa-bbbb-cccc, and GHSA-vfj7 dropped each exit 1 with the matching message; restored, green.--persona=auditor) overdependency-review.yml: no findings, same as before the change.mise run security:workflowsproduced a usable SARIF with 0 results, but itspython3 scripts/verify_sarif.pystep hit this host's older system Python (atypestatement SyntaxError);uv run python scripts/verify_sarif.pyon the same SARIF passes. That is a host issue in the task, not this change.Review (send-back)
check_workflowand_check_npm_products, and at the workflow comment.allow-ghsasalso suppresses the listed GHSA ids for a PyPI package with the same advisory. The ledger's npm and PyPI version assertions are what scope it; a GHSA whose statement names a PURL in an ecosystem with no lock assertion (neither pypi nor npm) passes unasserted, as before.dependency diff reviewjob going green, which needs the push.Lead review (send-back, 2026-10-08)
3936358:mise run --force security:vex:checkgreen (allow-ghsas matches ... (2 GHSA ids)), the 21 tests oftest_vex_drift_gate.pyandtest_pnpm_lock_guard.pypass, actionlint exit 0.allow-ghsasexits 1 ("allow-ghsas is missing GHSA-vfj7-8cjw-p6xm"); braces 3.0.3 to 3.0.4 in the lock exits 1 ("locks braces 3.0.4"); restored, green.filterAllowedAdvisoriesat a1d282b matches on the GHSA id, so the allow list clears that verdict. The branch merges cleanly onto main663d7b1.🤖 Generated with Claude Code