Skip to content

fix(ci): make security scan audit informational #318

fix(ci): make security scan audit informational

fix(ci): make security scan audit informational #318

Workflow file for this run

name: Security Scan
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
schedule:
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
jobs:
security_scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Security Audit
run: pnpm audit --audit-level=high
continue-on-error: true
- name: Generate audit report
if: always()
run: |
pnpm audit --json > audit-report.json || true
pnpm audit > audit-report.txt || true
- name: Upload audit reports
if: always()
uses: actions/upload-artifact@v4
with:
name: security-scan-audit-reports
path: |
audit-report.json
audit-report.txt
- name: Scan for Secrets
# Skip on scheduled runs - TruffleHog requires different base/head commits
if: github.event_name != 'schedule'
uses: trufflesecurity/trufflehog@v3.90.1
with:
path: ./
baseRef: ${{ github.event.pull_request.base.ref || github.ref }}
headRef: ${{ github.event.pull_request.head.ref || github.sha }}