--files-with-matches
- Accepted by
opengrep scan,opengrep ci
Replaces the output with the list of files that have at least one finding, one path per line, as grep -l does.
Examples
The files, not the findings
rule.yaml
rules: - id: find-eval pattern: eval(...) message: found eval languages: [python] severity: WARNINGapp.py
eval(1)clean.py
print(1)Command and result
$ opengrep scan -q --config rule.yaml --files-with-matches .
app.py