[Bug] False positive security flag during defensive code audit of own repository

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 31, 2026

Bug Description
False positive on a defensive security audit of my own codebase.

Context: I'm the owner and sole developer of a private Frappe/Python school
information system (student records, multi-site permissions). Before putting a
pilot in front of a real client, I ran a read-only security audit of my own
repository using Claude Code with subagents.

What got flagged: a subagent tasked with reviewing my own code for common
defensive-security issues — hardcoded secrets in .env and config files,
whitelisted API endpoints missing permission checks, uses of
ignore_permissions=True, SQL injection surface, and whether any credentials had
ever been committed to git history. Standard pre-deployment code review, the
same checklist a SAST tool or a security reviewer would run.

The task prompt explicitly instructed the agent to: modify nothing, never
transcribe the value of any secret it found (only report file path and secret
type), and classify each finding by severity. No exploitation, no third-party
systems, no offensive tooling — only my own repository on my own machine.

My guess at the trigger: the combination of "search for exposed credentials",
running git log -S over history, and words like "bypass" and "SQL injection"
in one prompt. Out of context that resembles reconnaissance; in context it's
routine defensive review.

Impact: the session switched models mid-audit, which breaks consistency in the
middle of a long multi-agent analysis and forces me to re-verify whether the
findings gathered before and after the switch are comparable.

Suggestion: auditing one's own repository for exposed secrets and missing
authorization checks is one of the highest-value defensive uses of Claude Code.
It would help if the safeguards weighted signals like read-only scope,
"don't transcribe secret values", and severity-classification framing, which
distinguish a defensive audit from actual credential harvesting.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.220
  • Feedback ID: 6ab65fcf-f34f-423f-9e13-a93b57784efd

Errors

[]

View original on GitHub ↗