Update semgrep.yml #22
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: | |
workflow_dispatch: {} | |
pull_request: {} | |
push: | |
branches: | |
- develop | |
- main | |
paths: | |
- .github/workflows/semgrep.yml | |
schedule: | |
# random HH:MM to avoid a load spike on GitHub Actions at 00:00 | |
- cron: '56 22 * * *' | |
jobs: | |
semgrep: | |
name: semgrep/ci | |
runs-on: ubuntu-20.04 | |
env: | |
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | |
container: | |
image: semgrep/semgrep | |
if: (github.actor != 'dependabot[bot]') | |
steps: | |
#- uses: actions/checkout@v4 | |
#- run: semgrep ci --output semgrep-findings.json --json | |
- name: Checkout Security for semgrep script | |
uses: actions/checkout@v4 | |
with: | |
repository: zeta-chain/semgrep-utilities | |
- run: python semgrep-json-to-sarif.py --help | |
- run: ls -l /usr/local/bin | |
- run: semgrep-json-to-sarif.py | |
#- run: curl -o semgrep-json-to-sarif.py https://raw.githubusercontent.com/r2c-CSE/semgrep-utilities/refs/heads/main/utilities/github-sarif-helper/src/semgrep-json-to-sarif.py | |
#- run: python semgrep-json-to-sarif.py --json semgrep-findings.json --sarif semgrep-github.sarif | |
- name: Upload SARIF file for GitHub Advanced Security Dashboard | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: semgrep-github.sarif |