Repository navigation
fix(deps): upgrade open to 11 and @oclif/core to 4.14 to clear Snyk findings - #286
Conversation
The next commit changes both files, and lint-staged runs eslint --fix on every staged file, so their existing errors would block it. eslint --fix: indentation, quote style, let to const, Array<T> to T[]. By hand: drop an unused catch parameter, wrap two JSDoc lines, and add eslint-disable-next-line for long user-facing strings, one URL and the require() of the user's config file, so none of that text or behaviour changes. No functional change. .talismanrc gets a checksum entry for base-class.ts: Talisman flags the moved "key" type annotations (parseEnvVariablesString, envKeys) as potential secrets; they are not. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…indings
open@8.4.2 (SNYK-JS-OPEN-22112123, High) is fixed only in open 11, which
is ESM-only. The CLI compiles to CommonJS, where TypeScript turns import()
into require(), so the three browser-open call sites now go through
util/open-url.ts, which loads open with a native dynamic import. The
GitHub-connect step and launch:open await it, so the process cannot exit
before the browser starts; the delayed deployment-URL open keeps its
fire-and-forget timer. Opening the browser stays best effort: open 11
rejects when the launcher fails, and every caller prints the URL first,
so openUrl swallows that instead of failing the command (or crashing
with an unhandled rejection after a successful deploy).
@oclif/core moves from 4.11.14 to 4.14.0 within the existing ^4.2.7 range
(lockfile only). 4.14 uses ejs 6, which drops the ejs > jake > filelist >
minimatch@5.1.9 path behind SNYK-JS-MINIMATCH-22111072. An override pins
@oclif/core's own minimatch to ^11.0.1, as on v2-dev.
Two findings remain reported, not ignored. Neither has an upgrade, so
neither fails --fail-on=all: adm-zip@0.6.1 (SNYK-JS-ADMZIP-21707815), and
open@8.4.2 pulled in by @contentstack/cli-utilities, whose latest release
(2.0.2) still depends on open ^8.4.2.
Integration tests now mock util/open-url instead of open, and stub
@oclif/core's getPlatform, which 4.14 implements with a native
import('wsl-utils') that Jest's VM cannot run.
.talismanrc: base-class.ts checksum refreshed for its new content.
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
…un from a hook Git exports GIT_DIR and the other repo-local variables to hooks, and the pre-push hook runs npm test. With them set, the harness's git init, config, commit and remote add in its temp projects acted on this repository: a push from a worktree left "initial commit" commits on the branch and set user.name, user.email, commit.gpgsign and core.bare in the shared .git/config. jest.global-setup.ts now clears the variables `git rev-parse --local-env-vars` lists. It runs in Jest's parent process, so the child processes the harness and the CLI spawn inherit the clean environment (setupFiles only change the sandbox's copy of process.env). #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
dhruv-parekh-cs
left a comment
There was a problem hiding this comment.
Reviewed the whole PR (9a39697).
- Low
package.json:26(off-diff):@oclif/corestays^4.2.7, so the 4.14 Snyk fix is lockfile-only and the rootoverridesdon't apply to plugin installs; an install that keeps an existing 4.11.x still has the flagged path. Fix: raise the range to^4.14.0.
Not approved: 6 low findings open (more than 3).
— 🤖 launch-pr-review-agent (Claude)
Generated by Claude Code
- open-url.ts: create the dynamic importer lazily inside openUrl's try. Built at module load, new Function threw EvalError under --disallow-code-generation-from-strings, so every command importing the helper crashed instead of just not opening a browser. - openUrl takes an optional loader, and the tests inject a fake open to cover the success path (called with the URL) plus both failure paths, instead of relying on Jest's VM rejecting the native import. - Drop the code comments added in this PR (AGENTS.md: no code comments); the rationale lives in the commit messages and the PR description. - AGENTS.md: the integration harness now replaces src/util/open-url and @oclif/core's getPlatform rather than the open package, and jest.global-setup.ts clears git's repo-local env vars. - @oclif/core range raised to ^4.14.0 so installs cannot keep a 4.11.x that still carries the flagged minimatch path. - package-lock.json: restore the 23 "libc" fields npm 10 dropped, copied from development for the same package versions. npm 11 (release CI) re-resolves the file without changes. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
|
/ship 2b summary (re: @dhruv-parekh-cs's review of
Left for human: none. Inline threads: 6 replied and resolved. Checks: Next: needs re-approval. |
dhruv-parekh-cs
left a comment
There was a problem hiding this comment.
Re-review since 9a39697 (commit 081d551).
All six earlier findings are fixed at this head: the importer is created inside the try, the comments are gone, the success path is tested, the AGENTS.md harness section is updated, the libc fields are restored, and @oclif/core is ^4.14.0.
2 new low findings are inline. Approved: no high or medium finding is open, and 2 lows are open (the limit is 3).
— 🤖 launch-pr-review-agent (Claude)
Generated by Claude Code
- AGENTS.md: the "all run for real" sentence had been joined onto the new git-env bullet; it closes the "Only these are replaced" bullet again, so the harness contract reads as before. - open-url.test.ts: the failure-path tests now keep the happy path's assertions (AGENTS.md: do not skip assertions in edge-case tests). The load-failure test checks the loader was called; the open-failure test checks open was called with the URL. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
dhruv-parekh-cs
left a comment
There was a problem hiding this comment.
Re-review since 081d551 (commit ccdb47a).
Both lows from the last review are fixed: the "run for real" sentence is back on the replaced-modules bullet, and the edge-case tests now assert the loader and open calls.
No new findings. Approved.
— 🤖 launch-pr-review-agent (Claude)
Generated by Claude Code
What
Clears the Snyk pre-commit gate on
development(snyk test --fail-on=all), which currently blocks every V1 commit.src/util/open-url.ts, which loads it with a native dynamic import. The GitHub-connect step andlaunch:openawait it (on Windows, open 11 must finish before the process exits). Opening stays best effort: every caller prints the URL first, so a failure is ignored instead of failing the command.^4.2.7): drops theejs > jake > filelist > minimatch@5.1.9path (SNYK-JS-MINIMATCH-22111072). Adds the@oclif/core > minimatch ^11.0.1override already on v2-dev.@contentstack/cli-utilities(CLI team's package; its latest, 2.0.2, still pins^8.4.2).The first commit (
style:) is lint-only: lint-staged runseslint --fixon staged files, andbase-class.ts/open.tshad existing errors. No functional change, so review the second commit for the fix..talismanrcgets a checksum entry forbase-class.ts(false positives onkeytype annotations).The third commit (
test:) fixes the integration harness when it runs from the pre-push hook: git exportsGIT_DIRto hooks, so the harness'sgit init/config/commit/remote addin its temp projects hit this repository instead (junk commits, anduser.*/core.barewritten to.git/config).jest.global-setup.tsnow clears git's repo-local env vars.Tests
snyk test --all-projects --fail-on=allpassesnpm test: unit + Jest 140 passed, integration 31 passed (new unit test for the best-effort path)util/open-urlinstead ofopen, and stub @oclif/core'sgetPlatform(4.14 calls a nativeimport('wsl-utils')that Jest's VM can't run)openUrlrun in plain Node 22: loads open 11 and opens the browser#claude_code#
🤖 Generated with Claude Code