Skip to content

Recheck @anthropic-ai/sdk advisory waiver after #614 (target: 2026-05-23) #619

Closed

Description

@admarble

Context

#614 / #615 resolved Cluster 1 of the recent npm audit findings (fast-uri, ip-address, express-rate-limit). Cluster 2 — the @anthropic-ai/sdk Local Filesystem Memory Tool advisory (GHSA-p7fg-763f-g4gf, vulnerable range >=0.79.0 <0.91.1) — was waived because:

  1. The memory tool is unused in this repo (grep -rE 'memoryTool|MemoryTool|memory_tool|memory-tool' src/ bin/ scripts/ → 0 hits; only query() is consumed by src/lib/workflow/drivers/claude-code.ts).
  2. The parent @anthropic-ai/[email protected] (latest published as of 2026-05-09) pins ^0.81.0 of @anthropic-ai/sdk, which cannot resolve out of the vuln range under semver — Option C (package.json overrides) was rejected because the entry would be reverted as soon as upstream bumps its dep range.

This issue tracks the recheck so the waiver doesn't drift into "we forgot."

Recheck (target: 2026-05-23, ~2 weeks)

npm view @anthropic-ai/claude-agent-sdk@latest version dependencies.@anthropic-ai/sdk
npm audit --json | jq '.metadata.vulnerabilities'
Outcome Action
claude-agent-sdk released with @anthropic-ai/sdk pinned to >= 0.91.1 npm update @anthropic-ai/claude-agent-sdk; verify npm audit reports 0 moderate; close this issue.
Still pinned in the vuln range, no upstream movement Reassess: file a Dependabot ecosystem-grouping nudge, or apply package.json overrides as a last resort with explicit waiver-removal date.
New advisory lands in this chain Re-run /assess for fresh triage.

Falsifiability

The waiver hinges on the memory tool being unused. If any future PR adds usage of:

  • @anthropic-ai/sdk's Local Filesystem Memory Tool, or
  • direct @anthropic-ai/sdk imports outside the query() pathway,

re-grep and re-evaluate before merging that PR — the "not exploitable here" claim no longer holds.

Non-Goals

References

Activity

  1. added
    dependencies
    on May 9, 2026
  2. admarble commented on May 10, 2026

    @admarble
    ContributorAuthor

    Interim recheck — 2026-05-09 (14 days before target)

    Ran the diagnostics from the issue body early; outcome is Row 2 of the matrix (still pinned, no upstream movement). Keeping the waiver in place and re-checking on/after 2026-05-23.

    Diagnostics

    $ npm view @anthropic-ai/claude-agent-sdk@latest version dependencies.@anthropic-ai/sdk
    version = '0.2.138'
    dependencies.@anthropic-ai/sdk = '^0.81.0'
    
    $ npm audit --json | jq '.metadata.vulnerabilities'
    {
      "info": 0, "low": 0, "moderate": 2, "high": 0, "critical": 0, "total": 2
    }
    

    Both moderates trace to GHSA-p7fg-763f-g4gf via @anthropic-ai/sdk (range >=0.79.0 <0.91.1) → @anthropic-ai/claude-agent-sdk. Upstream has shipped 10 versions since #614 (0.2.124 → 0.2.138) without moving the @anthropic-ai/sdk pin off ^0.81.0.

    Falsifiability re-check (still holds)

    $ grep -rE 'memoryTool|MemoryTool|memory_tool|memory-tool' src/ bin/ scripts/
    (0 hits)
    
    $ grep -rE "from ['\"]@anthropic-ai/sdk['\"]|require\(['\"]@anthropic-ai/sdk['\"]\)" src/ bin/ scripts/
    (0 hits — only the indirect `query()` pathway via claude-agent-sdk)
    

    Memory tool unused; no direct @anthropic-ai/sdk imports outside query(). Waiver rationale unchanged.

    Action

    • ✅ Keep waiver in place (no package.json overrides — still brittle per the issue's own non-goal).
    • ⏸ Hold this issue open until 2026-05-23; rerun the same commands then.
    • 🔁 If upstream still hasn't moved at that point, escalate per the matrix (Dependabot ecosystem-grouping nudge, or overrides with explicit removal date).

    No code change in this pass.

  3. admarble commented on May 11, 2026

    @admarble
    ContributorAuthor

    → PARK — Date-based recheck tracker; target 2026-05-23. Interim recheck on 2026-05-09 already confirmed Row 2 (no upstream movement) — waiver still valid.

    Resume after: 2026-05-23 (rerun the diagnostic commands from the body).

  4. admarble commented on May 19, 2026

    @admarble
    ContributorAuthor

    /exec progress — recheck complete, matrix Row 1 outcome

    Ran 4 days early (today 2026-05-19, target 2026-05-23). Diagnostics show the tracked advisory is fully resolved upstream — no need to wait the remaining 4 days.

    Diagnostics

    $ npm view @anthropic-ai/claude-agent-sdk@latest version
    0.3.144              ← was 0.2.138 at #614 / 2026-05-09 interim recheck
    
    $ npm ls @anthropic-ai/sdk
    [email protected] ...
    └─┬ @anthropic-ai/[email protected]
      └── @anthropic-ai/[email protected]     ← outside vuln range >=0.79.0 <0.91.1 ✓
    
    $ npm audit --json | jq '.vulnerabilities | keys'
    [ "brace-expansion", "ws" ]        ← @anthropic-ai/sdk gone
    

    Between the 2026-05-09 interim recheck and today, upstream landed @anthropic-ai/[email protected] (a major) which lifted the @anthropic-ai/sdk ^0.81.0 pin. Dependabot's production-deps group bump (#650) already moved this repo onto 0.3.142 before this recheck ran; npm update in this PR takes us to 0.3.144.

    Matrix Row 1 actions

    Step Status
    npm update @anthropic-ai/claude-agent-sdk ✅ Done (0.3.142 → 0.3.144 in lockfile)
    Verify @anthropic-ai/sdk advisory cleared ✅ Done (@anthropic-ai/[email protected] resolved, audit no longer lists it)
    npm audit reports 0 moderate ⚠️ The tracked advisory's moderate is gone; 2 unrelated moderates remain (brace-expansion, ws) — out of scope for #619
    Close this issue 🔄 Will auto-close when PR #666 merges (commit prefixed fix(#619))

    Falsifiability (still holds)

    $ grep -rE 'memoryTool|MemoryTool|memory_tool|memory-tool' src/ bin/ scripts/
    (0 hits)
    
    $ grep -rE "from ['\"]@anthropic-ai/sdk['\"]|require\(['\"]@anthropic-ai/sdk['\"]\)" src/ bin/ scripts/
    (0 hits — only the indirect query() pathway via claude-agent-sdk)
    

    Quality gates

    • npm run build — ✅ clean
    • npm run lint — ✅ clean
    • npx vitest run src/lib/workflow/drivers — ✅ 49/49 (covers the claude-agent-sdk consumer at src/lib/workflow/drivers/claude-code.ts)
    • Full suite skipped per the worktree-vitest-timeout pattern; targeted run on the dep's only direct consumer.

    Out of scope — follow-up needed

    npm audit post-update still reports 2 moderates, both unrelated to GHSA-p7fg-763f-g4gf:

    Package Advisory Range Installed fixAvailable
    brace-expansion GHSA-jxxr-4gwj-5jf2 >=5.0.0 <5.0.6 5.0.2 - 5.0.5 true
    ws GHSA-58qx-3vcg-4xpx >=8.0.0 <8.20.1 8.0.0 - 8.20.0 true

    These should be tracked separately — both look like a simple npm audit fix plus a #614/#615-style verification pass. Not pulling them into #619 because (a) they post-date the waiver this issue tracks, and (b) bundling them would muddy the close criteria.

    PR

  5. admarble commented on May 19, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #619

    Size Gate

    Check Value
    Diff size 231 lines (threshold: 100)
    package.json changed No (lockfile-only)
    Security-sensitive paths No
    Decision Inline checks — diff is CHANGELOG.md + package-lock.json only; zero source code for sub-agents to scan

    Precheck Findings

    Section Status Surfaced
    Fixtures pass 1 fenced block — the npm view / npm audit diagnostic commands from the issue body
    Sibling-grep not_applicable No source-code identifier changes
    AC literal-diff pass No explicit AC checkboxes in body or PR — outcome matrix only

    Source: .sequant/gap-precheck.json (schemaVersion 1)

    Motivating-Example Fixture Verification (Phase 0c → §6c Step 4)

    Ran the issue-body diagnostics against the post-bump tree:

    $ npm view @anthropic-ai/claude-agent-sdk@latest version
    0.3.144
    
    $ npm ls @anthropic-ai/sdk
    └─┬ @anthropic-ai/[email protected]
      └── @anthropic-ai/[email protected]     ← outside vuln range >=0.79.0 <0.91.1 ✓
    
    $ npm audit --json | jq '.metadata.vulnerabilities'
    { "info": 0, "low": 0, "moderate": 2, "high": 0, "critical": 0, "total": 2 }
    
    $ npm audit --json | jq '.vulnerabilities | keys'
    [ "brace-expansion", "ws" ]   ← @anthropic-ai/sdk gone
    

    Verbatim AC fixture matches exec-comment claims. Fixture status: matched.

    AC Coverage

    #619's ACs are implicit (outcome matrix + falsifiability + non-goals). Mapping:

    AC (derived from issue body) Status Notes
    Matrix Row 1: npm update @anthropic-ai/claude-agent-sdk performed MET Lockfile diff: claude-agent-sdk 0.3.142 → 0.3.144 (all 9 platform-binary subpackages bumped consistently); resolved @anthropic-ai/[email protected]
    Matrix Row 1: @anthropic-ai/sdk no longer in vuln range >=0.79.0 <0.91.1 MET Resolved version 0.93.0 is outside the range; advisory no longer appears in npm audit output
    Matrix Row 1: Close this issue PENDING Will auto-close on PR #666 merge (commit d0fd731 prefixed fix(#619):)
    Falsifiability: memory tool still unused MET grep -rE 'memoryTool|MemoryTool|memory_tool|memory-tool' src/ bin/ scripts/ → 0 hits
    Falsifiability: no direct @anthropic-ai/sdk imports outside query() pathway MET grep -rE "from ['\"]@anthropic-ai/sdk['\"]" → 0 hits; only src/lib/workflow/drivers/claude-code.ts imports via claude-agent-sdk
    Non-goal: avoid npm audit fix --force (major bump) MET Plain npm update within ^0.3.142 constraint — no package.json change

    Coverage: 5/6 fully met; 1 pending (auto-close on merge).

    Quality Metrics

    Metric Value Status
    Source files changed 0 OK (lockfile + CHANGELOG only)
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 2 OK
    Lines added +178 -
    Lines deleted -49 -

    CI Status

    Check State Conclusion Impact
    typecheck COMPLETED SUCCESS ✅ MET
    validate-skills COMPLETED SUCCESS ✅ MET
    validate-plugin COMPLETED SUCCESS ✅ MET
    build (20.x) IN_PROGRESS — ⏳ PENDING
    build (22.x) IN_PROGRESS — ⏳ PENDING

    CI Summary: 3 passed, 2 pending, 0 failed.

    Markdown-only CI relaxation does NOT apply — diff includes package-lock.json, which the detector treats as build-affecting. Build matrix is gating because lockfile changes can in principle break dependency resolution at build time (even though typecheck has already confirmed the resolution is sound).

    Code Review

    Strengths:

    • Clean lockfile-only diff — no package.json change because ^0.3.142 already permits 0.3.144. This is the minimal-blast-radius approach for a security-driven bump.
    • Lockfile diff is internally consistent: all 9 @anthropic-ai/claude-agent-sdk-* platform binary subpackages bumped to 0.3.144 in lockstep with the parent.
    • The @anthropic-ai/sdk peer constraint relaxation visible in the diff (^0.93.0 → >=0.93.0) is upstream-driven (it's how [email protected] declared its dep range) — not a project-level decision.
    • Falsifiability clauses from Resolve npm audit findings (5: 4 moderate, 1 high) #614 explicitly re-verified in the exec comment, not just hand-waved.
    • The exec comment is thorough: documents the early-run rationale (4 days before the 2026-05-23 target), explicitly cites chore(deps): bump the production-dependencies group across 1 directory with 5 updates #650 as the prior bump to 0.3.142, and acknowledges the two remaining unrelated moderates instead of glossing them.

    Issues:

    • None blocking. The brace-expansion / ws moderates remain post-update — the exec comment correctly flags them as out of scope, but no follow-up issue has been filed yet (gh issue list --search "brace-expansion" and "ws GHSA-58qx" both return 0). The exec comment commits to "tracked separately" but the tracker hasn't been opened.

    Suggestions:

    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅
    User-facing change ✅ (fix(#619): commit)
    [Unreleased] entry ✅ Present under ### Security
    Entry format ✅ Action verb + issue reference (#619) + GHSA ID + concrete version numbers + falsifiability re-statement

    Result: CHANGELOG requirements met. The entry is unusually thorough — captures the upstream-version chain (0.2.138 → 0.3.142 via #650 → 0.3.144 via this PR), the transitive @anthropic-ai/sdk version, the vuln range, and the two unrelated moderates.

    Risk Assessment

    • Likely failure mode: Lockfile-only patch bump (0.3.142 → 0.3.144) inside an already-installed major; the only realistic breakage path is a regression in claude-agent-sdk's query() API between these two patches. Local npx vitest run src/lib/workflow/drivers (49/49) and npm run build in the exec comment cover this; CI build matrix in progress will confirm cross-Node-version.
    • Not tested: No new tests added — appropriate for a structural dep bump with no logic changes. The existing driver tests cover the only consumer.
    • Sibling sites considered: N/A — cross-file sibling-site scan does not apply (no source-code patterns introduced; the only consumer of the SDK is the single src/lib/workflow/drivers/claude-code.ts file, which was not modified).
    • Sibling-line audit: none — single-file lockfile change, no call-site modifications.

    Adversarial Re-Read

    Findings: No gaps found because: (1) Phase 0c fixture (npm view / npm audit) re-run against the post-bump tree confirms @anthropic-ai/[email protected] is resolved and the GHSA-p7fg-763f-g4gf advisory is gone from npm audit's .vulnerabilities keys; (2) the exec comment's "evidence" is post-fix validation (audit shows advisory cleared), not a pre-fix bug repro; (3) process state is clean — branch feature/619-recheck-anthropic-ai-sdk-advisory-waiver-after-614 is in sync with origin, working tree clean, single squash-worthy commit d0fd731; (4) sibling sites are N/A (cross-file: SDK has one consumer at src/lib/workflow/drivers/claude-code.ts, unchanged; intra-file: lockfile has no call sites); (5) Non-Goals checked — no npm audit fix --force was used (plain npm update inside ^0.3.142), and #614 is not being re-opened. The one prose-vs-action gap is the unfiled follow-up for brace-expansion/ws — a "should" not an AC, captured as a Suggestion.

    Status: Clean

    Verdict: NEEDS_VERIFICATION

    All ACs are MET except the close-on-merge step (PENDING by design). The blocker is the gating CI build matrix (build (20.x), build (22.x)) which is IN_PROGRESS. Per the QA verdict algorithm, gating CI checks pending → NEEDS_VERIFICATION, not READY_FOR_MERGE.

    Once both build jobs report SUCCESS, this flips to READY_FOR_MERGE with no further review needed — the diff has no source code, no test changes, and no behavior change beyond the dependency resolution. If either build job fails, that's the regression signal to investigate.

    Documentation

    • CHANGELOG entry added under [Unreleased] / ### Security
    • README updated — N/A (no user-facing API change)
    • docs/ updated — N/A (no behavior change)

    Next Steps

    1. Wait for build (20.x) and build (22.x) to complete on PR fix(#619): resolve @anthropic-ai/sdk advisory — bump claude-agent-sdk → 0.3.144 #666 — re-run /qa 619 (or rely on the prior-QA short-circuit at the same SHA) for the final READY_FOR_MERGE verdict.
    2. Before merging fix(#619): resolve @anthropic-ai/sdk advisory — bump claude-agent-sdk → 0.3.144 #666: file the follow-up issue for brace-expansion GHSA-jxxr-4gwj-5jf2 + ws GHSA-58qx-3vcg-4xpx (both fixAvailable: true) so the audit-clean trail stays continuous. The exec comment commits to "tracked separately" — do that work now while context is fresh, mirroring the Resolve npm audit findings (5: 4 moderate, 1 high) #614/fix(#614): resolve npm audit findings (cluster 1; cluster 2 waived) #615 pattern.
    3. On merge, the commit prefix fix(#619): will auto-close this issue. Confirm [Unreleased] Security entry stays accurate before the next release cut.
  6. admarble commented on May 30, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #619 (re-run — CI now green)

    Re-run of the prior QA at the same commit d0fd731. The prior verdict was NEEDS_VERIFICATION, blocked solely on the in-progress build matrix. All 5 CI checks now pass, so the verdict flips as the prior QA predicted.

    CI Status

    Check State Conclusion Impact
    typecheck completed success ✅ MET
    validate-skills completed success ✅ MET
    validate-plugin completed success ✅ MET
    build (20.x) completed success ✅ MET
    build (22.x) completed success ✅ MET

    CI Summary: 5 passed, 0 pending, 0 failed.

    AC Coverage (unchanged from prior QA, re-verified against lockfile)

    AC (derived from issue body) Status Notes
    Matrix Row 1: npm update @anthropic-ai/claude-agent-sdk performed MET Lockfile: claude-agent-sdk 0.3.142 → 0.3.144 (parent + 8 platform subpackages, all in lockstep)
    Matrix Row 1: @anthropic-ai/sdk outside vuln range >=0.79.0 <0.91.1 MET Lockfile resolves @anthropic-ai/[email protected] ✓
    Matrix Row 1: Close this issue PENDING (by design) Commit d0fd731 prefixed fix(#619): auto-closes on merge
    Falsifiability: memory tool still unused MET grep -rE 'memoryTool|MemoryTool|memory_tool|memory-tool' src/ bin/ scripts/ → 0 hits
    Falsifiability: no direct @anthropic-ai/sdk imports outside query() MET Only src/lib/workflow/drivers/claude-code.ts consumes it indirectly
    Non-goal: avoid npm audit fix --force major bump MET Plain npm update within ^0.3.142; no package.json change

    Coverage: 5/6 fully met; 1 PENDING by design (auto-close on merge — not a verification gate).

    Quality Metrics

    Metric Value Status
    Source files changed 0 OK (lockfile + CHANGELOG only)
    Files changed 2 OK
    Lines added / deleted +133 / −49 -
    Deleted tests 0 OK

    Code Review

    Strengths:

    • Minimal-blast-radius security bump: lockfile-only, no package.json change since ^0.3.142 already permits 0.3.144. Only @anthropic-ai/* packages touched — verified no other packages in the diff.
    • CHANGELOG ### Security entry is thorough and honest — documents the full version chain (0.2.138 → 0.3.142 via chore(deps): bump the production-dependencies group across 1 directory with 5 updates #650 → 0.3.144), the transitive resolution, the vuln range, and the two unrelated remaining moderates.

    Honesty note (not a defect):

    Issues: None blocking.

    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅
    User-facing change (fix(#619):) ✅
    [Unreleased] entry under ### Security ✅
    Entry format (verb + #619 + GHSA + versions) ✅

    Risk Assessment

    • Likely failure mode: A regression in claude-agent-sdk's query() API between 0.3.142 and 0.3.144. Covered by npx vitest run src/lib/workflow/drivers (49/49) and the now-green build matrix on both Node 20.x/22.x.
    • Not tested: No new tests — appropriate for a structural dep bump with no logic change.
    • Sibling sites considered: N/A — no source patterns introduced; the SDK's sole consumer (src/lib/workflow/drivers/claude-code.ts) is unchanged.
    • Sibling-line audit: none — lockfile + CHANGELOG only, no call sites.

    Adversarial Re-Read

    Findings: No gaps in the change itself. Two pre-merge process items surfaced (neither is an AC deficiency): (1) the follow-up issue for the remaining brace-expansion (GHSA-jxxr-4gwj-5jf2) + ws (GHSA-58qx-3vcg-4xpx) moderates — both fixAvailable: true — is still unfiled (gh issue list --search returns only #619). The exec comment committed to "tracked separately"; do that now so the audit-clean trail doesn't drift the way #619 itself nearly did. (2) Branch is 2 commits behind main, and those 2 commits edit the same [Unreleased] CHANGELOG region this PR appends to — mergeable is currently UNKNOWN; expect a possible trivial CHANGELOG conflict to resolve at merge.

    Status: Clean (both items are follow-up/merge hygiene, not gaps in this diff).

    Verdict: READY_FOR_MERGE

    All in-scope ACs are MET, CI is fully green across the matrix, the diff is minimal and source-free, and the CHANGELOG is accurate and honest about the #650 prior-resolution. This matches the prior QA's stated transition ("Once both build jobs report SUCCESS, this flips to READY_FOR_MERGE").

    Before merging (non-blocking but recommended):

    1. File the follow-up issue for brace-expansion + ws moderates so the audit-clean trail stays continuous (mirror the Resolve npm audit findings (5: 4 moderate, 1 high) #614/fix(#614): resolve npm audit findings (cluster 1; cluster 2 waived) #615 pattern).
    2. Expect a possible trivial CHANGELOG.md conflict on merge (branch is 2 behind main, overlapping [Unreleased] edits) — resolve by keeping both the ### Fixed and ### Security blocks.

    Documentation

    • CHANGELOG entry added under [Unreleased] / ### Security
    • README / docs — N/A (no user-facing API or behavior change)
  7. added
    ready-for-review
    on May 30, 2026
  8. added 2 commits that reference this issue on May 30, 2026
  9. added 2 commits that reference this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions