fix sempgrep job #68
Workflow file for this run
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: | |
# Scan changed files in PRs, block on new issues only (existing issues ignored) | |
# pull_request: | |
# branches: [ main ] | |
# Scan all files on branches, block on any issues | |
push: | |
branches: | |
- '**' | |
# Schedule this job to run at a certain time, using cron syntax | |
# Note that * is a special character in YAML so you have to quote this string | |
# schedule: | |
# - cron: '30 0 1,15 * *' # scheduled for 00:30 UTC on both the 1st and 15th of the month | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
defaults: | |
run: | |
working-directory: src | |
jobs: | |
semgrep: | |
name: scan | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: src | |
container: | |
image: semgrep/semgrep | |
steps: | |
# Fetch project source | |
- uses: actions/checkout@v4 | |
# Run the "semgrep ci" command on the command line of the docker image. | |
- run: semgrep ci --config "p/ci" --config "p/python" --config "p/owasp-top-ten" --sarif --output=semgrep.sarif | |
env: | |
# Connect to Semgrep Cloud Platform through your SEMGREP_APP_TOKEN. | |
# Generate a token from Semgrep Cloud Platform > Settings | |
# and add it to your GitHub secrets. | |
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} |