Repository navigation
build(node): pin npm integrity and Node 22/jsdom 30 compatibility #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
168
commits into
develop
Choose a base branch
from
fix/node-22-22-2-jsdom-30-779
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 81 commits
Commits
Show all changes
168 commits
Select commit
Hold shift + click to select a range
4294ddc
test(supply-chain): require deterministic npm lock generator
seonghobae afb20be
fix(supply-chain): pin npm lock generator metadata
seonghobae e64c229
ci(supply-chain): prove npm version and lock reproduction
seonghobae ebbde9b
docs(supply-chain): record npm generator provenance
seonghobae 694ca83
docs(changelog): record npm generator contract
seonghobae 90dc2a0
fix(supply-chain): avoid serializing npm into runtime engines
seonghobae fecc36b
test(supply-chain): keep npm enforcement out of runtime engines
seonghobae 9eb83c3
docs(supply-chain): separate npm generator from runtime engines
seonghobae 5609b88
ci(supply-chain): publish deterministic lock reproduction evidence
seonghobae 032314d
test(supply-chain): require preserved lock reproduction evidence
seonghobae 0263ad4
test(security): require coordinated PDF.js and Undici baseline
seonghobae 2cbf767
test(security): disable PDF expression evaluation
seonghobae 475de96
fix(security): pin the patched Undici transitive version
seonghobae deb74ac
fix(security): pin the patched PDF.js release
seonghobae dc90d5b
fix(security): disable PDF expression evaluation
seonghobae b23b957
docs(security): record coordinated PDF and HTTP remediation
seonghobae 2e99f72
docs(changelog): record coordinated security remediation
seonghobae 8f50fe4
fix(security): anchor the Undici override to an exact root floor
seonghobae e2c0c2d
test(security): bind exact root floor and npm package locations
seonghobae dd93f96
ci(pr783): import exact npm 10.9.8 lock artifact
seonghobae dd8d1ac
fix(score): align PDF.js boundary with 6.2.108 API
seonghobae 988dc1d
test(score): prove the supported data-only PDF.js boundary
seonghobae a39e37f
docs(security): record the supported PDF.js 6.2.108 boundary
seonghobae 6b753e6
docs(changelog): describe the supported patched PDF boundary
seonghobae b773653
ci(pr783): rerun lock import after supported API repair
seonghobae 01cb39e
ci(pr783): publish the verified lock from the bounded importer
seonghobae ad558ac
ci(pr783): fetch complete lineage for verified lock publication
seonghobae 83865dc
fix(security): import verified npm 10.9.8 lock
github-actions[bot] e6b48ca
test(ci): preserve canonical npm provenance formatting
seonghobae 3edf173
ci(pr783): diagnose Ruff import ordering
seonghobae 2345219
style(ci): normalize security test imports
seonghobae dc7e8b4
style(ci): normalize npm provenance test imports
seonghobae c5ee630
chore(ci): remove completed Ruff diagnostic
seonghobae f0c9ad1
ci(pr783): finalize exact Ruff formatting
seonghobae 102a89f
chore(ci): remove temporary branch writer
seonghobae d4887ec
style(test): apply Ruff formatting to security contracts
seonghobae 459abdd
style(test): finish Ruff formatting for npm provenance
seonghobae ace4257
fix(security): refresh vulnerable npm transitive pins
seonghobae 63d0ae6
fix(deps): restore manifest-lock consistency
seonghobae 6bba612
ci: add one-shot canonical lock repair for PR 783
seonghobae ef938fa
fix(deps): regenerate canonical npm 10.9.8 lock
github-actions[bot] a48ff96
ci: retrigger exact-head validation after canonical lock generation
seonghobae fd9389a
ci: add one-shot Ruff formatter for PR 783
seonghobae afba132
style(test): apply canonical Ruff formatting
github-actions[bot] e214e96
ci: retrigger exact-head validation after canonical Ruff formatting
seonghobae 0cd6836
fix(test): verify canonical hoisted PDF.js lock record
seonghobae f4a5a19
ci: add final one-shot Ruff formatter for PR 783
seonghobae 219267e
style(test): apply final canonical Ruff formatting
github-actions[bot] db7b1c1
chore(ci): retrigger exact-head protected checks
seonghobae f4d8850
fix(ci): validate npm lock without mutable resolution
seonghobae 8a143ab
test(supply-chain): format npm toolchain contract
seonghobae b3ac826
test(supply-chain): satisfy ruff formatting gate
seonghobae 885c037
test(supply-chain): format npm toolchain contract
seonghobae de0cd6b
test(supply-chain): apply repository Ruff width
seonghobae f3cfae4
docs(security): align npm lock provenance with frozen validation
seonghobae de75178
fix(ci): disable persisted checkout credentials
seonghobae 164e6f2
docs(changelog): correct UI test coverage claim
seonghobae 07c1dd2
test(lock): reject esbuild peer metadata drift
seonghobae ad4551b
docs(lock): record esbuild metadata sentinel
seonghobae 6f81f52
docs(changelog): record lock metadata drift gate
seonghobae 6665f02
fix(security): make PDF XML boundary explicit
seonghobae bf5a3a3
test(security): lock down PDF parser options
seonghobae c65f5b1
docs(security): record PDF parser hardening evidence
seonghobae dae5d3c
docs(security): correct PDF.js advisory attribution
seonghobae afdecc5
test(build): require coordinated Node 22.22.2 and jsdom 30 floor
seonghobae 1dbe037
test(build): align Node floor contract with canonical npm generator
seonghobae 66c97c2
merge: stack Node compatibility migration on dependency baseline
seonghobae 32cf47c
build(node): raise supported Node 22 floor
seonghobae f74beb0
build(deps-dev): adopt jsdom 30 on coordinated Node floor
seonghobae 2affed5
docs(build): publish Node 22.22.2 minimum
seonghobae 65d199d
test(build): align npm provenance with Node compatibility floor
seonghobae c721cee
test(build): require explicit minimum-Node npm bootstrap lane
seonghobae fcb0b27
ci(build): add exact Node 22.22.2 compatibility lane
seonghobae aa527bb
test(build): audit canonical runtime documentation paths
seonghobae 5b50c59
test(ci): prevent pre-bootstrap npm cache discovery
seonghobae 783112b
fix(ci): bootstrap canonical npm before cache discovery
seonghobae e004765
docs(build): reconcile Node floor with npm generator provenance
seonghobae b3a3c91
test(ci): require setup-node automatic cache opt-out
seonghobae feb4136
fix(ci): disable setup-node auto cache before npm bootstrap
seonghobae a256606
test(node): require Corepack npm bootstrap and lock provenance
seonghobae 9eb5c10
fix(node): harden npm bootstrap and capture lock provenance
seonghobae 6f5d1e4
test(node): assert direct workspace jsdom resolution
seonghobae 0766cdb
fix(ci): keep Node floor lane frozen-install only
seonghobae 8596bd1
fix(ci): satisfy workflow supply-chain baseline
seonghobae ce45742
test(ci): preserve credential-free lock validation in node floor
seonghobae c07e516
fix(ci): inherit credential-free lock validation
seonghobae 76f0953
chore(node): reconstruct compatibility lane on protected develop
seonghobae 5108c9a
fix(node): inherit protected npm runtime authority
seonghobae 8e6a738
docs(node): align npm provenance with raised runtime floor
seonghobae 32bbb8b
build(deps-dev): bump eslint from 10.8.1 to 10.9.1
dependabot[bot] fc3d1ec
chore(node): restack npm compatibility owner on protected develop
seonghobae f52dc97
⚡ Bolt: [performance improvement] Replace O(N^2) list membership chec…
seonghobae 0725eb3
repair(ci): drop superseded chart note from Ruff owner
seonghobae 1d38e8e
repair(ci): return chart optimization to canonical owner
seonghobae a7b0030
repair(ci): restore protected chart bytes exactly
seonghobae 340b0a3
Trigger CI retry
seonghobae 8488a02
Trigger CI retry
seonghobae 8fe6b6d
Trigger CI retry
seonghobae 2a581dd
build(node): generate canonical jsdom and eslint lock
seonghobae de67a0d
chore(node): reconcile consolidated protected workflows
seonghobae 1a27cc3
chore(ci): integrate canonical Ruff repair
seonghobae d0738d7
test(node): require bounded fail-closed npm activation
seonghobae da536ed
fix(node): add bounded pinned npm runtime acquisition
seonghobae 05dba77
fix(build): retry exact Corepack npm acquisition
seonghobae b780be8
test(node): align provenance contract with bounded activation helper
seonghobae 0a01aeb
docs(node): record bounded pinned npm acquisition RCA
seonghobae fa73542
test(node): execute bounded npm acquisition failure paths
seonghobae 8e0b361
test(node): prove bounded npm acquisition success and exhaustion
seonghobae 4b64860
test(node): reject retries for npm signature failures
seonghobae 02ae089
fix(node): fail fast on npm provenance errors
seonghobae 61713a2
fix(node): recognize current Corepack signature failure
seonghobae 3983dd2
docs(node): classify npm acquisition trust failures
seonghobae b8fcb79
test(build): fail closed on unclassified npm acquisition errors
seonghobae 9c39c2a
fix(build): retry only admitted npm acquisition timeouts
seonghobae 68f71e0
test(build): classify retry fixture as ETIMEDOUT
seonghobae f7341ee
docs(traceability): fail closed on unknown Corepack failures
seonghobae b025062
repair(scope): release baseline and formatter ownership
seonghobae 3292884
test(node): require canonical npm activation in minimum lane
seonghobae 97042e1
fix(ci): reuse pinned npm activation in minimum Node lane
seonghobae 3b6ddce
docs(traceability): record single npm activation owner
seonghobae e2420be
test(node): align minimum-lane contract with npm activation owner
seonghobae 4830abb
test(node): expose duplicate CI npm activation owners
seonghobae 99b0707
fix(ci): centralize npm activation in registered CI
seonghobae c010a66
docs(node): trace registered CI activation ownership
seonghobae b5dc5bf
merge(ci): inherit canonical supply-chain formatter prerequisite
seonghobae 78bcc37
fix(node): align activation regressions with stacked CI owner
seonghobae 636b477
docs(node): record lint RCA and canonical prerequisite stack
seonghobae 5c60103
docs(node): preserve CI visibility across prerequisite ancestry
seonghobae 81d7cd9
ci(python): emit Ruff formatter diff on gate failure
seonghobae 239bfc7
fix(node): format npm runtime regression tests
seonghobae 984d038
docs(node): record exact-head Ruff failure repair
seonghobae 8507c21
fix(node): keep activation index lint-compatible
seonghobae 2d9428c
docs(node): record lint-width repair
seonghobae 86b51c6
test(node): align CI provenance contract with activation helper
seonghobae fb73bc9
test(node): require integrity-bound npm packageManager locator
seonghobae 29361c9
fix(node): integrity-pin npm 10.9.9 for Corepack
seonghobae f0a0c42
fix(node): require integrity-bound npm Corepack locator
seonghobae bbcdd31
test(node): exercise hashed npm locator in activation harness
seonghobae 8feed8a
test(node): keep nontransient failures on hashed npm locator
seonghobae ae07856
test(node): bind npm toolchain contract to artifact integrity
seonghobae 347530b
docs(traceability): record npm artifact integrity pin
seonghobae ff14b04
test(node): discover every npm-consuming workflow
seonghobae ce4d526
test(node): tolerate reusable workflow call jobs
seonghobae 6719ead
docs(node): trace workflow npm consumer discovery
seonghobae 628aa96
test(ci): reject inline npm runtime activation
seonghobae 2ddd8b1
fix(ci): route release npm activation through canonical helper
seonghobae ab04754
fix(ci): route security npm activation through canonical helper
seonghobae df20e63
test(ci): cover every direct npm workflow invocation
seonghobae 8113cbf
docs(traceability): record canonical npm activation path
seonghobae 190a052
style(ci): apply canonical ruff formatting
seonghobae a41a2e5
style(ci): format npm integrity regression
seonghobae 6366eb6
style(ci): format npm toolchain regression
seonghobae 8eb47f7
docs(traceability): record npm gate RCA and formatter repair
seonghobae a990e7c
test(ci): remove legacy inline npm activation fallback
seonghobae a7500e3
docs(traceability): align npm policy regressions
seonghobae 19ddd51
test(ci): expose shell-wrapped npm consumer blind spots
seonghobae dc726ef
fix(ci): detect npm behind shell control flow
seonghobae 8f03e7f
docs(traceability): record shell npm admission boundary
seonghobae bc26032
test(node): reject mixed integrity timeout acquisition failure
seonghobae 4cee8f5
fix(node): prioritize provenance failures over timeout retry
seonghobae 61195d9
docs(node): trace mixed Corepack failure precedence
seonghobae 237ff47
test(node): catch shell continuation npm command bypass
seonghobae eee83e3
fix(node): normalize shell continuations before npm admission
seonghobae 6763d91
docs(node): trace shell continuation npm admission repair
seonghobae 2a08003
fix(node): keep npm classifier compatible with macOS bash
seonghobae e3ecc44
test(node): keep package-manager integrity assertion in its owner
seonghobae 4974765
test(node): lock portable npm timeout classification
seonghobae c37835f
docs(node): trace hosted npm classifier portability repair
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| name: node-minimum-compatibility | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - develop | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| EXPECTED_NPM_VERSION: "10.9.8" | ||
|
|
||
| jobs: | ||
| node-minimum-compatibility: | ||
| name: gate / build / node-minimum-compatibility | ||
| runs-on: macos-15 | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: 22.22.2 | ||
| package-manager-cache: false | ||
| - name: Bootstrap exact repository npm generator | ||
| shell: bash | ||
| run: | | ||
| mkdir -p "$RUNNER_TEMP/corepack-bin" | ||
| corepack enable npm --install-directory "$RUNNER_TEMP/corepack-bin" | ||
| corepack install | ||
| echo "$RUNNER_TEMP/corepack-bin" >> "$GITHUB_PATH" | ||
| test "$(PATH="$RUNNER_TEMP/corepack-bin:$PATH" npm --version)" = "$EXPECTED_NPM_VERSION" | ||
| - name: Generate exact lockfile provenance candidate | ||
| id: npm_lock | ||
| shell: bash | ||
| run: | | ||
| npm install --package-lock-only --ignore-scripts --no-audit --no-fund | ||
| if git diff --quiet -- package-lock.json; then | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| - name: Upload lockfile drift evidence | ||
| if: steps.npm_lock.outputs.changed == 'true' | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: node-minimum-package-lock-candidate | ||
| path: package-lock.json | ||
| retention-days: 1 | ||
| - name: Verify committed lock matches exact generator | ||
| run: git diff --exit-code -- package-lock.json | ||
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: "3.12" | ||
| - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | ||
| with: | ||
| version: "0.8.6" | ||
| enable-cache: false | ||
| - name: Install stable Rust toolchain | ||
| run: rustup toolchain install stable --profile minimal | ||
| - name: Install frozen Node dependencies | ||
| run: npm ci | ||
| - name: Sync frozen Python dependencies | ||
| run: uv sync --project services/analysis-engine --group dev --frozen | ||
| - name: Build and install Rust numeric extension | ||
| shell: bash | ||
| run: | | ||
| VENV_PY="$PWD/services/analysis-engine/.venv/bin/python" | ||
| uvx maturin@1.9.6 build --release \ | ||
| --manifest-path services/analysis-engine/rust/Cargo.toml \ | ||
| --interpreter "$VENV_PY" \ | ||
| --out services/analysis-engine/rust/dist | ||
| uv pip install --python "$VENV_PY" services/analysis-engine/rust/dist/*.whl | ||
| - name: Lint | ||
| run: npm run lint | ||
| - name: Typecheck | ||
| run: npm run typecheck | ||
| - name: Test with measured coverage | ||
| run: npm run test | ||
| - name: Build production workspaces | ||
| run: npm run build | ||
| - name: Build Storybook | ||
| run: npm run build-storybook --workspace @bandscope/desktop | ||
| - name: Check Tauri shell | ||
| run: cargo +stable check --manifest-path apps/desktop/src-tauri/Cargo.toml --locked | ||
| - name: Test Tauri shell | ||
| run: cargo +stable test --manifest-path apps/desktop/src-tauri/Cargo.toml --locked | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import { beforeEach, describe, expect, it, vi } from "vitest"; | ||
| import { getDocument, GlobalWorkerOptions } from "pdfjs-dist"; | ||
| import { configureScorePdfWorker, loadScorePdf } from "./pdfjs"; | ||
|
|
||
| vi.mock("pdfjs-dist", () => ({ | ||
| getDocument: vi.fn(() => ({ promise: Promise.resolve(), destroy: vi.fn() })), | ||
| GlobalWorkerOptions: { workerSrc: "" } | ||
| })); | ||
|
|
||
| vi.mock("pdfjs-dist/build/pdf.worker.min.mjs?url", () => ({ | ||
| default: "/assets/pdf.worker.min.mjs" | ||
| })); | ||
|
|
||
| describe("score PDF.js boundary", () => { | ||
| beforeEach(() => { | ||
| vi.mocked(getDocument).mockClear(); | ||
| GlobalWorkerOptions.workerSrc = ""; | ||
| }); | ||
|
|
||
| it("uses the locally bundled worker asset", () => { | ||
| configureScorePdfWorker(); | ||
|
|
||
| expect(GlobalWorkerOptions.workerSrc).toBe("/assets/pdf.worker.min.mjs"); | ||
|
|
||
| configureScorePdfWorker(); | ||
| expect(GlobalWorkerOptions.workerSrc).toBe("/assets/pdf.worker.min.mjs"); | ||
| }); | ||
|
|
||
| it("copies validated bytes through the hardened data-only API", () => { | ||
| const source = new Uint8Array([0x25, 0x50, 0x44, 0x46]); | ||
|
|
||
| loadScorePdf(source); | ||
|
|
||
| expect(getDocument).toHaveBeenCalledTimes(1); | ||
| const parameters = vi.mocked(getDocument).mock.calls[0]?.[0]; | ||
| expect(parameters).toBeTypeOf("object"); | ||
| expect(Object.keys(parameters as object)).toEqual([ | ||
| "data", | ||
| "enableXfa", | ||
| "useWorkerFetch" | ||
| ]); | ||
| const hardenedParameters = parameters as { | ||
| data: Uint8Array; | ||
| enableXfa: boolean; | ||
| useWorkerFetch: boolean; | ||
| }; | ||
| expect(hardenedParameters.data).toEqual(source); | ||
| expect(hardenedParameters.data).not.toBe(source); | ||
| expect(hardenedParameters.enableXfa).toBe(false); | ||
| expect(hardenedParameters.useWorkerFetch).toBe(false); | ||
| }); | ||
| }); |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.