name: "grype"
on:
  push:
    branches: ["main"]
    tags: ["v*"]
  pull_request:
permissions:
  contents: read
jobs:
  scan-source:
    name: scan-source
    runs-on: ubuntu-latest
    permissions:
      security-events: write
      actions: read
      contents: read
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: anchore/scan-action@e1165082ffb1fe366ebaf02d8526e7c4989ea9d2 # v7.4.0
        id: scan
        with:
          path: "."
          fail-build: true
          severity-cutoff: critical
      - uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
        with:
          sarif_file: ${{ steps.scan.outputs.sarif }}
