-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github: Add Semgrep Check On Pull Request (#3429)
* Initial version of semgrep diff * Update semgrep_diff.yml * reformat params * Pin checkout action to sha * Dummy - To Test Semgrep * Testing SEMGREP * Ignore Nagios Example j2 templates --------- Co-authored-by: Martijn Verburg <[email protected]>
- Loading branch information
1 parent
d80c1c8
commit b6cd869
Showing
2 changed files
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Semgrep Differential Scan | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
semgrep-diff: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: returntocorp/semgrep | ||
|
||
steps: | ||
# Step 1: Clone application source code | ||
- name: Checkout code | ||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Step 2: Differential scan | ||
- name: Differential scan | ||
run: | | ||
semgrep scan --error --metrics=off --config="p/trailofbits" \ | ||
--baseline-commit ${{ github.event.before }} |
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,2 @@ | ||
# Ignore The Nagios Configuration J2 templates, as they are only examples. | ||
./ansible/playbooks/nagios/roles/Nagios_Config/files/templates/*.j2 |