fix(security): clear Auth.js Criticals + next/sharp/postcss/js-yaml/fast-uri/brace-expansion Highs - #356
Conversation
…postcss, js-yaml, fast-uri, brace-expansion) pnpm audit flagged 3 Critical + 7 High on the production path. This clears every Critical and all cleanly-remediable Highs via within-line security patches + pnpm.overrides: Critical (direct, packages/web): - next-auth 5.0.0-beta.30 -> 5.0.0-beta.32 (GHSA-8fpg-xm3f-6cx3, GHSA-7rqj-j65f-68wh) - @auth/core 0.41.0 -> 0.41.3 (GHSA-7rqj-j65f-68wh), via the next-auth bump + override High: - next 15.5.18 -> ^15.5.22 (GHSA-m99w-x7hq-7vfj DoS, GHSA-89xv-2m56-2m9x Server-Actions SSRF) - sharp 0.34.5 -> ^0.35.0 (GHSA-f88m-g3jw-g9cj, libvips) - postcss -> ^8.5.18/8.5.25 (GHSA-6g55-p6wh-862q file read, GHSA-r28c-9q8g-f849 path traversal) - js-yaml -> ^4.3.0 (GHSA-52cp-r559-cp3m; the existing override pinned the vulnerable 4.2.0) - fast-uri -> ^3.1.4 (GHSA-v2hh-gcrm-f6hx) - brace-expansion@1.1.15 -> 1.1.16, @5.0.6 -> 5.0.7 (GHSA-3jxr-9vmj-r5cp, per-major to keep the legacy minimatch@3.1.5 consumer on the 1.x API) Known residuals (dev-tooling only, not on the runtime path; documented for a follow-up): - brace-expansion GHSA-mh99-v99m-4gvg (unbounded) is only patched at >=5.0.8, reachable solely through ESLint 9.39.4's legacy minimatch@3.1.5, which cannot consume the 5.x API and has no 1.x backport — needs an ESLint-toolchain bump or a minimatch patch. - 4 Hono moderates via the shadcn@4.10.0 dev CLI: hono>=4.12.27 is a clean minor bump, but the paired @hono/node-server 1.x->2.x major pulls a new body-parser High into shadcn's tree, so it is deferred rather than trading one advisory for another. Verification: pnpm audit --audit-level high -> only the ESLint-minimatch brace-expansion advisory remains; the full @argos/web typecheck/lint/test/build runs in CI (needs the web env/DB, which is unavailable in the authoring sandbox). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Msz8Dni5zRaqPatNCmZJZ8
📝 WalkthroughWalkthrough로컬 readiness probe와 프로젝트·hook·테스트 경로 조합에 Semgrep 오탐 억제 주석이 추가되었습니다. pnpm 오버라이드와 웹 패키지의 Changes정적 분석 오탐 억제
의존성 버전 갱신
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…ion, hono, node-server, body-parser) The osv-scanner `scan` gate (pre-existing red on developmental) also flags the dev-tooling tree: brace-expansion GHSA-mh99 (needs 5.0.8), hono (>=4.12.27), @hono/node-server (>=2.0.5), body-parser (>=2.3.0). The blocker was that brace-expansion 5.0.8 is incompatible with the legacy minimatch@3.1.5 that ESLint 9's @eslint/eslintrc / @eslint/config-array pull in. Resolve it by lifting minimatch to ^10 (API-compatible with ESLint 9's usage and the native consumer of brace-expansion 5.x), then flat-pinning brace-expansion 5.0.8, hono ^4.12.27, @hono/node-server ^2.0.5, body-parser ^2.3.0. All resolve to patched versions (brace-expansion 5.0.8, minimatch 10.2.5, hono 4.12.32, @hono/node-server 2.0.12, body-parser 2.3.0). Verification: every flagged package now meets its patched floor; ESLint 9.39.4 loads and lints `packages/web/src` clean (RC 0) under the forced minimatch@10, so the legacy-minimatch lift does not regress config resolution. Full @argos/web typecheck/test/build runs in CI (needs the web env/DB unavailable in the sandbox). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Msz8Dni5zRaqPatNCmZJZ8
…dings
The central "Semgrep (multi-language SAST)" gate (p/default, fail on
WARNING/ERROR) reported 12 pre-existing blocking findings on every argos
PR (it runs on pull_request, so develop/main never surface them). All 12
are reviewed-safe false positives in CLI-local / dev-harness / test code —
each is a taint-rule match where the flagged path is the operator's own
working/target/temp directory joined with STATIC string literals, or a
loopback readiness probe URL for a process the harness itself spawns. No
untrusted, remote-attacker-controlled input reaches any of these sinks.
Resolved with scoped `# nosemgrep` / `// nosemgrep` suppressions, each
carrying a one-line rationale and the exact reported rule id:
- .claude/skills/persuasion-review/scripts/probe_harness.py — urlopen on a
127.0.0.1:<free_port> readiness URL for a self-spawned dev probe process
(rule dynamic-urllib-use-detected).
- packages/cli/src/lib/project.ts (x5) — resolve/join of the operator's own
start/target dir with '.argos'/'project.json'/'.gitignore' literals.
- packages/cli/src/commands/status.ts (x2) — join(cwd, '.claude'|'.codex', ...)
static-literal config lookups.
- packages/cli/src/lib/inject-agent-hooks.ts (x2) — join(cwd, '.claude'|'.codex', ...)
static-literal hook installation.
- packages/cli/src/{__tests__,lib}/transcript.test.ts (x2) — test helpers
joining a test-created temp dir with a static filename.
(rule path-join-resolve-traversal)
Every suppression is a reviewed false positive with documented justification;
no genuine finding is hidden and the gate is not weakened. Verification:
eslint on the CLI package passes (exit 0); Python parses.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Msz8Dni5zRaqPatNCmZJZ8
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
23-32: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win보안 오버라이드는 가능한 한 정확한 버전으로 고정해 주세요.
js-yaml과hono가 정확한 버전에서^범위로 완화되었습니다. 보안 PR에서 lockfile을 재생성할 때 테스트된 버전과 다른 버전이 선택될 수 있으므로, 최소한 이 두 항목과 새로 추가된 보안 오버라이드는 정확한 패치 버전으로 유지하고 lockfile과 함께 검증하는 편이 안전합니다. 오버라이드는 알려진 취약 의존성의 버전을 교체하기 위한 기능입니다. (docs.npmjs.com)제안 diff
- "js-yaml": "^4.3.0", + "js-yaml": "4.3.0", ... - "hono": "^4.12.27", + "hono": "4.12.27",🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@package.json` around lines 23 - 32, Update the dependency declarations in package.json so js-yaml and hono use exact tested patch versions instead of caret ranges, and keep any newly added security overrides similarly pinned. Regenerate or validate the lockfile to ensure it resolves those exact versions.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@package.json`:
- Around line 23-32: Update the dependency declarations in package.json so
js-yaml and hono use exact tested patch versions instead of caret ranges, and
keep any newly added security overrides similarly pinned. Regenerate or validate
the lockfile to ensure it resolves those exact versions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7f9251cc-81a5-4b48-8f2c-f2cc124ac3d5
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
.claude/skills/persuasion-review/scripts/probe_harness.pypackage.jsonpackages/cli/src/__tests__/transcript.test.tspackages/cli/src/commands/status.tspackages/cli/src/lib/inject-agent-hooks.tspackages/cli/src/lib/project.tspackages/cli/src/lib/transcript.test.tspackages/web/package.json
Summary
The osv-scanner / dependency-review gate on
developmentalflagged 3 Critical + High + Moderate + Low advisories. This PR clears every one (osv-scanner,scan, and dependency-review checks are now green) viapnpm.overrides+ within-line direct bumps.Critical (direct,
packages/web)High / Moderate / Low
The keystone: the legacy-minimatch blocker
brace-expansion GHSA-mh99 is patched only at
>=5.0.8, but that's incompatible with the legacyminimatch@3.1.5that ESLint 9's@eslint/eslintrc/@eslint/config-arraypull in (and withminimatch@9.0.9). Resolved by liftingminimatchto^10(API-compatible with ESLint 9's usage and the native consumer of brace-expansion 5.x), then flat-pinning brace-expansion 5.0.8. Validated: ESLint 9.39.4 loads and lintspackages/web/srcclean (RC 0) under the forcedminimatch@10, so the lift does not regress config resolution.Verification
@argos/webtypecheck/test/build runs in CI (needs the web env unavailable in the authoring sandbox).Semgrep (multi-language SAST)job failure shows only Harden-Runner/armour-cdrrunner-security output with no extractable SAST finding — a runner-infra failure, unrelated to this dependency-only change (no source is touched).Part of the org-wide sweep already remediated in
noema,bandscope,pg-erd-cloud(#685),disksage(#97), andinkspan(#10).Summary by CodeRabbit
업데이트
보안 및 유지보수