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

Feat : Add base to allow factory setup #375

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

Rotheem
Copy link
Contributor

@Rotheem Rotheem commented Mar 16, 2024

No description provided.

Copy link

gitguardian bot commented Mar 16, 2024

⚠️ GitGuardian has uncovered 7 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
7298663 Triggered RSA Private Key 3a26d06 .env.template View secret
7298663 Triggered RSA Private Key b923f6b .env.template View secret
7298668 Triggered Generic High Entropy Secret 3a26d06 .env.template View secret
7298668 Triggered Generic High Entropy Secret b923f6b .env.template View secret
7298675 Triggered Generic High Entropy Secret 3a26d06 .env.template View secret
7298675 Triggered Generic High Entropy Secret b923f6b .env.template View secret
7298675 Triggered Generic High Entropy Secret 3731e48 .env.template View secret
🛠 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!

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

Attention: Patch coverage is 29.35780% with 77 lines in your changes are missing coverage. Please review.

Project coverage is 77.72%. Comparing base (c1156a4) to head (50869ec).
Report is 9 commits behind head on main.

Files Patch % Lines
app/app.py 23.07% 30 Missing ⚠️
app/core/factory_core.py 25.71% 26 Missing ⚠️
app/modules/calendar/factory_calendar.py 0.00% 16 Missing ⚠️
app/utils/factory.py 66.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #375      +/-   ##
==========================================
- Coverage   78.69%   77.72%   -0.98%     
==========================================
  Files          81       84       +3     
  Lines        5459     5566     +107     
==========================================
+ Hits         4296     4326      +30     
- Misses       1163     1240      +77     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@armanddidierjean armanddidierjean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think factories object should be classes inherit from the base Factory class

DATABASE_DEBUG = False #If True, will print all SQL queries in the console
FACTORIES = False #If True, will use factories to populate the database with fake data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FACTORIES = False #If True, will use factories to populate the database with fake data
USE_FACTORIES = False # Enabling factories populate empty database with test data

I think we could put this variable after USE_FIREBASE

def __init__(
self,
name: str,
depends_on: list[str],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on a factory object instead of a string to have python check the values

f"Module {factories_file} does not declare a module. It won't be enabled.",
)

action = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should find a solution a bit less complicated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants