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

fix: set hashlib's usedforsecurity=False to prevent weak hash #303

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

feba-rajan
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

This PR is for a security issue identified by the security scanner, a high priority issue related to the use of weak SHA-1 hashing for security purposes in our codebase. SHA-1 is considered insecure for cryptographic operations. SHA-1 is used in the codebase for cache-busting, which is not a security-sensitive task. To prevent the security scanner from flagging this as a vulnerability, we explicitly set usedforsecurity=False in all instances where SHA-1 is used for non-security tasks.

Related Tickets & Documents

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: The existing tests already validate the functionality affected by this change. Adding usedforsecurity=False doesn't change anything, so no new tests are needed.
  • I need help with writing tests

Copy link
Contributor

@CarlosCoelhoSL CarlosCoelhoSL left a comment

Choose a reason for hiding this comment

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

lgtm

@feba-rajan feba-rajan merged commit 0d157e9 into main Oct 8, 2024
8 checks passed
@feba-rajan feba-rajan deleted the fix/static-scan-high-security-alert branch October 8, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants