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

Add pre-commit hooks and update requirements.txt #32

Merged
merged 10 commits into from
Jun 4, 2024
Merged

Conversation

Devasy23
Copy link
Owner

This pull request adds pre-commit hooks to the project and updates the requirements.txt file with additional dependencies.

Copy link

@senior-dev-bot senior-dev-bot bot left a comment

Choose a reason for hiding this comment

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

Feedback from Senior Dev Bot

requirements.txt Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
API/route.py Fixed Show fixed Hide fixed
API/route.py Fixed Show fixed Hide fixed
API/route.py Fixed Show fixed Hide fixed
API/route.py Fixed Show fixed Hide fixed
API/route.py Fixed Show fixed Hide fixed
API/route.py Fixed Show fixed Hide fixed
API/route.py Fixed Show fixed Hide fixed
API/route.py Fixed Show fixed Hide fixed
print(f"Request failed: {e}")
response = requests.get(f"http://127.0.0.1:8000/read/{EmployeeCode}")
print(f'Request failed: {e}')
response = requests.get(f'http://127.0.0.1:8000/read/{EmployeeCode}')

Check failure

Code scanning / CodeQL

Partial server-side request forgery

Part of the URL of this request depends on a [user-provided value](1).
def Delete(EmployeeCode):
# logger.info(employees)
response = requests.delete(f"http://127.0.0.1:8000/delete/{EmployeeCode}")
response = requests.delete(f'http://127.0.0.1:8000/delete/{EmployeeCode}')

Check failure

Code scanning / CodeQL

Partial server-side request forgery

Part of the URL of this request depends on a [user-provided value](1).
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots
12.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@devansh-shah-11 devansh-shah-11 self-assigned this Jun 4, 2024
@@ -144,36 +148,36 @@
HTTPException: If the employee is not found.

"""
logging.info(f"Display information for {EmployeeCode}")
logging.debug(f'Display information for {EmployeeCode}')

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
try:
logging.info(f"Start {EmployeeCode}")
logging.debug(f'Start {EmployeeCode}')

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
@@ -193,54 +197,60 @@
HTTPException: If no data was updated during the update operation.
HTTPException: If an internal server error occurs.
"""
logging.info(f"Updating for EmployeeCode: {EmployeeCode}")
logging.debug(f'Updating for EmployeeCode: {EmployeeCode}')

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
pil_image.save(image_filename)
logging.info(f"Image saved {Employee.Name}")
logging.debug(f'Image saved {Employee.Name}')

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
)
logging.info(f"Embedding created {Employee.Name}")
logging.debug(f'Embedding created {Employee.Name}')

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
logging.info(f"Deleting for EmployeeCode: {EmployeeCode}")
client.find_one_and_delete(collection, {"EmployeeCode": EmployeeCode})
logging.info('Deleting Employee')
logging.debug(f'Deleting for EmployeeCode: {EmployeeCode}')

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
Copy link

sonarqubecloud bot commented Jun 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots
43.8% Coverage on New Code (required ≥ 80%)
10.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@Devasy23 Devasy23 merged commit e222588 into main Jun 4, 2024
6 of 7 checks passed
@Devasy23 Devasy23 deleted the added_precommit branch October 29, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants