Update semgrep.yml #2
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 | |
- master | |
paths: | |
- '**/*.py' # Modify this to match your code files if different from Python | |
- '.github/workflows/semgrep.yml' | |
pull_request: | |
branches: | |
- main | |
- master | |
workflow_dispatch: | |
jobs: | |
semgrep: | |
name: semgrep/ci | |
runs-on: ubuntu-20.04 | |
env: | |
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- name: Install Semgrep | |
run: pip install semgrep | |
- name: Run Semgrep diff scan | |
run: semgrep --config auto --diff |