Skip to content

Feature: Site User endpoints #31

Feature: Site User endpoints

Feature: Site User endpoints #31

Workflow file for this run

name: Security
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "17 9 * * 1"
workflow_dispatch:
permissions:
contents: read
env:
OPENGREP_VERSION: v1.27.1
TRIVY_VERSION: v0.74.0
jobs:
sast:
name: Opengrep SAST
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install Opengrep
run: |
curl --fail --location --silent --show-error \
"https://github.com/opengrep/opengrep/releases/download/${OPENGREP_VERSION}/opengrep_manylinux_x86" \
--output "$RUNNER_TEMP/opengrep"
chmod 0555 "$RUNNER_TEMP/opengrep"
"$RUNNER_TEMP/opengrep" --version
- name: Scan source code
run: |
mkdir -p reports
"$RUNNER_TEMP/opengrep" scan \
--config auto \
--no-rewrite-rule-ids \
--disable-version-check \
--error \
--sarif-output=reports/opengrep.sarif \
src/
- name: Upload Opengrep report
if: always()
uses: actions/upload-artifact@v7.0.1
with:
name: opengrep-sarif
path: reports/opengrep.sarif
if-no-files-found: error
retention-days: 14
sca:
name: Trivy SCA
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install Trivy
uses: aquasecurity/setup-trivy@v0.3.1
with:
version: ${{ env.TRIVY_VERSION }}
cache: true
- name: Scan locked dependencies
run: |
mkdir -p reports
trivy fs \
--scanners vuln \
--include-dev-deps \
--format sarif \
--output reports/trivy.sarif \
uv.lock
trivy fs \
--scanners vuln \
--include-dev-deps \
--skip-db-update \
--format cyclonedx \
--output reports/sbom.cdx.json \
uv.lock
trivy fs \
--scanners vuln \
--include-dev-deps \
--skip-db-update \
--severity HIGH,CRITICAL \
--exit-code 1 \
uv.lock
- name: Upload Trivy reports
if: always()
uses: actions/upload-artifact@v7.0.1
with:
name: trivy-reports
path: |
reports/trivy.sarif
reports/sbom.cdx.json
if-no-files-found: error
retention-days: 14