feat(auto-review): add supply-chain security subagent#75
feat(auto-review): add supply-chain security subagent#75ignaciosantise wants to merge 3 commits intomasterfrom
Conversation
Add a conditional subagent that detects Glassworm campaign patterns and other supply-chain attack techniques during PR review. Triggers when dependency manifests, lockfiles, CI/build configs, or package manager configs change, or when patches contain suspicious patterns (eval, Buffer.from, codePointAt, install hooks). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @ignaciosantise's task in 1m 28s —— View job Found 3 issue(s)Issue 1:
|
Extend heuristic and agent spec beyond npm/JS to cover Rust (build.rs, proc-macro), Gradle (buildscript, apply plugin), CocoaPods (script_phase, prepare_command), Python (setup.py cmdclass, subprocess), and Go (//go:generate) auto-execution vectors. Fix 3 review findings: remove overly-broad Function() regex, tighten Buffer.from to eval(Buffer.from(...)) combo only, rewrite byte-count check to use Grep/Read instead of unavailable Bash tool. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude review |
|
Claude finished @ignaciosantise's task in 16s —— View job 🔄 Incremental Review (commit Previously Reported Issues
Found 1 issue(s)Issue 1:
|
The /setup\s*\(/ pattern fires on any setup() call in JS/TS (test frameworks, Vue Composition API, etc.), not just Python setup.py. install_requires and cmdclass already cover the meaningful Python supply-chain vectors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
build.rs, Gradlebuildscript/plugins, CocoaPodsscript_phase/prepare_command, Pythonsetup.pycmdclass/subprocess, Go//go:generateeval(Buffer.from(...))decoder pattern)scl-prefixed finding IDsReview Fixes
/Function\s*\(/regex was too broad (matchedmyFunction(),handleFunction()) — removed in favor of existingnew Function(patternwc -c,cat | tr) but Bash not in allowedTools — rewritten to use Grep/Read/Buffer\.from/triggered on ordinary Node.js code — tightened toeval\s*\(\s*Buffer\.from(Glassworm decoder combo only)Changes
scripts/should-spawn-supply-chain.js— multi-ecosystem heuristic (build scripts, patch patterns for Rust/Gradle/CocoaPods/Python/Go)agents/review-supply-chain.md— agent spec with per-ecosystem auto-execution vectors, lockfile anomaly checks, and false-positive guardrailsscripts/__tests__/should-spawn-supply-chain.test.js— 79 tests (up from 51)action.yml— newforce_supply_chain_agentinput, heuristic step, conditional prompt sectionTest plan
pnpm test— all 238 tests pass (79 supply-chain)package.json→ subagent should spawnbuild.rs→ subagent should spawnbuild.gradle.kts→ subagent should spawn.podspec→ subagent should spawnsetup.py→ subagent should spawn.github/workflows/→ subagent should spawn.mdfiles → subagent should NOT spawnforce_supply_chain_agent: true→ subagent should always spawnskip-reviewlabel → subagent should NOT spawn🤖 Generated with Claude Code