mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-05-05 06:05:24 +00:00
70 lines
2.2 KiB
YAML
70 lines
2.2 KiB
YAML
name: Static Analysis
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- 'translations**'
|
|
pull_request:
|
|
branches-ignore:
|
|
- 'translations**'
|
|
workflow_dispatch:
|
|
concurrency:
|
|
group: static-analysis-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
zizmor:
|
|
name: Run zizmor
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
security-events: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Run zizmor
|
|
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
|
|
pip-audit:
|
|
name: pip-audit
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
- name: Export all requirements from lockfile
|
|
run: uv export --all-groups --format requirements-txt -o /tmp/requirements-all.txt
|
|
- name: Run pip-audit
|
|
uses: pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266 # v1.1.0
|
|
with:
|
|
inputs: /tmp/requirements-all.txt
|
|
semgrep:
|
|
name: Semgrep CE
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: semgrep/semgrep:1.155.0@sha256:cc869c685dcc0fe497c86258da9f205397d8108e56d21a86082ea4886e52784d
|
|
if: github.actor != 'dependabot[bot]'
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Run Semgrep
|
|
run: semgrep scan --config auto --sarif-output results.sarif
|
|
- name: Upload results to GitHub code scanning
|
|
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
|
|
if: always()
|
|
with:
|
|
sarif_file: results.sarif
|