Skip to content

Java: CWE-532 sensitive info logging #3090

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

Merged

Conversation

luchua-bc
Copy link
Contributor

Third-party logging utilities like Log4J and SLF4J are widely used in Java projects. This PR adds a codeql check for writing sensitive information to debug logs.

@luchua-bc luchua-bc requested review from felicitymay and a team as code owners March 18, 2020 20:04
@ghost
Copy link

ghost commented Mar 18, 2020

CLA assistant check
All committers have signed the CLA.

@luchua-bc luchua-bc force-pushed the java-insert-sensitive-info-into-log branch from 329ba28 to d932770 Compare March 20, 2020 12:20
@yo-h yo-h added the Java label May 2, 2020
Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for including a query help file with your new query. It makes it much easier for everyone to understand what your query does 😄

I've added a few suggested changes for typos and clarity.

Co-authored-by: Felicity Chapman <felicitymay@github.com>
@luchua-bc luchua-bc requested a review from a team as a code owner May 4, 2020 10:57
luchua-bc and others added 2 commits May 4, 2020 06:58
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some inline comments. Also, the ql file needs to be autoformatted to pass PR checks. If you have tested this query on some number of projects it would be nice if you could share a bit of what you learned from looking through the results.

luchua-bc added 2 commits May 12, 2020 22:57
1. Change the regex pattern from variable contains "url" to variable starts with "url"
2. Add the logging trace method to sink
@aschackmull aschackmull merged commit 5c9fb23 into github:master May 14, 2020
@luchua-bc luchua-bc deleted the java-insert-sensitive-info-into-log branch May 14, 2020 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants