interface

Security.Scanner

interface Scanner

  • scan: (info: { packages: Package[] }) => Promise<Advisory[]>

    Performs an advisory check when the user runs bun add <package> [...packages] or a similar command.

    If this function throws, Bun immediately stops the install and prints the error to the user.

  • version: '1'

    The scanner API version this scanner implements.

    Bun uses it to distinguish API versions, since third-party scanner package versions are unrelated to Bun versions. A future revision of the API may drop support for version 1.