sincecutoff.com
← all changes

Semgrep skips binary files by default with an opt-out flag

Introduced 2026-06-17 · score 0.92

HOW TO USE IT

When a repository scan must include binary files, run `semgrep scan --no-exclude-binary-files <path>`; binary-file exclusion is enabled by default and detects files by matching their extensions to known magic bytes.

semgrep scan --no-exclude-binary-files <path>

WHY THIS HELPS

Scan a repository containing binary files when those files need to be included.

BEFORE THIS CHANGE

The release note says to pass `--no-exclude-binary-files` to scan binary files as before.

REQUIREMENTS AND LIMITATIONS

  • Version: 1.167.0
  • --no-exclude-binary-files: Negates `--exclude-binary-files`, allowing binary files to be scanned.
  • <path> (TARGETS): File or folder to scan; without a target, `semgrep scan` searches the current working directory.
  • Binary files such as images, archives, and compiled executables are skipped by default.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card