fix(security): code scanning alert no. 9: Clear text storage of sensitive information#46
Open
fix(security): code scanning alert no. 9: Clear text storage of sensitive information#46
Conversation
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.1 to 4.0.4. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md) - [Commits](form-data/form-data@v4.0.1...v4.0.4) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.8 to 3.1.1. - [Commits](mafintosh/tar-fs@v3.0.8...v3.1.1) --- updated-dependencies: - dependency-name: tar-fs dependency-version: 3.1.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
chore(deps): bump form-data from 4.0.1 to 4.0.4
chore(deps): bump tar-fs from 3.0.8 to 3.1.1
authored-by: gablilli <167802854+gablilli@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
…tive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential fix for https://github.com/gablilli/sysregister-reborn/security/code-scanning/9
The best practice is to avoid storing passwords in any form of persistent client-side storage like localStorage. If it is absolutely necessary to cache credentials for temporary use, they must be encrypted before storage. In this code, we should remove the line that stores the plaintext password or, if there's a functional requirement to store it, encrypt it with a strong algorithm. If encryption is required, the most practical way in browser-based code is to use the SubtleCrypto API (providing AES, etc.), but this is nontrivial and typically not recommended for passwords. Ideally, simply remove
localStorage.setItem("password", pass);—and, optionally, the corresponding username storage (line 31) if not strictly needed—or encrypt before storage if requirements force us to keep them.The edit is confined to file
src/app/(auth)/auth/page.tsx, specifically around lines 31-32. If encryption has to be done, we must add a helper function and update the import section accordingly. Otherwise, simply removing the offending line suffices.Suggested fixes powered by Copilot Autofix. Review carefully before merging.