diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 48c44e8..ebdf3da 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -24,19 +24,15 @@ jobs: actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status name: Scan runs-on: ubuntu-latest + container: + image: returntocorp/semgrep + options: --user 1001 steps: # Checkout project source - uses: actions/checkout@v3 - - # Scan code using project's configuration on https://semgrep.dev/manage - - uses: returntocorp/semgrep-action@fcd5ab7459e8d91cb1777481980d1b18b4fc6735 - with: - publishToken: ${{ secrets.SEMGREP_APP_TOKEN }} - publishDeployment: ${{ secrets.SEMGREP_DEPLOYMENT_ID }} - generateSarif: "1" - - # Upload SARIF file generated in previous step - - name: Upload SARIF file + # Run the "semgrep ci" command on the command line of the docker image. + - run: semgrep scan --config=auto --sarif > semgrep.sarif + - name: Upload SARIF file for GitHub Advanced Security Dashboard uses: github/codeql-action/upload-sarif@v2 with: sarif_file: semgrep.sarif