Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions final_bad_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Hardcoded API key (Security issue)
API_KEY = "12345-abcde-secret-key"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hardcoding sensitive information like API keys directly in the code is a security vulnerability. Please consider using environment variables or a secure configuration management system to store and retrieve API keys.


def connect_to_service():
print(f"Connecting with key: {API_KEY}")

# Unused import

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The json module is imported but not used in this file. Please remove unused imports to keep the codebase clean and avoid unnecessary dependencies.

import json
Loading