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

Potential fix for code scanning alert no. 15: Clear text storage of sensitive information #22

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

KDust7
Copy link
Contributor

@KDust7 KDust7 commented Feb 24, 2025

Potential fix for https://github.com/NightProxy/Space/security/code-scanning/15

To fix the problem, we need to ensure that the key binding value is encrypted before being stored in localStorage. We can use the Node.js crypto module to encrypt the value. The decryption should be done when retrieving the value from localStorage.

  1. Import the crypto module.
  2. Define encryption and decryption functions.
  3. Encrypt the key binding value before storing it in localStorage.
  4. Decrypt the key binding value when retrieving it from localStorage.

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

…ensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@KDust7 KDust7 marked this pull request as ready for review February 24, 2025 12:41
@KDust7 KDust7 merged commit e80b704 into main Feb 24, 2025
1 of 2 checks passed
@KDust7 KDust7 deleted the alert-autofix-15 branch February 24, 2025 12:48
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.

1 participant