-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: make own validation for password #688
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
14408331 | Triggered | Generic Password | 446007a | src/validation/isPasswordStrong.test.ts | View secret |
14408331 | Triggered | Generic Password | cbf8df9 | src/validation/isPasswordStrong.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. 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 for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a very good idea to extract the necessary code in terms of saving space compared to the small complexity added to our project 👍
Sounds good to me, I'd just add a few more test cases to completely validate the isStrongPassword code.
@ReidyT Thank you for the suggestion. I have implemented the additional tests and fixed the code smell issues detected by SonarCloud. |
8e51b91
to
446007a
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice! Thanks for this change 🦄
In this PR I propose to remove the dependency
validator
since we only use the password checking and email checking functions. It would be easy for us to include the code of these functions in our own codebase and remove the dependency on that package. This will also allow us to properly test these functions with the inputs that seem relevant to us.Why we should try to remove our dependency on this module is best illustrated by an image:
We see that in the production bundle of account, this package takes around 250Kb (rendered) of space. As we only use
isStrongPassword
andisEmail
this seems a bit much.