Semgrep Supply Chain #9
This file contains hidden or 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 Supply Chain | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| run-semgrep-scan: | |
| name: Run Semgrep Scan | |
| runs-on: ubuntu-latest | |
| env: | |
| SEMGREP_REPO_NAME: ${{ github.repository }} | |
| SEMGREP_COMMIT: ${{ github.sha }} | |
| SEMGREP_APP_TOKEN: ${{secrets.SEMGREP_APP_TOKEN}} | |
| container: | |
| image: semgrep/semgrep:1.125.0 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.head_ref }} | |
| - name: Configure git | |
| run: git config --global --add safe.directory "$(pwd)" | |
| - name: Run Semgrep Scan | |
| run: | | |
| semgrep ci --sarif-output=semgrep-report.sarif | |
| - name: Upload to Security Tab | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: ${{ always() && github.event.repository.visibility == 'public' }} | |
| with: | |
| sarif_file: semgrep-report.sarif | |
| category: semgrep |