secretscan

command
v0.180.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command secretscan finds the daemons that take a secret as a plaintext value, in a config field, a flag, an environment variable or a unit file, instead of by reference.

secretscan sweep --json out.json --md out.md      # every clone under the root
secretscan repo --waive "<reason>" ./some-clone   # the gate for one repo

WHY IT EXISTS

The fleet's rule is that a daemon receives a secret by REFERENCE (a go-authn/secretsource ref such as `systemd-creds:name`, `keychain:`, `keepassxc:`, or a `file:` path whose permissions are checked), never as the value. On 2026-11-22 the first inventory of how far the fleet is from that failed because no tool did the sweep: credscan reads git remote URLs and nothing else. This is that tool.

WHAT AN ANSWER IS WORTH

A sweep that could not read reports zero. So the report opens with its DENOMINATOR (clones seen, read, skipped, files read, files unread), every clone carries how stale it is (FETCH_HEAD age, ahead/behind from the LOCAL refs, never a fetch), and the exit status is 2 when anything was skipped or unreadable: an unread clone is NOT READ, never clean.

PRECISION OVER RECALL

Names are judged by words, not substrings, and `token_file`, `password_from`, `max_tokens`, `key_file` are not plaintext secrets; see internal/secretscan.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL