Stored Favorite / Membership Counts#601
Conversation
| schedule: cronTime.everyDayAt(12), | ||
| image: backendImage, | ||
| secret: fyhSecret, | ||
| cmd: ["python", "manage.py", "import_paideia_events"], |
| ) | ||
| except Exception as e: | ||
| self.stdout.write( | ||
| self.style.SUCCESS( |
| BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | ||
|
|
||
| # Django Setting Environment Variable | ||
| os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pennclubs.settings.base") |
There was a problem hiding this comment.
Not entirely sure honestly I think I may have added it on accident. Removing.
There was a problem hiding this comment.
Oh never mind I needed that to run the test cases for some reason, won't include it in PR though.
| for club in queryset: | ||
| club.favorite_count = club.temp_favorite_count | ||
| club.membership_count = club.temp_membership_count | ||
| club.save() |
|
Could be an interesting exercise to upgrade to 5.0 and also update related deps (which will include upgrading the Python version which has a host of its own benefits), so that we can take advantage of this. Wdyt? |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| - | Generic Password | e3e4e01 | docker-compose.test.yaml | View secret | |
| - | Generic Password | 8b08062 | docker-compose.test.yaml | View secret | |
| - | Generic Password | 8b08062 | docker-compose.test.yaml | View secret | |
| - | Generic Password | e3e4e01 | docker-compose.test.yaml | View secret | |
| 9451515 | Triggered | Generic Password | e28f1e9 | backend/docker-compose.yaml | 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.
Our GitHub checks need improvements? Share your feedbacks!
PR to cache favorite / membership counts for clubs. The alternative is recalculating this for every query.