This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR aims to update the public documentation about SAST scanning at sourcegraph. Added relevant playbook and details for semgrep SAST. --------- Co-authored-by: Vincent Ruijter <[email protected]>
- Loading branch information
1 parent
8057a2d
commit 9fcf160
Showing
5 changed files
with
59 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Semgrep OSS vulnerability scanning | ||
|
||
We use [Semgrep OSS](https://semgrep.dev) as a static analysis tool to analyse the code in the | ||
`sourcegraph/sourcegraph` and `sourcegraph/cody` repository for security vulnerabilities | ||
and bad patterns. We have published playbook below seperately to resolve issues, false positives. | ||
|
||
- [Developer playbook](https://github.com/sourcegraph/infrastructure/tree/main/security/tooling/sast/playbook) | ||
- [Security engineer playbook](https://github.com/sourcegraph/infrastructure/blob/main/security/tooling/sast/playbook/security-engineers-playbook.md) | ||
- [Operational playbook](https://github.com/sourcegraph/infrastructure/blob/main/security/tooling/sast/playbook/operational-playbook.md) | ||
|
||
## For Sourcegraph engineers | ||
|
||
### For resolving Semgrep SAST alerts | ||
|
||
Semgrep [Developer playbook](https://github.com/sourcegraph/infrastructure/tree/main/security/tooling/sast/playbook) is well documented handling any situation that developer faces. | ||
Any Semgrep issues should be visible to you via the output of the `Semgrep OSS / | ||
Code Analysis` GitHub check and as Github Comments. | ||
|
||
If the offending commit has to be landed as part of resolving an incident, | ||
|
||
- Check the [Developer Playbook](https://github.com/sourcegraph/infrastructure/tree/main/security/tooling/sast/playbook) to resolve semgrep alert through source code comments. | ||
- (or) find an admin for the repository (for whom branch protection rules will not apply) to | ||
merge the code in for you. | ||
|
||
### For Semgrep SAST Stuck issues | ||
|
||
This rarely happens (less than 0.5%), but if it does, please follow the steps below: | ||
|
||
- Ensure your branch is up to date with the `main` or default branch. If not please rebase your branch. | ||
- If the issue is still not resolved, please reach out to the Security team in #discuss-security. | ||
- (or) find an admin for the repository (for whom branch protection rules will not apply) to | ||
merge the code in for you. | ||
|
||
If you're not still clear on how to resolve an issue raised by Semgrep, please reach out | ||
to the Security team in #discuss-security. | ||
|
||
## For Security engineers | ||
|
||
### Security Engineer Playbook | ||
|
||
[Security Engineer playbook](https://github.com/sourcegraph/infrastructure/blob/main/security/tooling/sast/playbook/security-engineers-playbook.md) contains all information including triaging alerts, tweak rules, semgrep errors. | ||
If you come up with unique issues scenario, please document in the same playbook. | ||
|
||
### Operational Playbook | ||
|
||
[Operational playbook](https://github.com/sourcegraph/infrastructure/blob/main/security/tooling/sast/playbook/operational-playbook.md) contains all information including architecture, tweaking rules, upgrading | ||
semgrep versions, stuck issues. If you come up with unique operational issues scenario, please document | ||
in the same playbook. | ||
|
||
## Semgrep SAST Alerts and Metrics | ||
|
||
Semgrep SAST alerts are stored in SIEM and can be queried from Elasticsearch (index: github-code-scanning). | ||
Additionally, SAST metrics dashboard is published under Analytics > Dashboard > Semgrep SAST Scan metrics. |
This file was deleted.
Oops, something went wrong.