Claude Code Security Feature
Here's a fun way (prompt) you can use the claude code security skill / slash command to run on your whole codebase instead of just PR's or uncommitted changes if you are wondering about how it stacks up to start:
Run Anthropic's built-in /security-review on my ENTIRE codebase, not just a diff,
then restore my git state exactly as it was.
The built-in /security-review only scans `git diff origin/HEAD...` (branch vs remote
default), so to scan everything you must present the whole tree to it as the diff:
1. Capture my current state first: current branch, whether origin/HEAD is set, and
stash any uncommitted changes (git stash push -u) so nothing is lost.
2. Build an empty-base structure so the full tree shows as the diff:
- empty=$(git commit-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 -m "scan base")
- w=$(git commit-tree $(git rev-parse HEAD^{tree}) -p $empty -m "scan tree")
- git checkout -b secscan-tmp $w
- git update-ref refs/remotes/origin/HEAD $empty
- verify `git diff --name-only origin/HEAD...` lists all files
3. Invoke the actual built-in /security-review skill (its genuine identify →
parallel false-positive filtering → confidence≥8 methodology). Do NOT substitute
a manual review or a multi-agent workflow — I want the real feature.
4. ALWAYS restore afterward, even if the scan errors: checkout my original branch,
delete secscan-tmp, restore origin/HEAD to its prior state (or delete the ref if
it wasn't set), and pop my stash. Confirm `git status` matches the starting state.
5. Give me the final findings report, then a one-line confirmation that git is restored.
Don't commit anything. Don't push.
1
1 comment
Scott Rippey
3
Claude Code Security Feature
AI Developer Accelerator
skool.com/ai-developer-accelerator
Master AI & software development to build apps and unlock new income streams. Transform ideas into profits. 💡➕🤖➕👨‍💻🟰💰
Leaderboard (30-day)
Powered by