Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "test-repo",
"private": true,
"type": "module",
"name": "test-pkg",
"version": "1.0.0",
"scripts": {
"test": "vitest run"
}
"postinstall": "echo CANARY_MARKER > /tmp/postinstall-canary.txt"
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removal of test script breaks existing test suite

Medium Severity

The "test": "vitest run" script was removed and replaced with only the postinstall canary script. The test infrastructure still exists (test/math.test.ts imports from vitest), so npm test will now fail instead of running the existing test suite. The "type": "module" field was also removed, which may affect module resolution for the existing TypeScript source files.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1d25573. Configure here.

"dependencies": {}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Smoke-test content overwrites project's production package.json

High Severity

The project's root package.json has been completely replaced with smoke-test-specific content. The postinstall canary script (echo CANARY_MARKER > /tmp/postinstall-canary.txt) is test scaffolding that now lives permanently in the main package.json. Anyone running npm install (without --ignore-scripts) will have this script execute and write to /tmp/. The smoke test content likely belongs in a temporary or fixture-specific package.json, not the project root.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1d25573. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removing private flag risks accidental npm publication

Medium Severity

The "private": true field was removed from package.json. This guard prevented accidental publication to the npm registry. Without it, running npm publish would attempt to publish the package (now named test-pkg with version 1.0.0) to the public registry.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1d25573. Configure here.

}