COS301-SE-2024 / TuneIn

Introducing TuneIn, where music becomes a shared experience that connects people, transcending distances and creating lasting bonds through the power of music.
4 stars 0 forks source link

merge /user/* and more endpoints #75

Closed lkekana closed 2 weeks ago

lkekana commented 2 weeks ago

implemented the following endpoints:

GET /users/rooms (to get a user's rooms) POST /users/rooms (to create a new room) GET /users/rooms/recent (see a user's recent rooms) GET /users/rooms/foryou (get recommended rooms. random for now) GET /users/friends (get a user's friends) GET /users/following (get a user's following) GET /users/followers (get a user's followers) GET /rooms/new (to get newly created rooms) POST /profile/{username}/follow (to follow an account) POST /profile/{username}/follow (to unfollow an account)

as well as revised POST /auth/login to use the Cognito access token for simplicity and added POST /auth/register to handle registration & adding user to db

all tested as well

note: my commits are fewer here bc Linda merged my branch into dev prematurely

gitguardian[bot] commented 2 weeks ago

⚠️ GitGuardian has uncovered 2 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 | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [11683612](https://dashboard.gitguardian.com/workspace/301252/incidents/11683612?occurrence=146052070) | Triggered | Generic High Entropy Secret | cb7e4b20a87f4e6a558b4a89b38b2fcfadb6776e | backend/tools/simulate-auth.js | [View secret](https://github.com/COS301-SE-2024/TuneIn/commit/cb7e4b20a87f4e6a558b4a89b38b2fcfadb6776e#diff-6b784f911043fa5986dce294ce3100458650a1de36a2c924bd5b0566b2d33022R53) | | [11683613](https://dashboard.gitguardian.com/workspace/301252/incidents/11683613?occurrence=146052071) | Triggered | Bearer Token | cb7e4b20a87f4e6a558b4a89b38b2fcfadb6776e | backend/tools/simulate-auth.js | [View secret](https://github.com/COS301-SE-2024/TuneIn/commit/cb7e4b20a87f4e6a558b4a89b38b2fcfadb6776e#diff-6b784f911043fa5986dce294ce3100458650a1de36a2c924bd5b0566b2d33022R50) |
🛠 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/secrets-detection-engine/detectors/generics/generic_high_entropy_secret#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.