Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Update semgrep workflow #50

Update semgrep workflow

Update semgrep workflow #50

Workflow file for this run

# Source: https://semgrep.dev/docs/semgrep-ci/sample-ci-configs/#sample-github-actions-configuration-file
# Name of this GitHub Actions workflow.
name: Semgrep OSS scan
on:
pull_request:
push:
permissions:
contents: read
jobs:
semgrep:
# User definable name of this GitHub Actions job.
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: semgrep-oss/scan
# If you are self-hosting, change the following `runs-on` value:
runs-on: ubuntu-latest
container:
# A Docker image with Semgrep installed. Do not change this.
image: semgrep/semgrep
# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')
steps:
# Fetch project source with GitHub Actions Checkout.
- uses: actions/checkout@v4
# Run the "semgrep ci" command on the command line of the docker image.
- run: semgrep scan --sarif --output=semgrep.sarif --max-target-bytes 4997120
env:
# Add the rules that Semgrep uses by setting the SEMGREP_RULES environment variable.
SEMGREP_RULES: p/default # more at semgrep.dev/explore
- name: Upload SARIF file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: semgrep.sarif
if: always()