Overview
Semgrep is a fast, open-source static analysis tool that finds bugs, vulnerabilities, and secrets in code. The Pwnbook Semgrep integration pulls scan findings from your Semgrep deployment into engagements, where you can triage, annotate, and track remediation alongside the rest of your pentest work.Prerequisites
- A Semgrep account (Semgrep Team or Enterprise)
- A Semgrep API token with read access to your deployment
- Your Semgrep deployment slug
- Admin or Owner access in Pwnbook to configure the integration
Credentials required
| Field | Description |
|---|---|
| API Token | A Semgrep API token. Generate one at Semgrep Settings → Tokens. Needs scans:read scope. |
| Deployment Slug | Your Semgrep organization/deployment identifier, visible in the Semgrep dashboard URL. |
Setup
Generate a Semgrep API token
- Log in to semgrep.dev.
- Go to Settings → Tokens.
- Click Create new token.
- Give it a name (e.g.,
pwnbook-integration) and select thescans:readscope. - Copy the token — you won’t be able to see it again.
Find your deployment slug
Your deployment slug appears in the URL when you’re in the Semgrep dashboard:Copy the slug portion.
Configure the integration in Pwnbook
- Go to Organization Settings → Marketplace → Semgrep.
- Click Configure.
- Enter your API Token and Deployment Slug.
- Click Save & Test to verify the credentials.
Configure per-repository sync settings
After connecting, Pwnbook loads a list of repositories from your Semgrep deployment.For each repository you want to sync findings from:
- Toggle Visible to show findings in Pwnbook.
- Toggle Sync Enabled to pull new findings automatically.
- (Optional) Add a Note to record context about this repository.
- Click Save.
What gets synced
Pwnbook pulls the following data from Semgrep:| Data | Description |
|---|---|
| SAST findings | Code vulnerabilities identified by Semgrep rules, with file path, line numbers, and column ranges |
| Secrets findings | Exposed credentials, API keys, and tokens detected in code |
| Supply chain findings | Vulnerable dependencies and packages |
| Severity | Critical, high, medium, low, informational |
| Rule metadata | Rule ID, message, CWE mappings, OWASP category |
| Remediation guidance | Fix suggestions where available from Semgrep rules |
Viewing findings in Pwnbook
Synced Semgrep findings appear in the engagement under Security Findings → Semgrep. From there you can:- Filter by severity, type, and repository
- Add internal notes to individual findings
- Link findings to tasks or threat model threats
- Mark findings as resolved, acknowledged, or suppressed
Refreshing findings
Pwnbook caches findings from Semgrep. To pull the latest:- Go to Organization Settings → Integrations → Semgrep.
- Click Refresh Findings.
Disconnecting
To remove the Semgrep integration:- Go to Organization Settings → Marketplace → Semgrep.
- Click Disconnect.
- Confirm the disconnection.