T09 · Insecure Skill Coding Practices
- Location
scripts/autoreview:360- Finding
Untracked sensitive files may be disclosed to external AI review providers
- Content
View full analysis
str: parts = [ "# Git Status", git(repo, "status", "--short"), "# Staged Diff", git(repo, "diff", "--cached", "--stat"), bounded(git(repo, "diff", "--cached", "--patch", "--find-renames")), "# Unstaged Diff", git(repo, "diff", "--stat"), bounded(git(repo, "diff", "--patch", "--find-renames")), ] untracked = [line for line in git(repo, "ls-files", "--others", "--exclude-standard").splitlines() if line] if untracked: parts.append("# Untracked Files") for rel in untracked: path = repo / rel parts.append(f"## {rel}\n{read_text(path)}") return "\n\n".join(parts) ``` The collected bundle is subsequently interpolated into the prompt at `scripts/autoreview:443-471` and passed to the selected Codex, Claude, Droid, or Copilot CLI at `scripts/autoreview:482-632`. ### Technical Analysis In local review mode, `local_bundle()` enumerates every untracked, non-ignored file using: ```bash git ls-files --others --exclude-standard ``` Each text file is then read with `read_text()` and included in the review prompt. There is no sensitive-file denylist, source-file allowlist, secret scanner, content redaction, or confirmation step before the prompt is supplied to an AI reviewer. Although transmitting a patch to an AI provider is consistent with the declared review functionality, collecting every untracked text file exceeds the minimum data access required to review changed source code. Untracked files can include `.env` files, access tokens, private configuration, credentials, customer data, local notes, or proprietary artifacts. Git-ignored files are excluded, but this is insufficient because sensi ...[truncated 1680 chars]- Remediation
View remediation
