-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Adds seedability to schools, post categoeries, report types, and feedback types #158
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
export MASK_SECRET="" # Found in Env | ||
|
||
go run ./scripts/main.go --seed-all # Seed every seedable table | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Code
|
||
ALTER TABLE schools | ||
DROP CONSTRAINT unique_school_names; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Constraints
scripts/main.go
Outdated
os.Exit(0) | ||
} | ||
} | ||
|
||
func seed_all() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an amazing feature
…ified, or a specific day
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
6793264 | Generic High Entropy Secret | bfbc4a4 | features/auth/requests.http | View secret |
6793264 | Generic High Entropy Secret | bfbc4a4 | features/user/requests.http | View secret |
6793264 | Generic High Entropy Secret | 5345389 | features/user/requests.http | View secret |
6793264 | Generic High Entropy Secret | 5345389 | features/auth/requests.http | View secret |
6793264 | Generic High Entropy Secret | d8d21b8 | features/user/requests.http | View secret |
6793264 | Generic High Entropy Secret | d8d21b8 | features/auth/requests.http | View secret |
7272655 | Generic High Entropy Secret | bfbc4a4 | features/notifications/requests.http | View secret |
7272655 | Generic High Entropy Secret | 5345389 | features/notifications/requests.http | View secret |
7272655 | Generic High Entropy Secret | d8d21b8 | features/notifications/requests.http | View secret |
7355027 | Generic High Entropy Secret | bfbc4a4 | features/notifications/requests.http | View secret |
7355027 | Generic High Entropy Secret | 5345389 | features/notifications/requests.http | View secret |
7355027 | Generic High Entropy Secret | d8d21b8 | features/notifications/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/drafts/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/votes/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/auth/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/reports/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/feedback/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/notifications/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/posts/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/comments/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/user/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/saves/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/schools/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/notifications/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/posts/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/admin/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/hide_log/requests.http | View secret |
7771818 | Bearer Token | bfbc4a4 | features/notifications/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/hide_log/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/auth/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/notifications/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/saves/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/comments/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/posts/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/schools/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/admin/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/notifications/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/reports/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/drafts/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/user/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/feedback/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/notifications/requests.http | View secret |
7907134 | Bearer Token | 5345389 | features/votes/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/notifications/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/notifications/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/hide_log/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/comments/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/schools/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/drafts/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/feedback/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/admin/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/auth/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/saves/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/user/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/votes/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/notifications/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/reports/requests.http | View secret |
7907134 | Bearer Token | d8d21b8 | features/posts/requests.http | 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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I fixed an error where some seeds had duplicates and added seed sets for faculties and years of study. Merging now!
Features
Adds automatic seeding for
schools
post_catergories
report_types
feedback_types
can be done through one of the following commands
go run ./scripts/main.go --seed-all # Seed every seedable table
go run ./scripts/main.go --seed-schools # Seed schools
go run ./scripts/main.go --seed-feedback-types # Seed feedback types
go run ./scripts/main.go --seed-report-types # Seed Report Types
go run ./scripts/main.go --seed-post-categories # Seed post categories
Notes
Closes #150