Answer: You add custom security rules through two additive extension points: create a Markdown guidance file at `.claude/claude-security-guidance.md` for the model-backed reviews, and a YAML or JSON patterns file for the per-edit string match. You can add checks but cannot disable built-in ones from these files. Status: Confirmed Entry: tool/claude-code/settings/add-custom-security-rules Revision: 2 Digest: sha256:2bd06c79c9fa351e (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:36Z Last changed: 2026-11-20T12:24:45Z (Limitation: — → cannot disable built-in ones) Last verified: 2026-11-20T12:24:45Z Next check: 2026-11-21T12:24:45Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Guidance file path | .claude/claude-security-guidance.md | [1] | 2026-11-20 Patterns file format | YAML or JSON | [1] | 2026-11-20 Extension points count | two | [1] | 2026-11-20 Limitation | cannot disable built-in ones | [1] | 2026-11-20 Sources: [1] Anthropic. "Catch security issues as Claude writes code". https://code.claude.com/docs/en/security-guidance.md Role: primary. Accessed: 2026-11-20T12:24:45Z Quote: "Create `.claude/claude-security-guidance.md` in your project" (Supports: Guidance file path) Quote: "a YAML or JSON patterns file for the per-edit string match" (Supports: Patterns file format) Quote: "The plugin has two extension points" (Supports: Extension points count) Quote: "You can add checks but cannot disable built-in ones from these files." (Supports: Limitation) Published: 2026-11-20T03:00:49Z Snapshot SHA-256: d8f970b8ca75ca1369a61daf81c6b50f299f12bc33d3e7821d3625ac3b5dd956 (captured 2026-11-19T12:20:00Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-19T12:20:01Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:24:45Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:24:45Z Last attempt: 2026-11-20T12:24:45Z Notes and limitations: Extracted automatically from a single official source (section "Add your own rules"). Related: https://latestn.com/tool/claude-code/settings/adjust-extended-thinking-costs How do I adjust extended thinking settings in Claude Code to lower costs? https://latestn.com/tool/claude-code/settings/authentication-precedence How does Claude Code decide which authentication method to use when multiple credentials are present? https://latestn.com/tool/claude-code/settings/change-claude-config-dir How do I change the location of the ~/.claude directory in Claude Code? https://latestn.com/tool/claude-code/privacy-and-data/zdr-scope-coverage What data does Zero Data Retention cover in Claude Code? https://latestn.com/tool/claude-code/settings/accessibility-settings What accessibility settings does Claude Code offer for screen magnifiers, reduced motion, and colorblind-friendly themes? https://latestn.com/tool/claude-code/settings/action-parameters What action parameters can I configure for Claude Code GitHub Actions? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:24:45Z | changed | Limitation: — → cannot disable built-in ones | [1] 2026-11-20T12:24:45Z | changed | Extension points count: — → two | [1] 2026-11-20T12:24:45Z | changed | Patterns file format: — → YAML or JSON | [1] 2026-11-20T12:24:45Z | changed | Guidance file path: — → .claude/claude-security-guidance.md | [1] 2026-11-20T12:24:45Z | changed | limitation: You can add checks but cannot disable built-in ones from these files. → — | [1] 2026-11-20T12:24:45Z | changed | additive behavior: Both are additive. → — | [1] 2026-11-20T12:24:45Z | changed | extension points: a Markdown guidance file for the model-backed reviews, and a YAML or JSON patterns file for the per-edit string match → — | [1] 2026-11-20T12:24:45Z | changed | guidance file path: .claude/claude-security-guidance.md → — | [1] 2026-11-13T03:05:36Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/settings/add-custom-security-rules/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/settings/add-custom-security-rules POST: https://latestn.com/dispute/tool/claude-code/settings/add-custom-security-rules with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/settings/add-custom-security-rules?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I add custom security rules to the Claude Code security-guidance plugin? Revision 2, last verified 2026-11-20T12:24:45Z. https://latestn.com/tool/claude-code/settings/add-custom-security-rules (accessed 2026-11-21T09:53:44Z). @misc{LatestN_tool_claude_code_settings_add_custom_security_rules_r2, title = {How do I add custom security rules to the Claude Code security-guidance plugin?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/settings/add-custom-security-rules}}, note = {Revision 2; digest sha256:2bd06c79c9fa351e; last verified 2026-11-20T12:24:45Z; accessed 2026-11-21T09:53:44Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/settings/add-custom-security-rules