Skip to content

Introduce JetBrains Qodana quality scans #25

Introduce JetBrains Qodana quality scans

Introduce JetBrains Qodana quality scans #25

Workflow file for this run

name: 🔎 Semgrep
on:
pull_request:
paths:
- 'src/**'
- '!src/qodana.yml'
- '.github/workflows/semgrep.yml'
types: [opened, synchronize, reopened]
push:
branches:
- 'master'
paths:
- 'src/**'
- '!src/qodana.yml'
- '.github/workflows/semgrep.yml'
schedule:
- cron: '38 7 * * 0' # Random time
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
semgrep:
name: semgrep/ci
runs-on: ubuntu-latest
container:
# A Docker image with Semgrep installed. Do not change this.
image: returntocorp/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@v3
with:
fetch-depth: 0
# Run the "semgrep ci" command on the command line of the docker image.
- run: semgrep ci --sarif > 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 }}
- name: Upload SARIF file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: semgrep.sarif
if: always()