File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,22 +12,30 @@ jobs:
1212
1313 - name : Install Semgrep and jq
1414 run : |
15- pip install semgrep jq
15+ pip install --upgrade pip
16+ pip install --upgrade semgrep jq
17+
1618 - name : Run Semgrep Scan and Save JSON
1719 run : |
18- semgrep --config p/go --json > semgrep-report.json
20+ semgrep \
21+ --config "https://semgrep.dev/p/golang" \
22+ --json > semgrep-report.json
23+
1924 - name : Count Critical and Error findings
2025 id : findings
2126 run : |
2227 count=$(jq '[.results[] | select(.extra.severity == "CRITICAL" or .extra.severity == "ERROR")] | length' semgrep-report.json)
2328 echo "count=$count" >> $GITHUB_OUTPUT
29+
2430 - name : Send findings to webhook
31+ if : always()
2532 env :
2633 ROCKETCHAT_WEBHOOK_URL : ${{ secrets.ROCKETCHAT_WEBHOOK_URL }}
2734 run : |
2835 curl -X POST "$ROCKETCHAT_WEBHOOK_URL" \
2936 -H "Content-Type: application/json" \
3037 --data "{\"alias\":\"Security Notifications\",\"text\":\"**Semgrep Report - ($GITHUB_REPOSITORY)**\n\n**Finding count (Critical and Error):** ${{ steps.findings.outputs.count }}\"}"
38+
3139 - name : Print findings in logs
3240 run : |
3341 echo "=== ALL SEMGREP FINDINGS ==="
You can’t perform that action at this time.
0 commit comments