When to choose it
Adding another review layer to code changes.
Choose it if: You want edit warnings and another review layer for common vulnerability patterns.
Look elsewhere if: You require a security certification or comprehensive vulnerability coverage; warnings can miss problems or be false positives.
What the source describes
- Pattern warnings during edits
- Model-assisted diff review after a turn
- Commit review that follows related code paths
Requirements
- Claude Code supporting the reviewed hook configuration; README declares >=2.1.144
- Python 3.10+ for the SDK review path despite the README’s broader Python 3.8 prerequisite
- Existing authorized model route for model reviews; SDK setup can install a dependency
Install for this repository only
- Inspect the three review paths. The reviewed plugin manifest and marketplace entry declare 2.0.13. hooks.json registers SessionStart SDK setup, UserPromptSubmit baseline capture, PostToolUse edit warnings and commit/push review, plus asynchronous Stop review. This is a hooks-based package; it adds no /security-guidance review command.
- Check the complete runtime requirement. The README lists Claude Code >=2.1.144 and Python 3.8+, but the SDK bootstrap explicitly requires its hook interpreter to be Python >=3.10. The shell shim prefers versioned 3.10–3.13 executables before bare names, then has a lower-version fallback. A working python3 command alone does not establish all review layers are available; check support for the reviewed hook features too.Shell • read-only preparation
claude --version python3 --version git status --short --branch - Account for automatic dependency setup. SessionStart can create a plugin-owned environment and pip-install the unpinned claude-agent-sdk package when it is unavailable. A --target fallback and a PostToolUse bootstrap rescue also exist. That is an installation/network side effect of enabling the plugin, separate from reviewing your code; this guide does not execute it or certify the SDK version it will resolve.
- Choose the model and data boundary. Model reviews use the existing subscription/API/provider route and can transmit diff paths, code and additional files read by the commit reviewer. SECURITY_REVIEW_MODEL controls the diff path; SG_AGENTIC_MODEL controls the deeper reviewer. Default model discovery and aliases are not a promise about your endpoint’s model access, cost or installed version. Confirm the destination and permitted code scope before enabling those reviews.
- Use an explicit layer choice. ENABLE_CODE_SECURITY_REVIEW=0 gates model reviews while pattern warnings remain; ENABLE_STOP_REVIEW=0 only disables the Stop diff path and keeps separately enabled commit/push review. These flags do not prevent the separate SDK bootstrap from running. To prevent all package hooks and setup, keep the plugin disabled in its installed scope.
- Understand policy and shared-checkout scope. The README documents user, project and project-local claude-security-guidance.md files for the diff prompt, concatenated in that order with an 8 KiB budget; it states the agentic commit path does not read this policy file. Baseline snapshots, touched paths, deduplication and truncation influence review scope. Concurrent writers can move the checkout; a quiet or partial review is not proof that every change was examined.
Run the installation command in your shell after reviewing the source. Local scope enables the package for you in this repository. It does not enable it for every collaborator.
claude plugin install security-guidance@claude-plugins-official --scope localHow to use it
Start a terminal session with model reviews gated off and the pattern path left enabled. This starts Claude and can still trigger plugin dependency setup; it is not a no-network preview and was not executed for this review.
ENABLE_CODE_SECURITY_REVIEW=0 claudeFor an intended session, gate only the Stop diff reviewer. Commit/push reviews have separate gates and can still consume model usage; this does not disable the whole plugin.
ENABLE_STOP_REVIEW=0 claudeAn original preparation request in a normal conversation. The package has no implemented preview command; enabling it has separate setup and review effects. This request example is written by ClaudeStack; it is not a transcript of a tested session.
Before enabling Security Guidance for this repository, inspect its pinned manifest, hook configuration and the project’s existing runtime requirements. Explain which paths warn after edits, which review completed commits or pushes, what code can reach the existing model endpoint, and whether SDK bootstrap changes local files. Recommend the smallest layer choice for my stated scope. Do not enable hooks, install packages, make model calls, edit code, commit or push.The source model IDs and aliases are implementation defaults. This guide does not assert account access, calibrated vulnerability coverage, price, detection improvements or runtime compatibility.
The pinned main-hook opening comment still describes two Haiku analyses, while the current dispatch uses the newer review paths and disables the old areas-of-concern analysis. Executable configuration and current call sites take precedence over that stale comment.
Reviewed on 2026-10-12 from fixed source sections. No hook, SDK bootstrap, installer, model review or unknown third-party code was executed; this is not a security audit or certification.
What to expect
The reviewed source describes these observations. ClaudeStack has not loaded or run this extension.
- Pattern checks run after matching successful Edit/Write/MultiEdit/NotebookEdit calls and add context about selected text patterns. They do not block the already-completed edit or cover every external file change.
- The Stop and selected Bash commit/push paths run background reviews. asyncRewake plus exit code 2 can wake Claude to address findings after a response; the README’s wording that feedback arrives before the response should not be treated as guaranteed timing.
- The deeper reviewer requests Read, Grep and Glob through the SDK; imports or calls can fail and fall back. Model filtering, file limits, repeated-warning suppression and missing credentials can leave no finding without establishing a clean security result.
Self-check: Confirm the plugin’s scope and Errors state, the actual hook interpreter and which layers completed for a small change you already intended to make. Check the resolved review scope and result without copying private code, credentials or logs into a public issue. Treat model findings as review candidates and validate fixes with the project’s real tests and security process; installation or an empty result is insufficient.
Troubleshooting
Pattern warnings work but the deeper commit review is unavailable
Check the hook interpreter selected by sg-python.sh and the SDK bootstrap outcome. The source requires Python >=3.10 for SDK imports despite the README’s broader Python 3.8 prerequisite. A separate newer interpreter that never reaches the hook does not establish the reviewer can use it.
The first session attempts a Python package installation
The reviewed SessionStart bootstrap can create an environment and pip-install claude-agent-sdk; the dependency is unpinned. Disabling model review with an environment flag does not gate that separate bootstrap. Keep the plugin disabled until its setup effects fit your intended environment.
A review reports nothing or appears to skip a large diff
Check enabled-layer flags, actual provider access, SDK fallback and the files/snapshot selected. The source caps and prioritizes diff files and can skip pathological sizes. Duplicate/baseline suppression, truncation or an API failure is different from a verified clean result.
Findings arrive after Claude’s reply or another turn begins
hooks.json uses asyncRewake for Stop and commit/push review. Current hook semantics allow exit code 2 to wake an idle session; the main hook emits that signal with findings. Inspect the relevant feedback and resumed work rather than assuming review always finishes before the first response.
Shared-worktree changes are attributed to the wrong turn
Coordinate one writer and verify the actual baseline and commit under review. The README offers ENABLE_STOP_REVIEW=0 to disable that turn-level path while retaining separately enabled fixed-commit review. No flag creates isolated checkouts or proves attribution under all concurrent mutations.
Project security guidance affects one layer but not another
The README explicitly limits claude-security-guidance.md to the diff review and describes concatenation plus tail truncation. Do not assume the deeper agentic reviewer loads those rules or that lower-precedence local content survives the prompt budget.
The kill-switch flag still allows setup activity
SECURITY_GUIDANCE_DISABLE is checked in the main review hook, while the separately registered SessionStart bootstrap has no corresponding guard in the reviewed main function. Use plugin disable/uninstall to stop all package hooks; the flag alone is not verified to prevent every installation or local-state side effect.
Disable or remove it
- Disable or uninstall security-guidance in /plugin → Installed at the actual enabled scope and follow its reload/activation instruction. This stops future package hooks, including the separately registered setup path.
- Model-review flags select layers rather than removing the package. The main review kill switch is not a verified no-bootstrap boundary in this pinned source.
- Uninstalling does not undo edits, published commits, model transmissions or the plugin’s existing local state/SDK dependencies. Retain or remove those deliberately after checking whether other sessions use them.
Limitations & considerations
- Hooks can send source context to models and bootstrap local SDK dependencies
- Post-edit/background findings, skips and empty results are not comprehensive coverage or security certification
Source & review record
Our description is based on public documentation and manifests available on 2026-10-12. Installation formats were checked against Claude Code and the relevant installer documentation. No extension code was executed: this is a source review, not a runtime compatibility test or security audit.
- Original source and documentation
- Reviewed definition source
- License of the reviewed source
- Official plugin installation documentation
Usage guide sources
Upstream revision checked for this guide: f359d43b406057f1a8cdbc4ea93b827642c162e6. Command names and behavior in this guide are documentation and registration-source findings, not runtime verification.
- Plugin version and identity ↗
- Actual event registration and asyncRewake ↗
- Author setup, toggles, policy and privacy documentation ↗
- Interpreter selection and SDK version requirement ↗
- Automatic SDK setup and unpinned installation ↗
- Actual dispatch, gates, limits and feedback ↗
- Model routes and SDK reviewer configuration ↗
- Policy discovery and prompt budget ↗
- Actual Apache-2.0 license ↗
- Hook events, background review and continuation ↗
- Install and manage plugins ↗