-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add npm audit checks to CI workflow #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add 'Audit - Production' job for production dependencies - Add 'Audit - All' job for all dependencies - Follow existing CI job pattern with 15-minute timeout
🤖 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 CI jobs to .github/workflows/ci.yml: Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub
participant Runner as Actions Runner
participant Registry as npm Registry
Dev->>GH: Push / Open PR
GH->>Runner: Trigger CI workflow
par audit-prod
Runner->>Runner: actions/checkout
Runner->>Runner: setup-node (NODE_VERSION, npm cache)
Runner->>Registry: npm ci --prefer-offline --no-audit
Runner->>Runner: npm audit --production
alt vulnerabilities
Runner-->>GH: Fail/report vulnerabilities
else no vulnerabilities
Runner-->>GH: Success
end
and audit-all
Runner->>Runner: actions/checkout
Runner->>Runner: setup-node (NODE_VERSION, npm cache)
Runner->>Registry: npm ci --prefer-offline --no-audit
Runner->>Runner: npm audit
alt vulnerabilities
Runner-->>GH: Fail/report vulnerabilities
else no vulnerabilities
Runner-->>GH: Success
end
end
Possibly related PRs
Suggested reviewers
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build & Test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Adds two new GitHub Actions jobs to the CI workflow for npm security auditing:
npm audit --productionto check production dependencies onlynpm auditto check all dependenciesThis follows the pattern established in deepnote/deepnote#36. The "Audit - Production" job will become a required status check via a separate terraform update.
Changes
audit-prodjob usingnpm audit --productionaudit-alljob usingnpm auditnpm ci --prefer-offline --no-auditReview Checklist
Critical items to verify:
npm audit --productioncorrectly filters to production dependencies onlynpm ci --prefer-offline --no-auditdoesn't interfere with audit commandsContext:
Link to Devin run: https://app.devin.ai/sessions/1494020fb75d493c8b35d32b2f17aea9
Requested by: @jamesbhobbs
Summary by CodeRabbit