bun install
security related declarations
namespace
Security
namespace Security
interface Advisory
Advisory represents the result of a security scan result of a package
- description: null | string
If available, this is a brief description of the advisory that Bun will print to the user.
- level: 'warn' | 'fatal'
Level represents the degree of danger for a security advisory
Bun behaves differently depending on the values returned from the
scan()
hook:In any case, Bun always pretty prints all the advisories, but...
→ if any fatal, Bun will immediately cancel the installation and quit with a non-zero exit code
→ else if any warn, Bun will either ask the user if they'd like to continue with the install if in a TTY environment, or immediately exit if not.
- url: null | string
If available, this is a url linking to a CVE or report online so users can learn more about the advisory.
interface Package
- requestedRange: string
The range that was requested by the command
This could be a tag like
beta
or a semver range like>=4.0.0
- version: string
The resolved version to be installed that matches the requested range.
This is the exact version string, not a range.
interface Scanner
- version: '1'
This is the version of the scanner implementation. It may change in future versions, so we will use this version to discriminate between such versions. It's entirely possible this API changes in the future so much that version 1 would no longer be supported.
The version is required because third-party scanner package versions are inherently unrelated to Bun versions