-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] How to skip password detection in Java Properties File ? #319
Comments
If you are using pre-commit you can use the Let us know if this works for you. |
The same issue we are facing. |
From https://en.wikipedia.org/wiki/.properties, it looks like the issue with this is that the Java >>> import configparser
>>> parser = configparser.ConfigParser()
>>> parser.read_string("""\
... [section]
... password = xyz # pragma: allowlist secret
... """)
>>> print(parser.items('section')[0])
('password', 'xyz # pragma: allowlist secret') The only way we can address this is by adding some form of "skip next line" pragma, like |
Fwiw I just encountered this same issue in a Dockerfile today. It will be very helpful to have a "skip next line" pragma. Anything I can do to help move this along? |
@nickiaconis : if you wanted to help, you can certainly contribute a PR that bases atop the current I'd imagine that with this context object, you can create a new filter that checks the line before to see if the flagged secret has been ignored. |
Hello,
We have tried to allow a secret in a property file but java read the full string
"xyz # pragram: allowlist secrets"
How to manage it ?
Thanks
Sylvain
The text was updated successfully, but these errors were encountered: