Secret ScannerInstallation

Installation

Install and set up the secret scanner in your project.

Installation

Package Managers

npm

npm install @visulima/secret-scanner

yarn

yarn add @visulima/secret-scanner

pnpm

pnpm add @visulima/secret-scanner

The right prebuilt native binary is pulled in automatically via optionalDependencies.

Supported platforms

OSArchlibc
macOSx64
macOSarm64
Linuxx64glibc / musl
Linuxarm64glibc / musl
Windowsx64MSVC
Windowsarm64MSVC

Requirements

  • Node.js: 22.13 or higher.
  • No Go / gitleaks / Rust toolchain required at install time — the platform-matched prebuilt binary is downloaded from npm.

First scan

import { scan } from "@visulima/secret-scanner";

const findings = await scan([process.cwd()]);

if (findings.length > 0) {
    console.warn(`Found ${String(findings.length)} potential secret(s).`);
}

If you prefer a CLI, install @visulima/vis and run vis secrets.

Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues