graasp / graasp-account

GNU Affero General Public License v3.0
0 stars 2 forks source link

feat: use password status, react hook form #364

Closed pyphilia closed 5 days ago

pyphilia commented 1 week ago

Show correct informations based on whether the user has a password set. Use POST instead of PATCH when the user does not have a password. Simplify password edition with react-hook-form.

https://github.com/user-attachments/assets/601d1606-a748-4dab-b69a-07cf0209718d

https://github.com/user-attachments/assets/e71864f8-35bf-49de-b2e9-755cb143252b

close #359

gitguardian[bot] commented 1 week ago

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [14078705](https://dashboard.gitguardian.com/workspace/208010/incidents/14078705?occurrence=168259701) | Triggered | Generic Password | 34b9126130133efa1fdac5ee9a200908100ee1df | cypress/e2e/profile/password.cy.ts | [View secret](https://github.com/graasp/graasp-account/commit/34b9126130133efa1fdac5ee9a200908100ee1df#diff-16935fbf99a528b9dcc6fa3f278502a956e821aafb356a7c8d966980f7060f04R18) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secret safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate this secret](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/generics/generic_password#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

pyphilia commented 1 week ago

Thanks for the reviews!

The fields are checked live if you submitted once. I think it's a nice pattern, otherwise you start by checking that an empty password is not strong.. current password is checked as strong password as well.

sonarcloud[bot] commented 5 days ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud