Menu

Gitleaks or Semgrep Clean Scan: Hash Every Policy Input
📰

Gitleaks or Semgrep Clean Scan: Hash Every Policy Input

DEV Community: cicd·Jeremy Longshore·3 days ago
#mo69gizu
#devtocicd#devto#dev#gitleaks#config
Long article (3372 words) — no AI summary yet.
Reading 0:00
15s threshold

A scanner that reads its rules from the repository it is scanning can be told what to look for by that repository. If you run Gitleaks (a secret scanner) or Semgrep (a static analyzer) over code you do not fully control and file the clean report as evidence, this post gives you a way to bind that report to the config, ignore files, environment and scanner binary observed around the scan, and to refuse to call it clean when that binding fails.

When no --config flag is passed, Gitleaks picks its config from an environment variable naming a file, a second environment variable holding the TOML config text itself, a .gitleaks.toml at the target root, or its embedded defaults, in that order. It also honours a root .gitleaksignore . Semgrep has its own selectors and its own ignore sources, including .semgrepignore .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.