Skip to content

Conversation

@ModusOperandom
Copy link
Owner

Potential fix for https://github.com/ModusOperandom/skills-introduction-to-repository-management/security/code-scanning/1

To fix the issue, we need to replace the insecure hashlib.sha256 hashing function with a secure password hashing algorithm. The best approach is to use a library like argon2-cffi, which implements the Argon2 password hashing algorithm. Argon2 is computationally expensive, includes built-in salting, and is specifically designed for password hashing.

Steps to fix:

  1. Install the argon2-cffi library if it is not already installed.
  2. Replace the hash_password function to use Argon2 for hashing passwords.
  3. Update the login function to verify the password using Argon2's verify method instead of directly comparing hashed values.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…cryptographic hashing algorithm on sensitive data

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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