Skip to content

fix(security): code scanning alert no. 9: Clear text storage of sensitive information#46

Open
gablilli wants to merge 10 commits intomainfrom
alert-autofix-9
Open

fix(security): code scanning alert no. 9: Clear text storage of sensitive information#46
gablilli wants to merge 10 commits intomainfrom
alert-autofix-9

Conversation

@gablilli
Copy link
Copy Markdown
Collaborator

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.

dependabot bot and others added 10 commits November 12, 2025 13:45
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>
@vercel
Copy link
Copy Markdown

vercel bot commented Nov 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sysregister Ready Ready Preview Comment Nov 17, 2025 10:37am

@gablilli gablilli changed the title Potential fix for code scanning alert no. 9: Clear text storage of sensitive information fix(security): code scanning alert no. 9: Clear text storage of sensitive information Nov 17, 2025
@gablilli gablilli marked this pull request as ready for review November 17, 2025 10:36
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