-
Notifications
You must be signed in to change notification settings - Fork 7
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
Setup new bot data controller #636
Conversation
carkod
commented
Dec 7, 2024
•
edited
Loading
edited
- Part of SQL migration
- This new way of structuring, also favors composition of database calls (initiate an instance of the controller to do CRUD) rather than through inheritance (Database object that contains all CRUDs of all databases.
By creating simpler and atomic db operations as a separate layer, we reduce complexity for testing (duplicated code), decouple dependencies of database and services and also reduce circular imports.
ac6477a
to
553c5d6
Compare
553c5d6
to
72fa738
Compare
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
14478150 | Triggered | Generic Password | 365bab6 | api/database/utils.py | 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 secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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.
5d54def
to
5735dfa
Compare
a4d0348
to
81a04a4
Compare
The reason behind this is that pydantic table models are SQL models which are different from traditional pydantic models. So to reduce repetition, we have to create a BotBase which is inherited by the "guardian" i.e. the BotModel which is use to guard data everywhere, and the separation of database tables i.e. BotTable
81a04a4
to
54d3b28
Compare
1bc0443
to
48e5032
Compare
48e5032
to
722e9c1
Compare
7c90e34
to
37648d0
Compare
The DealFactory is a literal factory, not a factory pattern, in that we do know what kind of object we are creating, but we are unifying into a single point of entry (singleton)
37648d0
to
e1b4029
Compare