BHelpful / MomentMeal

MomentMeal is a marketplace for food and recipes. We help you find and create the best recipes and meal plans for you.
https://momentmeal.com/
GNU Affero General Public License v3.0
13 stars 5 forks source link

277 story implement super tokens for sign in and session management #396

Closed Andreasgdp closed 2 years ago

Andreasgdp commented 2 years ago

Purpose/Approach

Solve #277 Also solves #149 and solves #287

This PR adds:

nx-cloud[bot] commented 2 years ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit e43e0070e385b299dd88a7af4b44a85f09a27a0e. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets - [`nx affected --target=lint --base=origin/master --parallel`](https://cloud.nx.app/runs/PMVgNRW8UfX) - [`nx affected --target=build --base=origin/master --parallel`](https://cloud.nx.app/runs/VKZtxqcjIZO)

Sent with 💌 from NxCloud.

gitguardian[bot] commented 2 years ago

⚠️ GitGuardian has uncovered 21 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 | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [4062478](https://dashboard.gitguardian.com/incidents/4062478?occurrence=52844833) | Generic Private Key | 665a481893dd77003c97d3b344ef68f62c62d64b | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/665a481893dd77003c97d3b344ef68f62c62d64b#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0R37) | | [4062479](https://dashboard.gitguardian.com/incidents/4062479?occurrence=52844831) | Google OAuth2 Keys | 665a481893dd77003c97d3b344ef68f62c62d64b | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/665a481893dd77003c97d3b344ef68f62c62d64b#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0R26) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844832) | GitHub OAuth App Keys | 665a481893dd77003c97d3b344ef68f62c62d64b | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/665a481893dd77003c97d3b344ef68f62c62d64b#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0R30) | | [4062478](https://dashboard.gitguardian.com/incidents/4062478?occurrence=52844836) | Generic Private Key | c936cb36fd517232066fce4efead301fa61a0799 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/c936cb36fd517232066fce4efead301fa61a0799#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0R37) | | [4062479](https://dashboard.gitguardian.com/incidents/4062479?occurrence=52844834) | Google OAuth2 Keys | c936cb36fd517232066fce4efead301fa61a0799 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/c936cb36fd517232066fce4efead301fa61a0799#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0R26) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844835) | GitHub OAuth App Keys | c936cb36fd517232066fce4efead301fa61a0799 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/c936cb36fd517232066fce4efead301fa61a0799#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0R30) | | [4062478](https://dashboard.gitguardian.com/incidents/4062478?occurrence=52844843) | Generic Private Key | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L37) | | [4062478](https://dashboard.gitguardian.com/incidents/4062478?occurrence=52844844) | Generic Private Key | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L66) | | [4062479](https://dashboard.gitguardian.com/incidents/4062479?occurrence=52844837) | Google OAuth2 Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L26) | | [4062479](https://dashboard.gitguardian.com/incidents/4062479?occurrence=52844838) | Google OAuth2 Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L55) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844839) | GitHub OAuth App Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L30) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844840) | GitHub OAuth App Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L59) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844841) | GitHub OAuth App Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L30) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844842) | GitHub OAuth App Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | apps/api/src/modules/auth/supertokens/supertokens.service.ts | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-d224aebe7344b0e70fb49cb464c7b5735937b434e380d409a37da7ee89ed14b0L59) | | [4062478](https://dashboard.gitguardian.com/incidents/4062478?occurrence=52844847) | Generic Private Key | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | tools/generators/gen-env/files/__template__.env | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-e21c5ec613379138d26f24c1f3a9ef488610c53d76a1d4f6e739162c37a4fb26R16) | | [4062479](https://dashboard.gitguardian.com/incidents/4062479?occurrence=52844845) | Google OAuth2 Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | tools/generators/gen-env/files/__template__.env | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-e21c5ec613379138d26f24c1f3a9ef488610c53d76a1d4f6e739162c37a4fb26R9) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844846) | GitHub OAuth App Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | tools/generators/gen-env/files/__template__.env | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-e21c5ec613379138d26f24c1f3a9ef488610c53d76a1d4f6e739162c37a4fb26R12) | | [4062478](https://dashboard.gitguardian.com/incidents/4062478?occurrence=52844850) | Generic Private Key | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | tools/generators/gen-env/files/__template__.env.test | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-8f8e9ebc03619a91e8c6c30c835b3a9991b7bac6d2fd81c7dd94e09423e3f9a4R16) | | [4062479](https://dashboard.gitguardian.com/incidents/4062479?occurrence=52844848) | Google OAuth2 Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | tools/generators/gen-env/files/__template__.env.test | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-8f8e9ebc03619a91e8c6c30c835b3a9991b7bac6d2fd81c7dd94e09423e3f9a4R9) | | [4062480](https://dashboard.gitguardian.com/incidents/4062480?occurrence=52844849) | GitHub OAuth App Keys | bde29d09c8a1d271cddd6ae6597e9b5088f46f29 | tools/generators/gen-env/files/__template__.env.test | [View secret](https://github.com/BHelpful/MealTime/commit/bde29d09c8a1d271cddd6ae6597e9b5088f46f29#diff-8f8e9ebc03619a91e8c6c30c835b3a9991b7bac6d2fd81c7dd94e09423e3f9a4R12) | | [4285856](https://dashboard.gitguardian.com/incidents/4285856?occurrence=53757947) | Generic High Entropy Secret | c7c4f45d8a90616c164488e8ac55b75600c2c400 | nx.json | [View secret](https://github.com/BHelpful/MealTime/commit/c7c4f45d8a90616c164488e8ac55b75600c2c400#diff-15552e50b1b7c05b05b7ffe08ee47b5ed62b8d2039229c58972a42fd22a7381cL27) |
🛠 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/specifics/private_key_generic#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/internal-repositories-monitoring/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!

Andreasgdp commented 2 years ago

Everything is able to run locally. The CI tests will have to wait a little, so we can work with the changes from here to get going.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication