Skip to content
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

Adds masking to all IDs #154

Merged
merged 10 commits into from
Aug 11, 2023
Merged

Adds masking to all IDs #154

merged 10 commits into from
Aug 11, 2023

Conversation

mattrltrent
Copy link
Member

Notes

All previous ID fields that looked something like 3, 4, or 2134 now look like an opaque "hO5XBrrTW_f3pfoHF0xwfAQ=", "Ku38qd0kCcxEbUfolmKRjMGd", or "YjJoL6Wv18l8nKxigY6vV1TJ". Without our server-side secret these cannot be cracked.

Misc

  • Adds tests.
  • Adds .env vars to Docker config.
  • Updates README.md.
  • Adds custom Gorm and JSON serialization and deserialization logic.
  • Adds Mask and Unmask functions.
  • Incorporates masking into almost every handler.

@mattrltrent mattrltrent added enhancement Enhancing something that exists feature Something new! labels Aug 10, 2023
@gitguardian
Copy link

gitguardian bot commented Aug 10, 2023

⚠️ GitGuardian has uncovered 140 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
6793264 Generic High Entropy Secret 754c561 features/auth/requests.http View secret
6793264 Generic High Entropy Secret 754c561 features/user/requests.http View secret
6793264 Generic High Entropy Secret 2662c02 features/user/requests.http View secret
6793264 Generic High Entropy Secret 2662c02 features/auth/requests.http View secret
6793264 Generic High Entropy Secret fce18f9 env-example View secret
6793264 Generic High Entropy Secret b4f2003 features/auth/requests.http View secret
6793264 Generic High Entropy Secret b4f2003 features/user/requests.http View secret
6793264 Generic High Entropy Secret 851b307 features/auth/requests.http View secret
6793264 Generic High Entropy Secret 851b307 features/user/requests.http View secret
6793264 Generic High Entropy Secret 6ab65cc features/user/requests.http View secret
6793264 Generic High Entropy Secret 6ab65cc features/auth/requests.http View secret
6793264 Generic High Entropy Secret d3a661b features/auth/requests.http View secret
6793264 Generic High Entropy Secret d3a661b features/user/requests.http View secret
7272655 Generic High Entropy Secret 754c561 features/notifications/requests.http View secret
7272655 Generic High Entropy Secret 2662c02 features/notifications/requests.http View secret
7272655 Generic High Entropy Secret b4f2003 features/notifications/requests.http View secret
7272655 Generic High Entropy Secret 851b307 features/notifications/requests.http View secret
7272655 Generic High Entropy Secret 6ab65cc features/notifications/requests.http View secret
7272655 Generic High Entropy Secret d3a661b features/notifications/requests.http View secret
7355027 Generic High Entropy Secret 754c561 features/notifications/requests.http View secret
7355027 Generic High Entropy Secret 2662c02 features/notifications/requests.http View secret
7355027 Generic High Entropy Secret b4f2003 features/notifications/requests.http View secret
7355027 Generic High Entropy Secret 851b307 features/notifications/requests.http View secret
7355027 Generic High Entropy Secret 6ab65cc features/notifications/requests.http View secret
7355027 Generic High Entropy Secret d3a661b features/notifications/requests.http View secret
7652375 Bearer Token 754c561 features/comments/requests.http View secret
7652375 Bearer Token 754c561 features/saves/requests.http View secret
7652375 Bearer Token 754c561 features/posts/requests.http View secret
7652375 Bearer Token 754c561 features/auth/requests.http View secret
7652375 Bearer Token 754c561 features/notifications/requests.http View secret
7652375 Bearer Token 754c561 features/comments/requests.http View secret
7652375 Bearer Token 754c561 features/notifications/requests.http View secret
7652375 Bearer Token 754c561 features/drafts/requests.http View secret
7652375 Bearer Token 754c561 features/votes/requests.http View secret
7652375 Bearer Token 754c561 features/hide_log/requests.http View secret
7652375 Bearer Token dd7f2a2 features/drafts/requests.http View secret
7652375 Bearer Token 754c561 features/comments/requests.http View secret
7652375 Bearer Token dd7f2a2 features/schools/requests.http View secret
7652375 Bearer Token 754c561 features/notifications/requests.http View secret
7652375 Bearer Token 754c561 features/schools/requests.http View secret
7652375 Bearer Token 754c561 features/posts/requests.http View secret
7652375 Bearer Token dd7f2a2 features/user/requests.http View secret
7652375 Bearer Token 754c561 features/admin/requests.http View secret
7652375 Bearer Token dd7f2a2 features/posts/requests.http View secret
7652375 Bearer Token dd7f2a2 features/posts/requests.http View secret
7652375 Bearer Token dd7f2a2 features/schools/requests.http View secret
7652375 Bearer Token 754c561 features/reports/requests.http View secret
7652375 Bearer Token dd7f2a2 features/votes/requests.http View secret
7652375 Bearer Token 754c561 features/admin/requests.http View secret
7652375 Bearer Token dd7f2a2 features/reports/requests.http View secret
7652375 Bearer Token dd7f2a2 features/saves/requests.http View secret
7652375 Bearer Token 754c561 features/admin/requests.http View secret
7652375 Bearer Token 754c561 features/user/requests.http View secret
7652375 Bearer Token dd7f2a2 features/saves/requests.http View secret
7652375 Bearer Token 754c561 features/feedback/requests.http View secret
7652375 Bearer Token 754c561 features/posts/requests.http View secret
7652375 Bearer Token dd7f2a2 features/drafts/requests.http View secret
7652376 Bearer Token 2662c02 features/notifications/requests.http View secret
7652376 Bearer Token 2662c02 features/admin/requests.http View secret
7652376 Bearer Token 2662c02 features/drafts/requests.http View secret
7652376 Bearer Token 2662c02 features/schools/requests.http View secret
7652376 Bearer Token 2662c02 features/posts/requests.http View secret
7652376 Bearer Token 2662c02 features/reports/requests.http View secret
7652376 Bearer Token 2662c02 features/votes/requests.http View secret
7652376 Bearer Token 2662c02 features/user/requests.http View secret
7652376 Bearer Token 2662c02 features/notifications/requests.http View secret
7652376 Bearer Token 2662c02 features/feedback/requests.http View secret
7652376 Bearer Token 2662c02 features/posts/requests.http View secret
7652376 Bearer Token 2662c02 features/saves/requests.http View secret
7652376 Bearer Token 2662c02 features/comments/requests.http View secret
7652376 Bearer Token 2662c02 features/hide_log/requests.http View secret
7652376 Bearer Token 2662c02 features/notifications/requests.http View secret
7652376 Bearer Token 2662c02 features/auth/requests.http View secret
7657096 Bearer Token b4f2003 features/votes/requests.http View secret
7657096 Bearer Token b4f2003 features/user/requests.http View secret
7657096 Bearer Token b4f2003 features/schools/requests.http View secret
7657096 Bearer Token b4f2003 features/auth/requests.http View secret
7657096 Bearer Token b4f2003 features/notifications/requests.http View secret
7657096 Bearer Token b4f2003 features/notifications/requests.http View secret
7657096 Bearer Token b4f2003 features/admin/requests.http View secret

and 60 others.

🛠 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 the best practices.
  3. Revoke and rotate these secrets.
  4. 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


🦉 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!

@TalentedB TalentedB self-requested a review August 11, 2023 04:20
@mattrltrent mattrltrent merged commit 44d2ad4 into main Aug 11, 2023
0 of 3 checks passed
@mattrltrent mattrltrent deleted the masking branch August 11, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancing something that exists feature Something new!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant