Open
Description
Describe the solution you'd like
The Gitleaks report can be written to stdout in JSON format using the predefined StdoutReportPath
const, which is a hypen. This doesn't appear to be well known or documented in the current version of the README.
# Outputs JSON format
gitleaks git --no-banner --no-color --log-level=fatal --report-format=json --report-path=-
# Outputs default format
gitleaks git --no-banner --no-color --log-level=fatal --report-format=json
Additional context
The requirement to include --report-path
when choosing a --report-format
is not mentioned in the docs. Omitting --report-path
will not warn the operator but instead fall back to default format.
Proposed change
Add JSON example under "Reporting" section, include a note on dependency between --report-format
and report-path
, add some additional warning message when user attempts to output in a supported format without supplying path
cc @zricethezav