Bump actions/setup-go from 5.0.1 to 5.0.2 (#94) #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Semgrep | |
on: | |
push: | |
branches: | |
- main | |
permissions: read-all | |
jobs: | |
semgrep: | |
name: Semgrep | |
runs-on: ubuntu-22.04 | |
permissions: | |
security-events: write # To upload SARIF results | |
container: | |
image: returntocorp/semgrep | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version-file: go.mod | |
- name: Verify action checksums | |
env: | |
JOB: ${{ github.job }} | |
WORKFLOW: ${{ github.workflow_ref }} | |
run: | | |
WORKFLOW=$(echo "$WORKFLOW" | cut -d '@' -f 1 | cut -d '/' -f 3-5) | |
go run ./cmd/ghasum verify -cache /__w/_actions -no-evict -offline "$WORKFLOW:$JOB" | |
- name: Perform Semgrep analysis | |
run: semgrep ci --sarif --output semgrep.sarif | |
env: | |
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | |
- name: Upload Semgrep report to GitHub | |
uses: github/codeql-action/[email protected] | |
if: ${{ failure() || success() }} | |
with: | |
sarif_file: semgrep.sarif |