security-guidance · alirezarezvani — Claude Code plugin: setup and checks
security-guidance — a PreToolUse hook for Claude Code flags common insecure patterns before file edits happen. It fits security checks inside an active coding session.
MIT ★ 30,251 updated 2026-10-23
/plugin marketplace add alirezarezvani/claude-skills
/plugin install security-guidance@claude-code-skillsWhat security-guidance does
The plugin adds a PreToolUse hook around Edit, Write, and MultiEdit. It detects 12 security anti-patterns, including command injection through exec, os.system, or subprocess shell=True; XSS through innerHTML, dangerouslySetInnerHTML, or document.write; and SQL injection in f-string or .format queries. It also covers pickle, yaml.unsafe_load, eval, new Function, and GitHub Actions workflow injection.
Session state is cached so the same warning is not shown repeatedly. Stale state files are cleaned up after 30 days. Set ENABLE_SECURITY_REMINDER=0 to turn the reminders off for a session.
What it helps with
- scan edits for command injection
- spot XSS in
innerHTMLanddocument.write - flag unsafe SQL query interpolation
- check for dangerous deserialization and code execution
- review GitHub Actions workflow injection
Example prompts for the agent
- Check these edits for command injection and XSS before saving them.
- Review the database changes and flag unsafe SQL query construction.
- Inspect this GitHub Actions workflow for injection risks.
How to install security-guidance
Plugin marketplace
/plugin marketplace add alirezarezvani/claude-skills/plugin install security-guidance@claude-code-skillsStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about security-guidance
How do I install security-guidance in Claude Code?
In Claude Code, add the marketplace with /plugin marketplace add alirezarezvani/claude-skills, then install the plugin with /plugin install security-guidance@claude-code-skills.
What does security-guidance do?
Its PreToolUse hook checks Edit, Write, and MultiEdit operations for 12 common insecure patterns before they happen.
Can I disable the security reminders for a session?
Yes. Set ENABLE_SECURITY_REMINDER=0 for that session. Cached session state also prevents duplicate warnings.
Source text
security-guidance · MIT
PreToolUse security reminder hook for Claude Code. Catches 12 common security anti-patterns in Edit/Write/MultiEdit operations BEFORE they happen — command injection (exec, os.system, subprocess shell=True), XSS (innerHTML, dangerouslySetInnerHTML, document.write), SQL injection (f-string queries, .format), unsafe deserialization (pickle, yaml.unsafe_load), code injection (eval, new Function), and GitHub Actions workflow injection. Session-state caching prevents duplicate warnings; 30-day auto-cleanup. Disable per-session with ENABLE_SECURITY_REMINDER=0. Ported from David Dworken at Anthropic.
© Alireza Rezvani · MIT · alirezarezvani/claude-skills
Similar plugins
All plugins for Security →security-guidance by other authors comes first.