Can't detect secret in comment line without single/double quote
I'm running detect-secrets on .tsx file and secret cannot be detected in comment line if secret without single/double quote

$ pre-commit run --all-files
Detect secrets...........................................................Passed
If add single/double quote , it works as expectations

$ pre-commit run --all-files
Detect secrets...........................................................Failed
- hook id: detect-secrets
- exit code: 1
ERROR: Potential secrets about to be committed to git repo!
Secret Type: Base64 High Entropy String
Location: src/const/xxxxxxx.tsx:9
My detect-secrets and pre-commit version could see below:
$ pip3 list | grep 'detect\|pre'
detect-secrets 1.0.3
pre-commit 2.12.1
Is it design for this? Or it need to improve as feature?
I also have the same problem, my version of detect-secrets is 1.1.0. but when I add these contents into a big file, the secret can be exposed and not need to add quote. but if add quote, the hard-code issue must be detected and the secret is accurate. for example:
-
secret:"nd5jm27k130m741et1e86jb6gjud3b97"&lifetime=10000|0

-
secret:nd5jm27k130m741et1e86jb6gjud3b97&lifetime=10000|application/json; charset=UTF-8|12ms
