Checkmarx / 2ms

Too many secrets (2MS) helps people protect their secrets on any file or on systems like CMS, chats and git

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"totalitemsscanned" is counting files that should be skipped

Tzurrr opened this issue · comments

Hey,
After running the command the output is:

totalitemsscanned: 1
totalsecretsfound: 0
results: {}

But, as I can see in the code - the counter goes up before checking if the secret should be skipped or not, And in a way that does not depend on it. Hence, also if the secret has been skipped - the counter will still count it

I'm not sure I understand. Your output seems to be OK: One file was scanned, but no secrets were found.

If you're talking about a specific location in the code where you sew the bug you described, please try to reproduce it and give us instructions to reproduce it, or point us to the code segment where you think there is a bug.

@baruchiro
Hey, thanks for the response!
I mean that the file shouldn't be scanned at all - we are excluding it. In my opinion, the output should be instead: 0 files scanned (we can mention that that is because the file X was excluded)

edit: I understand now that this is only relevant after adding the feature that allows skipping files, so that should be a problem that I will solve there...

I understand you opened an issue about something you are still developing 🤪
Don't do it again please 🥺.

In anyway, I left you a comment in your PR regarding exactly this- you're ignoring the files in the wrong place.

(Instead of implementing something while you're opening a bug on it, you may already implement it in the right way from the first 🤷‍♂️)