-
Notifications
You must be signed in to change notification settings - Fork 3
Critical issues: malformed requirements, hardcoded/mock data, unused config, and missing safeguards #1
Description
Description
I identified several concrete issues affecting reliability, correctness, and production readiness:
- Broken Dependency Installation
requirements.txt is incorrectly formatted (numbered like Markdown).
This causes pip install -r requirements.txt to fail.
Expected: Plain dependency list
Impact: Project cannot be set up properly
- Mock / Hardcoded Data in Core Logic
src/json_report_generator.py generates simulated output (fake timestamps, account data).
This bypasses actual processed data.
Expected: Output should strictly reflect processed input data
Impact: Misleading results, not production-ready
- Unused Configuration Parameter
cost_increase_alert_percent is read in analyzer.py but never used.
Expected: Threshold should drive anomaly detection
Impact: Configuration is misleading / ineffective
- Division by Zero Risk
In src/cost_processor.py, first_cost can be 0, leading to division by zero.
Suggested Fix:
if first_cost == 0:
percentage_change = 0
Impact: Runtime crash
- Sensitive Data in Config
config.yaml contains real email addresses.
Expected: Use environment variables or .env
Impact: Security and privacy risk
- Hardcoded S3 URL in Frontend
script.js uses a fixed S3 endpoint.
Expected: Config-driven or environment-based URL
Impact: Poor portability and reuse
- Weak CI Pipeline
.github/workflows/deploy.yml only builds and pushes Docker image
No:
tests
linting
type checking
Impact: No quality gate before deployment
- Overuse of Broad Exception Handling
Multiple except Exception: blocks hide root causes
Expected: Catch specific exceptions and log details
Impact: Debugging becomes difficult