detect-secrets
detect-secrets copied to clipboard
Calculate line number correctly in multi-line strings
- Please check if the PR fulfills these requirements
- [x] Tests for the changes have been added
- [ ] Docs have been added / updated
- [x] All CI checks are green
- What kind of change does this PR introduce?
This is a bugfix for a case where a multi-line yaml string has secrets in a line which is not the very first one.
- What is the current behavior?
Today, the error is pointed at the beginning of the string, even if the secret itself is in some row down the file.
-
What is the new behavior (if this is a feature change)? It will point to the actual line with the secret in it
-
Does this PR introduce a breaking change? No
-
Other information: Already working on our (bridgecrewio) fork :)
Hi. Please merge master to your branch to re-run CI.
hi @nimrodkor 😄 could you please merge master into your branch?