| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Upgrades dependency integrity and enforces reproducible dependency installation.
Changes:
Copilot reviewed 29 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file| File | Description |
|---|---|
| Themes/package-lock.json | Migrates integrity hashes to SHA-512. |
| Extension/readme.developer.md | Documents verified Yarn bootstrap. |
| Extension/package.json | Adds lockfile scripts and bootstrap changes. |
| Extension/.yarn-bootstrap/package-lock.json | Upgrades Yarn integrity to SHA-512. |
| Extension/.scripts/verifyYarnLock.test.mjs | Tests lockfile integrity validation. |
| Extension/.scripts/verifyYarnLock.mjs | Validates Yarn and npm lockfiles. |
| Extension/.scripts/updatePackageLockIntegrity.test.mjs | Tests updater and atomic writes. |
| Extension/.scripts/updatePackageLockIntegrity.mjs | Adds byte-verifying lockfile updater. |
| Extension/.scripts/subresourceIntegrity.mjs | Parses and computes integrity values. |
| Extension/.scripts/packageLockFiles.mjs | Discovers repository package locks. |
| Build/package/jobs_package_vsix.yml | Uses frozen npm installation. |
| .github/workflows/question-closer.yml | Uses npm ci. |
| .github/workflows/question-closer-debugger.yml | Uses npm ci. |
| .github/workflows/more-info-needed-closer.yml | Uses npm ci. |
| .github/workflows/more-info-needed-closer-debugger.yml | Uses npm ci. |
| .github/workflows/locker.yml | Uses npm ci. |
| .github/workflows/job-compile-and-test.yml | Runs repository lock validation. |
| .github/workflows/investigate-costing-closer-debugger.yml | Uses npm ci. |
| .github/workflows/investigate-closer-debugger.yml | Uses npm ci. |
| .github/workflows/feature-request-reopener.yml | Uses npm ci. |
| .github/workflows/feature-request-debugger.yml | Uses npm ci. |
| .github/workflows/feature-request-closer-triage.yml | Uses npm ci. |
| .github/workflows/feature-request-closer-no-milestone.yml | Uses npm ci. |
| .github/workflows/external-closer-debugger.yml | Uses npm ci. |
| .github/workflows/enhancement-reopener.yml | Uses npm ci. |
| .github/workflows/enhancement-closer-triage.yml | Uses npm ci. |
| .github/workflows/enhancement-closer-no-milestone.yml | Uses npm ci. |
| .github/workflows/duplicate-closer.yml | Uses npm ci. |
| .github/workflows/by-design-closer.yml | Uses npm ci. |
| .github/workflows/by-design-closer-debugger.yml | Uses npm ci. |
| .github/workflows/bug-debugger.yml | Uses npm ci. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 29 out of 34 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 29 out of 34 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 29 out of 34 changed files in this pull request and generated no new comments.
Files not reviewed (1)
Sorry, something went wrong.
There was a problem hiding this comment.
✨Copilot (agent102): Reviewed at 493b432e merged onto main 92768bc0. The merge base is the current target head, so the merged result is byte-identical to the PR head.
Independent validation performed locally:
Only two nits below; nothing blocking from my side.
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 29 out of 34 changed files in this pull request and generated no new comments.
Files not reviewed (1)Extension/.scripts/packageLockFiles.mjs:88
|| (packageEntry.link !== true && typeof packageEntry.resolved === 'string' && /^(?:file|link|workspace):/i.test(packageEntry.resolved))
Extension/.scripts/verifyYarnLock.mjs:94
if (currentEntry && currentEntry.integrity === undefined
&& !isExplicitLocalResolution(currentEntry.resolved)
&& !hasExplicitLocalSelector(currentEntry.selector)) {
Sorry, something went wrong.
There was a problem hiding this comment.
✨Copilot (agent102): Re-checked at 62cd4633. Both of my earlier nits are fixed and independently verified: the removed test-yarn-lock/verify-yarn-lock aliases have no remaining consumer, and validatePackageLocks now prefixes malformed-JSON, missing-packages, and ENOENT failures with the offending path while preserving error.cause. 32/32 tests pass and verify-lockfiles exits 0 at this head.
The automated review at this head reported no new threads but listed two suppressed low-confidence observations. I verified both against this revision and they reproduce, so I have consolidated them into the single comment below — they share one root cause across packageLockFiles.mjs and verifyYarnLock.mjs.
Sorry, something went wrong.
| const normalizedPackagePath = packagePath.replaceAll('\\', '/'); | ||
| return workspacePaths.has(getWorkspaceTargetPath(packageEntry)) | ||
| || workspacePaths.has(normalizedPackagePath) | ||
| || (packageEntry.link !== true && typeof packageEntry.resolved === 'string' && /^(?:file|link|workspace):/i.test(packageEntry.resolved)) |
There was a problem hiding this comment.
✨Copilot (agent102): [Minor] This exemption treats a lockfile-controlled resolved prefix as authorization to skip integrity, without validating the target — and the same pattern exists on the Yarn side at verifyYarnLock.mjs line 93 (!isExplicitLocalResolution(currentEntry.resolved)). Both were raised as suppressed low-confidence observations in the automated review at this head; I verified them against this revision rather than taking them as given.
Calling the exported validators directly at 62cd4633:
| Fixture (no integrity) | Result |
|---|---|
| npm node_modules/evil with resolved: "file:../../outside/evil.tgz" | accepted |
| npm node_modules/evil with resolved: "link:/etc/evil" | accepted |
| npm node_modules/evil with resolved: "workspace:../../outside" | accepted |
| npm node_modules/evil with link: true, resolved: "../../outside" | rejected |
| npm node_modules/evil with resolved: "https://example.test/evil.tgz" | rejected |
| yarn dependency@1.0.0 with resolved "file:../../outside/dep.tgz" | accepted |
| yarn dependency@1.0.0 with resolved "link:/etc/evil" | accepted |
| yarn dependency@1.0.0 with resolved "https://example.test/dep.tgz" | rejected |
So the link: true path that was hardened earlier in this PR rejects traversal, absolute, and protocol targets, while its non-link sibling accepts an arbitrary string after the protocol prefix. On the Yarn side an ordinary registry selector is exempted purely because of its resolved line, which does not match the earlier statement that "only selectors whose actual dependency range uses an explicit file:, link:, or workspace: protocol are exempt" — the condition is an OR of the selector check and the resolution check.
Impact is bounded: no entry in any current lockfile lacks integrity, so nothing relies on this exemption today, and it only matters for a future lockfile change. But since the stated goal is repository-wide integrity enforcement, it is worth closing so the validator cannot be opted out of by editing the lockfile it is validating.
Minimal resolution: apply the same target rules the link: true path already uses — resolve the local target relative to the lockfile and exempt only normalized, repository-contained paths — or, for Yarn, rely on hasExplicitLocalSelector alone. Because every current entry carries integrity, either change is inert against the lockfiles in this PR.
Sorry, something went wrong.
|
It looks like this is not actually necessary. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Upgrade dependency integrity from SHA-1-only values to SHA-512 across the Yarn and npm lockfiles. Add repository-wide validation and a byte-verifying npm lock updater, and make npm consumers use frozen installs so builds consume the reviewed dependency graph.
The updater fetches exact tarballs from the configured approved registry, verifies each existing SHA-1 value against the downloaded bytes, computes SHA-512 independently, and protects lockfile replacement against partial or concurrent writes.
Validation