Skip to content

SEC-6539 use exact 2.5.2 on jest canvas lib per guidance - #33

Closed
dep wants to merge 6 commits into
mainfrom
SEC-6539/jestVuln
Closed

SEC-6539 use exact 2.5.2 on jest canvas lib per guidance#33
dep wants to merge 6 commits into
mainfrom
SEC-6539/jestVuln

Conversation

@dep

@depdep commented Jul 13, 2026

Copy link
Copy Markdown

Pins jest-canvas-mock to exact 2.5.2 per security guidance (SEC-6539).

Replaces prometheus#19176, which was accidentally opened against upstream prometheus/prometheus instead of this fork.

CopilotAI review requested due to automatic review settings July 13, 2026 13:51

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins the jest-canvas-mock devDependency to an exact version (2.5.2) in the web UI workspace, aligning with the referenced security guidance (SEC-6539).

Changes:

  • Update web/ui/package.json to pin jest-canvas-mock to exactly 2.5.2 (no caret range).
  • Update web/ui/package-lock.json accordingly (but includes substantial additional lockfile churn).
  • Remove catalog-info.yaml from the repo root.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
web/ui/package.jsonPins jest-canvas-mock to an exact version for security guidance compliance.
web/ui/package-lock.jsonReflects the pinned dependency, but also includes many unrelated lockfile metadata changes.
catalog-info.yamlDeleted Backstage catalog metadata file (not mentioned in PR description).
Files not reviewed (1)
  • web/ui/package-lock.json: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 14 to 21
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^20.14.9",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-prettier": "^4.2.1",
"jest-canvas-mock": "^2.5.2",
"jest-canvas-mock": "2.5.2",
"jest-fetch-mock": "^3.0.3",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cursor can you fix that for me?

@cursorcursorBotJul 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The lockfile had been regenerated with a newer npm (Node 22 / npm 10), which rewrote many "peer": true flags across the tree.

I restored web/ui/package-lock.json from main and re-ran npm install with the repo’s expected toolchain (Node v20.5.1 / npm v9.8.0 per web/ui/.nvmrc). The PR diff vs main is now only the intended pin:

FileChange
web/ui/package.jsonjest-canvas-mock: ^2.5.22.5.2
web/ui/package-lock.jsonsame single-line spec change

No unrelated peer-dependency churn remains. Pushed in commit 5d25ca9c5.

Open in WebOpen in Cursor

Restore lockfile from main and re-run npm install with the repo's
expected Node/npm versions to avoid unrelated peer dependency churn.
Only the jest-canvas-mock exact version pin changes.
Co-authored-by: Danny Peck <dannypeck@gmail.com>
@depdep closed this Jul 21, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dep@cursoragent