detect-secrets icon indicating copy to clipboard operation
detect-secrets copied to clipboard

Calculate line number correctly in multi-line strings

Open nimrodkor opened this issue 1 year ago • 2 comments

  • 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 :)

nimrodkor avatar Mar 28 '23 12:03 nimrodkor

Hi. Please merge master to your branch to re-run CI.

jpdakran avatar Mar 28 '23 17:03 jpdakran

hi @nimrodkor 😄 could you please merge master into your branch?

lorenzodb1 avatar Nov 16 '23 00:11 lorenzodb1