From brana
Security scan — secrets in CLAUDE.md, hook permissions, MCP count, dangerous settings, unencrypted .env. 5 checks, fast, zero dependencies. Run periodically or before sharing config.
How this skill is triggered — by the user, by Claude, or both
Slash command
/brana:auditThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
5-check lightweight security scanner for brana harness configurations. Catches secrets, permission issues, and token tax before they cause problems.
5-check lightweight security scanner for brana harness configurations. Catches secrets, permission issues, and token tax before they cause problems.
/brana:audit — run all 5 checks on current project
/brana:audit --global — also scan ~/.claude/ global config
Scan CLAUDE.md, rules/, and skill frontmatter for leaked secrets.
Patterns (14 regexes from AgentShield):
# API keys and tokens
(sk|pk|api|key|token|secret|password|credential|auth)[-_]?[A-Za-z0-9]{16,}
(ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9]{36,}
AKIA[0-9A-Z]{16}
(xox[bpas]-[A-Za-z0-9-]{10,})
(sk-[A-Za-z0-9]{20,})
Bearer\s+[A-Za-z0-9\-._~+/]+=*
Basic\s+[A-Za-z0-9+/]+=+
-----BEGIN (RSA |EC |DSA )?PRIVATE KEY-----
(postgres|mysql|mongodb)://[^\s]+:[^\s]+@
(ANTHROPIC|OPENAI|STRIPE|GITHUB|AWS)_[A-Z_]*KEY[=:]\s*\S+
Files to scan:
CLAUDE.md, .claude/CLAUDE.md~/.claude/CLAUDE.md (if --global)~/.claude/rules/*.md (if --global)system/skills/*/SKILL.mdsystem/hooks/*.shsystem/agents/*.mdAction: For each match, report the file, line number, and which pattern matched. Redact the actual value (show first 4 chars + ***).
Scan hook scripts for commands that modify permissions on non-hook files.
grep -rn "chmod\|chown\|setfacl" system/hooks/*.sh
Flag if:
chmod +x targets any file outside system/hooks/chmod 777 anywherechown to root or another userAcceptable: chmod +x on files within system/hooks/ (hooks need to be executable).
Count active MCP servers. Each server adds 4-17K tokens to every session.
# Check settings.json for mcpServers
jq '.mcpServers | length' ~/.claude/settings.json 2>/dev/null
# Check project settings
jq '.mcpServers | length' .claude/settings.local.json 2>/dev/null
Traffic light:
List each server with name and estimate token impact.
Check if skipDangerousModePermissionPrompt is enabled.
jq '.skipDangerousModePermissionPrompt' ~/.claude/settings.json 2>/dev/null
Flag if true: "Dangerous mode prompt is disabled. All tool calls execute without confirmation. This is convenient but removes a safety net for destructive operations (rm -rf, git push --force, etc.)."
Also check:
defaultMode in permissions — warn if set to "bypassPermissions" or "dangerouslyDisableSandbox"deny list — report if empty (no deny rules configured)Scan for .env files and credential files that should not be in git.
# Find .env files not in .gitignore
find . -name ".env*" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null
# Check if they're gitignored
git check-ignore -v .env .env.local .env.production 2>/dev/null
# Check for common credential files
find . -name "credentials.json" -o -name "service-account*.json" -o -name "*.pem" -o -name "*.key" 2>/dev/null
Flag if:
.env file exists AND is not gitignored.env files contain actual values (not just variable names)## Security Audit — YYYY-MM-DD
| # | Check | Status | Findings |
|---|-------|--------|----------|
| 1 | Secrets in config | {pass/N findings} | {summary} |
| 2 | Hook permissions | {pass/N findings} | {summary} |
| 3 | MCP token tax | {green/yellow/red} | {N servers, ~NK tokens} |
| 4 | Dangerous settings | {pass/warn} | {summary} |
| 5 | Unencrypted creds | {pass/N findings} | {summary} |
### Details
{per-finding details with file:line and remediation}
### Recommendations
{ordered by severity}
***. Report the pattern and location, not the value.npx claudepluginhub martineserios/thebrana --plugin branaScans .claude/ directory for security vulnerabilities like hardcoded secrets, prompt injection, risky permissions in CLAUDE.md, settings.json, MCP servers, hooks, and agents using AgentShield. Use before commits or after config changes.
Scans Claude Code configuration files for security vulnerabilities, misconfigurations, and injection risks using AgentShield.
Scans Claude Code plugins for execution surface risks, supply chain vulnerabilities, data exfiltration, and prompt injection. Applies context-aware severity rules to hooks, scripts, MCP configs, and documentation.