Skip to content

Commit d875027

Browse files
refactor: use reusable workflow for semgrep (#311)
Updated the build-test-release workflow to use [sast-scan](https://github.com/splunk/sast-scanning) owned by product security team instead of using custom implementation. Ref: https://splunk.atlassian.net/browse/ADDON-72309 Test workflow run: https://github.com/splunk/splunk-add-on-for-servicenow/actions/runs/10596615468 Tested on PR: splunk/splunk-add-on-for-servicenow#751 Workflow is not tested for the failure scenario because we need to have blocker findings by the semgrep in order to fail the workflow. Currently all rules are in monitor mode so any findings by the semgrep will be non-blocker resulting in semgrep stage to pass everytime. Discussion with the semgrep team: https://splunk.slack.com/archives/C011ELTV7FG/p1724923496371529
1 parent 273675b commit d875027

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,19 +305,11 @@ jobs:
305305
with:
306306
extra_args: -x .github/workflows/exclude-patterns.txt --json --only-verified
307307
version: 3.77.0
308-
308+
309309
semgrep:
310-
runs-on: ubuntu-latest
311-
name: security-sast-semgrep
312-
container:
313-
image: returntocorp/semgrep
314-
steps:
315-
- uses: actions/checkout@v4
316-
- name: Semgrep
317-
id: semgrep
318-
run: semgrep ci
319-
env:
320-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_PUBLISH_TOKEN }}
310+
uses: splunk/sast-scanning/.github/workflows/sast-scan.yml@main
311+
secrets:
312+
SEMGREP_KEY: ${{ secrets.SEMGREP_PUBLISH_TOKEN }}
321313

322314
test-inventory:
323315
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)