Skip to content

Commit 2ce34cc

Browse files
authored
ci: split security audit into blocking prod and informational full scans (#857)
1 parent eb991fb commit 2ce34cc

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,23 @@ jobs:
278278
- name: Install dependencies
279279
run: pnpm install --frozen-lockfile
280280

281-
- name: Run security audit
282-
run: pnpm audit --audit-level=moderate
281+
- name: Audit production dependencies (blocking)
282+
run: pnpm audit --prod --audit-level=moderate
283+
284+
- name: Audit all dependencies (informational)
285+
continue-on-error: true
286+
run: |
287+
if ! pnpm audit --audit-level=moderate > audit.txt 2>&1; then
288+
{
289+
echo "## Security Audit — full dependency tree (informational)"
290+
echo ""
291+
echo "⚠️ Advisories found in dev/transitive dependencies (non-blocking):"
292+
echo '```'
293+
cat audit.txt
294+
echo '```'
295+
} >> "$GITHUB_STEP_SUMMARY"
296+
echo "::warning::Informational audit found advisories in the full dependency tree — see the job summary."
297+
fi
283298
284299
reporting:
285300
name: Reporting (Coverage and Bundle Analysis)

0 commit comments

Comments
 (0)