File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow uses actions that are not certified by GitHub.
2+ # They are provided by a third-party and are governed by
3+ # separate terms of service, privacy policy, and support
4+ # documentation.
5+ name : Security - Opengrep
6+
7+ on :
8+ workflow_call :
9+
10+ permissions :
11+ contents : read
12+ security-events : write
13+
14+ env :
15+ # Release version of Opengrep
16+ # https://github.com/opengrep/opengrep/releases
17+ RELEASE_VERSION : v1.0.0-alpha.13
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : " Checkout code"
24+ uses : actions/checkout@v4
25+
26+ - name : " Download / Install Opengrep"
27+ run : |
28+ set -e
29+
30+ echo "[+] Downloading Opengrep"
31+ curl -sSfL \
32+ -o "/usr/local/bin/opengrep" \
33+ "https://github.com/opengrep/opengrep/releases/download/${RELEASE_VERSION}/opengrep_manylinux_x86"
34+ chmod +x /usr/local/bin/opengrep
35+ echo "[+] Finished installing opengrep"
36+
37+ - name : " Run Opengrep"
38+ run : opengrep scan --metrics=off --sarif-output ./results.sarif .
39+
40+ - name : " Upload SARIF file"
41+ uses : github/codeql-action/upload-sarif@v3
42+ with :
43+ sarif_file : results.sarif
44+ if : always()
You can’t perform that action at this time.
0 commit comments