audit can't find multi-line yaml strings and raises a ValueError #227
Labels
bug
The issue describes a malfunctioning aspect of the project.
false negatives
help wanted
Indicates that we would like someone that’s not a maintainer to work on the issue.
triaged
The issue has been reviewed but has not been solved yet.
Since audit expects a secret to only be on one line, it can't find yaml multi-line strings.
Relevant code snippet:
detect-secrets/detect_secrets/core/audit.py
Lines 604 to 617 in 17918d8
In 0.12.4 and before, this was fine because then
get_raw_secret_value
would fail, and we would catch theSecretNotFoundOnSpecifiedLineError
and handle it properly (i.e. show the user an error and let them move onto the next secret).In 0.12.5 we made it so that
get_raw_secret_value
can find multi-line secrets by using plugins'analyze
function. However,snippet.highlight_line
doesn't know that, and it fails with aValueError
, causing theaudit
process to terminate.There are 2 tasks to this:
ValueError
causing the program to crashYAML file: https://i.fluffy.cc/Sm96l1X9PHsvKwPCNNMgBSHjGg56qhTg.html
Generated baseline: https://i.fluffy.cc/4LgX9jCZ9cblGlXJ46bv30hvTFPppz9L.html
The text was updated successfully, but these errors were encountered: