Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github: Add Semgrep Check On Pull Request #3429

Merged
merged 12 commits into from
Mar 5, 2024
23 changes: 23 additions & 0 deletions .github/workflows/semgrep_diff.yml
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 }}
2 changes: 2 additions & 0 deletions .semgrepignore
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
Loading