Skip to content

feat: Add Dependency & Supply Chain Security category#77

Closed
theLightArchitect wants to merge 31 commits intoanthropics:mainfrom
theLightArchitect:feat/supply-chain-dependency-detection
Closed

feat: Add Dependency & Supply Chain Security category#77
theLightArchitect wants to merge 31 commits intoanthropics:mainfrom
theLightArchitect:feat/supply-chain-dependency-detection

Conversation

@theLightArchitect
Copy link
Copy Markdown

Summary

Adds a 6th security category — Dependency & Supply Chain Security — to both the API-driven audit prompt and the /security-review slash command. This addresses a gap in the tool's coverage: the current 5 categories focus on application-layer vulnerabilities but miss supply chain attack vectors that are increasingly common in real-world breaches.

New category covers:

  • Known vulnerable dependencies (CVEs in pinned versions in manifest files)
  • Unpinned or loosely pinned dependency versions (*, latest, >= without upper bound)
  • Dependencies from untrusted or non-standard registries
  • Typosquatting risks in package names
  • Dependency confusion (private vs public namespace conflicts)
  • Malicious post-install scripts in dependency manifests
  • Lock file integrity issues (missing, inconsistent, or uncommitted lock files)

Design choice — prompt-only approach: This follows the existing architecture where Claude analyzes manifest files and lock files present in the PR diff. No new tooling (e.g., pip audit, npm audit) is added, keeping the change minimal and consistent with how the other 5 categories work. The existing custom_scan_instructions parameter remains available for per-project extensions.

Files changed:

  • claudecode/prompts.py — Added category block after "Data Exposure", before {custom_categories_section}
  • .claude/commands/security-review.md — Added identical category block (these files are maintained in lockstep)
  • claudecode/test_prompts.py — 2 new tests: category presence + custom instructions ordering

Test results: 175 tests pass, 0 failures.

Closes #31

Test plan

  • All 175 tests pass (python -m pytest claudecode/ -v)
  • New category appears in generated prompt output
  • custom_scan_instructions still injects correctly after the new category
  • Slash command and API prompt kept in sync

🤖 Generated with Claude Code

ddworken and others added 30 commits August 6, 2025 08:40
Change the default from Opus 4 to Opus 4.1
Remove incorrect reference to new-findings-count output that doesn't exist
Fail fast when API key is not provided
Revert "Fail fast when API key is not provided"
…ail-fast

Enable claude-code-security-review action on this repo
Add explicit documentation for the claude-model action input
Clean up template references in action.yml
Update docs to clarify that the API key is used for both CC and the Claude API
…tion-docs

Add security considerations for prompt injection
…ction.yaml files

Instead of using @Version, pin all github actions uses to a specific commit hash. This makes is that much harder for a supply chain attack to occur.
Adds a 6th security category covering supply chain attack vectors:
- Known vulnerable dependencies (CVEs in pinned versions)
- Unpinned or loosely pinned dependency versions
- Dependencies from untrusted registries
- Typosquatting risks in package names
- Dependency confusion (private vs public namespace conflicts)
- Malicious post-install scripts
- Lock file integrity issues

Updated in both prompts.py (API-driven audits) and
.claude/commands/security-review.md (slash command audits) to keep
them in sync.

Includes 2 new tests verifying the category appears in generated
prompts and that custom_scan_instructions still injects correctly.

Closes anthropics#31

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@theLightArchitect theLightArchitect force-pushed the feat/supply-chain-dependency-detection branch from 9156cea to 9960b64 Compare March 21, 2026 01:52
Sign up for free to 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.

Update the security review command to identify Dependency Issues

4 participants