mix secret_scan (secret_scan v0.1.0)

Copy Markdown View Source

Scans the current project and exits with a non-zero status when it finds a credential.

mix secret_scan

A project that isn't a Hex package selects files in its project config:

def project do
  [
    app: :my_app,
    version: "0.1.0",
    secret_scan: [
      files: ["lib", "config", "priv"],
      rules: :hexpm,
      ignore: ["test/fixtures/**"]
    ]
  ]
end

When the current project defines a Hex package, the task uses the files selected by package[:files] and the ignore globs in package[:secret_scan][:ignore]. A top-level :secret_scan config without :files can set task options for that project, including :rules, :priority_rules, :occurrences, :preview, :file_timeout, :scan_timeout, :max_concurrency, :max_findings, :max_locations, and :max_path_length. See SecretScan.scan/2 for their values, defaults, and behavior.