Skip to content

Document the hooks Semgrep Guardian registers - #2779

Open
milanwilliams wants to merge 2 commits into
mainfrom
milan/guardian-hooks-section
Open

milanwilliams wants to merge 2 commits into
mainfrom
milan/guardian-hooks-section

Conversation

@milanwilliams

Copy link
Copy Markdown
Contributor

Adds a What hooks does Semgrep Guardian use? section to the Guardian overview, just above the existing rules section.

Verified against the guardian-dev repo (plugin.go, pretooluse.go, posttooluse.go, build/templates/hooks.json):

  • PreToolUse — package lookup to prevent malware installation
  • PostToolUse — scans written code for secrets and vulnerabilities
  • SessionStart — starts the Semgrep login flow

Note: the plugin templates still register a UserPromptSubmit hook, but per @milan-semgrep that hook has been removed, so it is intentionally not documented. Worth checking whether build/templates/hooks.json is stale.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
semgrep-docs 🟢 Ready View Preview Aug 12, 2026, 4:11 AM

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging - docs 59a2ae68 Deployed Aug 12, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant