Skip to content
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

Python: Exclude certificate classification fo sensitive data queries #17314

Merged
merged 7 commits into from
Sep 9, 2024

Conversation

joefarebrother
Copy link
Contributor

A certificate, such as an SSL certificate or x509 certificate, often does not contain sensitive data, so the cleartext storage and cleartext logging queries result in false positive alerts when considering them. This PR excludes certificates as sources for these queries.

Comment on lines +4 to +5
def get_password():
return "password"
Copy link
Contributor

Choose a reason for hiding this comment

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

@joefarebrother Could you elaborate on the rationale behind this change? The non-Python3 version tests certificate and password writes. Whereas the Python3 test now seems to have switched from testing certificate writes to testing password writes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No significant reason. Would it be best to include tests for both?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll defer to @RasmusWL and @tausbn's judgement on that. 🙏🏼

Copy link
Member

Choose a reason for hiding this comment

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

My interpretation is that this -py3 test is here to ensure we properly support writing through pathlib.Path methods for this query, so LGTM 👍

Co-authored-by: Sid Shankar <sidshank@github.com>
Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

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

Besides minor style NIT, looks good to me 👍

Comment on lines +4 to +5
def get_password():
return "password"
Copy link
Member

Choose a reason for hiding this comment

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

My interpretation is that this -py3 test is here to ensure we properly support writing through pathlib.Path methods for this query, so LGTM 👍

joefarebrother and others added 2 commits August 30, 2024 13:25
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
@joefarebrother joefarebrother merged commit d1cca13 into github:main Sep 9, 2024
14 checks passed
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.

3 participants