ci: Add pnpm audit checks to CI workflow#36
Conversation
- Add audit-prod job for production dependencies only - Add audit-all job for all dependencies - Both jobs follow existing CI job pattern - Use --audit-level high to flag high/critical vulnerabilities
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
📝 WalkthroughWalkthroughAdds two GitHub Actions jobs to .github/workflows/ci.yml: audit-prod and audit-all. Each job checks out the repo, sets up pnpm and Node (using .nvmrc and pnpm cache), installs dependencies, then runs pnpm audit (with Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Push/PR
participant GH as GitHub Actions
participant AP as Job: audit-prod
participant AA as Job: audit-all
note over GH: Workflow: ci.yml
Dev->>GH: Trigger workflow
GH->>AP: Start job (parallel)
GH->>AA: Start job (parallel)
rect rgba(230,240,255,0.5)
note right of AP: audit-prod
AP->>AP: actions/checkout
AP->>AP: setup pnpm
AP->>AP: setup Node (.nvmrc, pnpm cache)
AP->>AP: pnpm install
AP->>AP: pnpm audit --prod
end
rect rgba(230,255,230,0.5)
note right of AA: audit-all
AA->>AA: actions/checkout
AA->>AA: setup pnpm
AA->>AA: setup Node (.nvmrc, pnpm cache)
AA->>AA: pnpm install
AA->>AA: pnpm audit
end
AP-->>GH: Report audit results
AA-->>GH: Report audit results
GH-->>Dev: CI status updated
Possibly related PRs
Suggested reviewers
Pre-merge checks✅ Passed checks (3 passed)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #36 +/- ##
=======================================
Coverage 93.59% 93.59%
=======================================
Files 19 19
Lines 593 593
Branches 179 120 -59
=======================================
Hits 555 555
Misses 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Change 'Audit (Production Dependencies)' to 'Audit - Production' - Change 'Audit (All Dependencies)' to 'Audit - All' - Remove --audit-level high flags to use pnpm audit defaults
|
https://github.com/deepnote/tf-org/pull/31/files once merged make this ready for review |
|
Devin’s commits are not signed, so merging is blocked. Please configure Devin: https://docs.devin.ai/integrations/gh?utm_source=chatgpt.com#commit-signing |
Add pnpm audit checks to CI workflow
Summary
Adds two new CI jobs to check for security vulnerabilities in npm dependencies:
audit-prod("Audit - Production"): Checks production dependencies only usingpnpm audit --prodaudit-all("Audit - All"): Checks all dependencies (including dev) usingpnpm auditwith default audit levelBoth jobs follow the existing CI job pattern with 3-minute timeout and standard pnpm/Node.js setup. The production audit job is intended to be added as a required status check in a follow-up tf-org PR.
Review & Testing Checklist for Human
pnpm audit --prodandpnpm auditlocally to verify they produce expected output and aren't too noisy for CINotes
This replaces the more restrictive
--audit-level highapproach with default audit levels per user request. The existing security.yml audit job remains unchanged - these are additional checks specifically for the CI workflow.Link to Devin run: https://app.devin.ai/sessions/1494020fb75d493c8b35d32b2f17aea9
Requested by: James Hobbs (@jamesbhobbs)