Kludex / fastapi-microservices

Fully Python async FastAPI project! 🚀
MIT License
441 stars 43 forks source link

Feat/add user token test #80

Open hasnain095 opened 1 year ago

hasnain095 commented 1 year ago
hasnain095 commented 1 year ago

Closed previous pull request, this resolves issue #49

gitguardian[bot] commented 1 year ago

⚠️ GitGuardian has uncovered 4 secrets 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 secrets in your pull request
| GitGuardian id | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic Password | b68e839d30b8aa0f9cf4b5eb6af5bde39985eccb | users/tests/conftest.py | [View secret](https://github.com/Kludex/fastapi-microservices/commit/b68e839d30b8aa0f9cf4b5eb6af5bde39985eccb#diff-1ac5f2901f0f69cab60a592b22df892dR64) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic Password | 76e806e91469a0f75efdd7dffdb8b48fd575f796 | users/tests/conftest.py | [View secret](https://github.com/Kludex/fastapi-microservices/commit/76e806e91469a0f75efdd7dffdb8b48fd575f796#diff-1ac5f2901f0f69cab60a592b22df892dR64) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic Password | 43d52673ee57d2bb74e32bc9e435a85b895d9147 | users/tests/conftest.py | [View secret](https://github.com/Kludex/fastapi-microservices/commit/43d52673ee57d2bb74e32bc9e435a85b895d9147#diff-1ac5f2901f0f69cab60a592b22df892dR64) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic Password | eabf79148ef4ddd88b14bbdb3db7ff0b236bcefe | users/tests/conftest.py | [View secret](https://github.com/Kludex/fastapi-microservices/commit/eabf79148ef4ddd88b14bbdb3db7ff0b236bcefe#diff-1ac5f2901f0f69cab60a592b22df892dR64) |
🛠 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 secrets 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 these secrets](https://docs.gitguardian.com/secrets-detection/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.

Our GitHub checks need improvements? Share your feedbacks!

hasnain095 commented 1 year ago

Considering adding FactoryBoy to avoid GitGuardian Security Check errors.

hasnain095 commented 1 year ago

@Kludex can we close this PR or you want some other changes?

Kludex commented 1 year ago

@Kludex can we close this PR or you want some other changes?

This cannot happen: https://github.com/Kludex/fastapi-microservices/pull/80#discussion_r1158032662

Because we rollback, so we need to remove that conditional :eyes:

hasnain095 commented 1 year ago

Should be fixed now

hasnain095 commented 1 year ago

@Kludex can we close this now?