-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Support for bun audit (like npm/yarn audit) #5359
Comments
I'm kinda surprised this command is really missing. Or do I miss something? |
+1 |
I don't think it's implemented in v1.0.3 either. So no. No update. Maybe it will be part of any future roadmap? |
Uh I see, do you know of any temporary alternatives we could use until then? Ones that doesn't require a specific pm (I. E. Could be used with bun) |
Not really.. but maybe try upgradeps: bun install upgradeps And then run (for the audit feature): bunx upgradeps Example output: upgradeps v2.0.6 ─ run with -h to output usage information
✘ typescript 5.0.0 → 5.2.2 minor last publish 1 month ago
1 dependency 1 minor |
+1 |
2 similar comments
+1 |
+1 |
Anything here planned in the next time? Especially |
Would love to see this added as well. |
It would be great to have this feature in bun. Ideally with features that are missing in other package managers, such as the ability to ignore certain security vulnerabilities for the time being by giving a reason (like implemented in npm-audit-resolver) |
Trivy is a useful security scanning tool for polyglot projects. Rather than just running an trivy fs /path/to/project # don't make me do stuff |
I know it sucks but I found it easier to just stick with |
This sounds like a useful workaround in theory, but it has a huge issue: the package versions in a lockfile that This workaround would get a lot more practical if |
I'm now in a situation where I maintain a repo that has "9 high severity vulnerabilities" but I can't properly audit or upgrade them using I am fine with this for personal projects, but I'm worried this is borderline-untenable for anyone considering If And at least in the short-term it would be possible to set up a GitHub action to run such a check on a schedule in each individual repo for now. |
If you run |
I believe yarn v1 does have an audit command: https://classic.yarnpkg.com/lang/en/docs/cli/audit/ |
Great suggestion! |
Ah, that's fantastic! 😄 I don't use I'm not a huge fan of having to use EDIT: here's a little script I made to avoid writing #!/usr/bin/env bun
import { $, spawn } from "bun";
import { cp, mkdtemp, rm } from "node:fs/promises";
import { join } from "node:path";
import { exit } from "node:process";
const tempDir = await mkdtemp("/tmp/bun-audit-temp-");
let exitCode = 0;
try {
await cp("package.json", join(tempDir, "package.json"));
await $`bun bun.lockb > ${join(tempDir, "yarn.lock")}`;
exitCode = await spawn(["bun", "x", "yarn", "--cwd", tempDir, "audit"], {
stdout: "inherit",
}).exited;
} finally {
await rm(tempDir, { force: true, recursive: true });
}
exit(exitCode); EDIT 2: Published as a package, so you can run: |
I've been relying on this for a while, but it's kind of inadequate for addressing vulns. The
A |
I've seen cases where the Using package.json overrides
In this case it finds an issue with It's possible newer lockfile versions of yarn handle this better or there might be some other syntax that works with the v1 lockfile. Pointing to a commit on github
One sort of workaround is to use
|
I would say this would have to some how call bun.lockb and do the same functions as yarn audit. It is possible I will see after my |
As this would be useful to check for vulnerabilities. I don't know how it will exactly would work, but @Jarred-Sumner or someone from the core team could possibly help me? |
Any updates on this outside of using yarn? |
I will look into making this command as I kinda ran out of ideas as I wasn't quick enough to make |
This is becoming more and more of an issue with some of my projects. When there are vulnerabilities in transitive dependencies like |
@Eveeifyeve you made any progress? I'm thinking about taking a stab at it and don't want to duplicate efforts |
No I have been really busy doing other things I now work at other company’s then I was before. |
What is the problem this feature would solve?
I'm trying to replace node, yarn & jest with bun and the only missing feature to replace our workflow is an equivalent to
yarn audit
.What is the feature you are proposing to solve the problem?
Add
bun audit
which would work like npm/yarn audit.What alternatives have you considered?
I run
bun install
with the--yarn
flag to be able to runyarn audit
The text was updated successfully, but these errors were encountered: