Semgrep CI provides integrations with 3rd party services like Slack and GitHub. When integrations are configured, you can receive notifications about Semgrep CI findings and failures. To configure these and learn more, visit Dashboard > Integrations.
To receive Slack notifications about Semgrep findings on pull requests and code pushes, visit Dashboard > Integrations and select 'Add integration' or 'Setup First Integration' and then choose 'Slack'. Give your channel a name, and then follow the setup instructions on the page to retrieve your Webhook URL.
Use the 'Test' button to send a test notification and ensure that your channel is configured properly.
To receive email notifications about Semgrep findings on pull requests and code pushes, visit Dashboard > Integrations and select 'Add integration' or 'Setup First Integration,' and then choose 'Email'. Enter your email address, give the channel a name of your choosing, and then click 'Save'.
On each scan that has at least one finding, you will receive one email from Semgrep with a summary of all of the findings from that scan.
Pull request comments
This feature is currently only available for GitHub.
Pull request comments are left when
- Semgrep finds a result in CI, and
- the CI policy has pull request comments enabled
Automated comments on GitHub pull requests look like this:
Note that Semgrep App uses the permissions requested by https://github.com/apps/semgrep-dev to leave PR comments.
If you are using Github Actions to run Semgrep, no extra changes are needed to get PR comments. If you are using another CI provider, in addition to the environment variables you set after following sample CI configurations you need to ensure that the following environment variables are correctly defined:
SEMGREP_COMMIT is set to the full commit hash of the code being scanned (e.g.
SEMGREP_PR_ID is set to the PR number of the pull request on Github (e.g.
SEMGREP_REPO_NAME is set to the repo name (e.g.