chore: add npm audit in CI (#27182)

* chore: add npm audit in CI

* chore: add npm audit in CI
This commit is contained in:
Udit Takkar
2026-02-03 17:26:36 +05:30
committed by GitHub
parent 8a3074fbe7
commit d997be2a3c
2 changed files with 28 additions and 0 deletions
+9
View File
@@ -326,6 +326,13 @@ jobs:
uses: ./.github/workflows/api-v2-unit-tests.yml
secrets: inherit
security-audit:
name: Security Audit
needs: [prepare]
if: ${{ needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/security-audit.yml
secrets: inherit
check-prisma-migrations:
name: Check Prisma Migrations
needs: [prepare]
@@ -462,6 +469,7 @@ jobs:
type-check,
unit-test,
api-v2-unit-test,
security-audit,
check-api-v2-breaking-changes,
check-prisma-migrations,
integration-test,
@@ -504,6 +512,7 @@ jobs:
needs.type-check.result != 'success' ||
needs.unit-test.result != 'success' ||
needs.api-v2-unit-test.result != 'success' ||
needs.security-audit.result != 'success' ||
(needs.prepare.outputs.has-api-v2-changes == 'true' && needs.check-api-v2-breaking-changes.result != 'success') ||
(needs.prepare.outputs.has-prisma-changes == 'true' && needs.check-prisma-migrations.result != 'success') ||
needs.build.result != 'success' ||
+19
View File
@@ -0,0 +1,19 @@
name: Security Audit
on:
workflow_call:
permissions:
actions: write
contents: read
jobs:
audit:
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github
- uses: ./.github/actions/cache-checkout
- uses: ./.github/actions/yarn-install
- name: Report all vulnerabilities
run: yarn npm audit --all --recursive || true
- name: Fail on critical vulnerabilities
run: yarn npm audit --all --recursive --severity critical