Skip to content

C++: Recognize password struct fields. #7802

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
merged 2 commits into from
Feb 2, 2022
Merged

Conversation

geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Feb 1, 2022

This is an enhancement to cpp/cleartext-transmission that allows it to spot passwords that are struct or class fields (much more reliably). I've weeded out a lot of false positive results in previous PRs, but I wanted to address one of the causes of missing results so that we don't just end up having very few results overall.

Note that the SensitiveNode isn't a perfect implementation; it tries to avoid matching all accesses to a SensitiveVariable to reduce duplicate results where a variable is accessed multiple times, but this is not done in an especially principled or reliable manner. Happy to take suggestions on how to pick the right Node better.

New results: https://lgtm.com/query/6627472974229539370/
All results: https://lgtm.com/query/7344851133823789124/

@geoffw0 geoffw0 added the C++ label Feb 1, 2022
@geoffw0 geoffw0 requested a review from a team as a code owner February 1, 2022 19:32
Copy link
Contributor

@MathiasVP MathiasVP left a comment

Choose a reason for hiding this comment

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

LGTM!

@MathiasVP MathiasVP merged commit 1aa32b0 into github:main Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants