feat: detect bun audit in scripts and CI workflows - #534
Conversation
Bun projects run dependency auditing via `bun audit` (in package.json scripts or as a CI step). The JS/TS dependency scanner only reported "npm/yarn audit" and never looked at workflow files, so a Bun project with a proper audit CI step scored 0 on this signal. - Distinguish `bun audit` from npm/yarn in scripts evidence. - New: detect `bun|npm|yarn|pnpm audit` steps in .github/workflows. - Unit test: workflow with setup-bun + bun audit is detected.
|
Warning Review limit reached
Next review available in: 55 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jwm4
left a comment
There was a problem hiding this comment.
Thanks! I tested this end to end on a real repository (stranxik/runward, which runs npm audit --audit-level=high in its CI). With your change its dependency security score goes from 50 to 60, which is exactly the intended effect. I also confirmed your unit test genuinely covers the new code: removing the workflow check makes the test fail.
A few things before merging:
-
Run
black .and commit the result. That is why CI is failing. Onlysecurity.pyneeds reformatting. -
Update the documentation. The file
docs/attributes.mdhas a Dependency Security section that lists how each tool contributes points. Please add a line for the new CI audit check (10 points) and mention bun and pnpm in the tools list, which currently only names npm and yarn audit. In this repo, docs and assessor changes are expected to land in the same PR. -
Update the section comment in the code. It still says the JavaScript section is worth 20 points, but with your addition it can now award 30.
-
Optional but recommended: tighten the package.json script check while you are in there. The existing check gives credit to any script whose text contains the word "audit" anywhere. During testing I found a real repository that gets security credit because its test script runs a file named
audit-corpus.js, which has nothing to do with security auditing. You already wrote the right regex for the CI check; applying the same one to script values (\b(?:npm|yarn|pnpm|bun)\s+audit\b) would fix that, and it would also make your new "bun audit configured" evidence label accurate.
This comment is from Bill Murdock, written with assistance from Claude Code.
Description
Bun projects run dependency auditing via
bun audit— either as a package.json script or, more commonly, as a CI step. The JS/TS dependency scanner only reported "npm/yarn audit" and never looked at workflow files, so a Bun project with a proper audit CI step scored 0 on this signal.Type of Change
Related Issues
No related issues (no existing Bun-support issue found; see sibling PRs #531, #532, #533).
Changes Made
bun auditfrom npm/yarn in package.json scripts evidence (✓ bun audit configured).bun|npm|yarn|pnpm auditsteps in.github/workflows/*.yml|yaml(+10 pts).oven-sh/setup-bun+bun auditis detected.Testing
pytest) — 178 passedChecklist
Additional Notes
Part of a small series adding first-class Bun support to agentready (bun.lock, CI gates, single-file verification).