summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/hooks/extensibility.py
AgeCommit message (Collapse)Author
2026-11-09Merge pull request #7029 from anthropics/mhegazy/sg-project-rules-after-cdMohamed Hegazy
security-guidance: keep project rules after the session changes folder
2026-11-07security-guidance: count how custom rules are writtenMohamed Hegazy
Measure only: path globs a wider reading would change, refused and counted repeats in regexes, and the slowest custom regex, on the Stop row. Which rules apply does not change. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-07security-guidance: keep project rules after the session changes foldermhegazy/sg-project-rules-after-cdMohamed Hegazy
Project rules and guidance were read from the session's current folder, so one cd dropped them silently. Read the project's own folder too while the session is elsewhere in the project; in a linked worktree, the same folder of that worktree. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-11-04security-guidance: read project config files only as real filesmhegazy/sg-project-config-filesMohamed Hegazy
A project guidance or pattern file that is a link, or sits under a .claude that is one, is skipped, and so is anything that is not a regular file. Guidance that cannot be decoded no longer drops the other guidance files, and a closing tag in guidance text no longer ends the block that holds it. Co-authored-by: mhegazy <mhegazy@anthropic.com>
2026-10-16security-guidance: skip an unusable security-patterns file on its ownmhegazy/sg-patterns-file-shapeMohamed Hegazy
A security-patterns file that parsed to a list or a scalar, was not UTF-8, or held a non-list patterns value raised inside the loader, and every user rule from every location was dropped with only a debug-log line. Each file is now read on its own: an unusable one is skipped and logged, and the rules from the other locations still load. Refs anthropics/claude-code#87627
2026-10-15security-guidance: find user-level policy files under CLAUDE_CONFIG_DIRMohamed Hegazy
claude-security-guidance.md and security-patterns files were only looked for in ~/.claude, so they were never loaded on installs that keep their config elsewhere. The directory CLAUDE_CONFIG_DIR names is now read as well; ~/.claude is still read, so files already placed there keep working. Fixes #4826
2026-05-26Update security-guidance pluginsecurity-guidance-updateMohamed Hegazy