Repository navigation
fix(docs-platform): commit the lockfile, so the tree is reproducible and auditable - #337
Merged
Merged
Conversation
…and auditable package-lock.json, 741 packages, and docs-site moves npm install -> npm ci. The job was resolving every ^x.y.z range fresh on each run, so it gated a tree no reader could reproduce. Verified rather than assumed: npm ci into an empty node_modules builds the site (build complete in 1.45s, six pages) where npm ci here previously failed outright, and npm audit reports 0 vulnerabilities where it previously had no tree to audit. Corrects a claim I was about to make: this is NOT what closed the three vite alerts. They closed earlier the same day, before the lockfile existed, because vite is a direct devDependency at ^6.4.3 with an overrides entry forcing the same, and the advisories' range is <= 6.4.2 with 6.4.3 first patched — the 'or pinned version requirement' half of Dependabot's error. Both mechanisms are true here, which is when one gets credited for the other. Refs #214
This was referenced Aug 4, 2026
Closed
Closed
scttfrdmn
added a commit
that referenced
this pull request
Aug 4, 2026
…ner (#347) Closes #343. Two problems, one file. setup.py declared 16 dependencies as unbounded >= floors with no lockfile, so the sdk-metrics job resolved all of them fresh on every run - the defect #337 fixed for docs-site, in another language. And nothing scanned them: trivy fs reported four targets (go.mod, sdks/java/pom.xml, and the two package-lock.json files) with sdks/python absent, because Trivy detects Python from requirements.txt, poetry.lock, Pipfile.lock or an installed .dist-info, and the only manifest here was setup.py. It now reports five. The filename is load-bearing and cost a rewrite to find. This was first written as requirements-ci.txt, which Trivy does not detect - scanned in a scratch directory it reported no targets, so the file would have read as the fix while leaving the gap where it was. requirements-dev.txt, dev-requirements.txt and requirements/ci.txt are equally invisible, and a bare pyproject.toml is not detected either. install_requires stays as ranges, because a library that pins its transitive tree pins it for every consumer. pip check now runs between install and test to catch the one thing that split can get wrong; verified by mutation - psutil==5.7.0 against a >=5.8.0 floor reports the conflict and exits 1. Two entries removed rather than pinned, because neither was a dependency: asyncio has been stdlib since 3.4 and this package requires >=3.8, and typing-extensions is imported nowhere. 71 tests pass with both gone. The pip ecosystem entry needed the pinned tree to exist first, for the same reason docs-platform security updates needed a lockfile. Its python label was added to labels.yml and synced from there, rather than being created by the first PR to apply it - which is how java got onto the repository.
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.
Closes #214.
docs-platform/package-lock.json— 741 packages — anddocs-sitemoves fromnpm installtonpm ci.Why the job needed this, separately from the alerts
The
docs-sitegate added in #334 was resolving every^x.y.zrange fresh on each run. That makes it a weaker gate than it looks: it tested a dependency tree no reader could reproduce, and a break could appear or disappear with no commit behind it. Its own comment said so; this removes the caveat.Verified, not assumed
npm ciinto emptynode_modulespackage-lock.jsonnpx vitepress build .afternpm cibuild complete in 1.45s, 6 pagesnpm auditOne correction, because the tempting reading is wrong
This is not what closed the three
vitealerts againstdocs-platform/package.json. They closed at 21:24 today, before this lockfile existed.They closed because
viteis a direct devDependency at^6.4.3with anoverridesentry forcing the same, and the advisories' vulnerable range is<= 6.4.2with6.4.3the first patched version — so no version the manifest admits is vulnerable. That is the "or pinned version requirement" half of Dependabot's own error message, and it is a different mechanism from the lockfile.Both are now true for this directory, and that is precisely the situation where one gets credited for the other.
.github/dependabot.yml's comment is updated to say which is which, since it previously asserted that committing a lockfile was what would close the alerts.All 8 Dependabot alerts on the repository are now
fixed— 5 jackson-databind insdks/java, 3 vite here.Note
npm ciwarns about 6 packages with install scripts (esbuild,fsevents,ssh2,cpu-features,protobufjs,@scarf/scarf) under npm's newerallow-scriptsprompt. It is a warning, not a failure, and the build completes — flagging it because it is new output on this job rather than something I fixed.