File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sansec eComscan Security Scan
2+
3+ on :
4+ push :
5+ pull_request_target :
6+ workflow_dispatch :
7+
8+ jobs :
9+ run-ecomscan :
10+ # Skip if it's a push event on a PR (it can't access secrets)
11+ if : github.event.pull_request == null || github.event_name != 'push'
12+ name : Run Sansec eComscan
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ pull-requests : read
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+ with :
22+ ref : ${{ github.event.pull_request.head.sha }}
23+ persist-credentials : false
24+
25+ - name : Download eComscan
26+ run : wget https://ecomscan.com/downloads/linux-amd64/ecomscan
27+
28+ - name : Fix permissions
29+ run : chmod +x ecomscan
30+
31+ - name : Run eComscan
32+ env :
33+ ECOMSCAN_KEY : ${{ secrets.SANSEC_LICENSE_KEY }}
34+ run : |
35+ output=$(./ecomscan --no-auto-update --skip-database --deep --format=csv .)
36+ if [ -n "$output" ]; then
37+ echo "Security issues found:"
38+ echo "$output"
39+ exit 1
40+ fi
You can’t perform that action at this time.
0 commit comments