Enhance SEC pipeline security and add reconsolidation support#3
Conversation
… credentials, enhancing security and flexibility. Update SECLocalPipeline to support loading data for multiple years and add functionality to clear consolidated files for reconsolidation.
|
@claude please review this PR |
|
Claude finished @jfrench9's task —— View job PR Review Complete ✅I've reviewed the changes in this PR. Overall, the changes improve security and add useful functionality, but there are some important concerns to address. ✅ Positive Changes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
| _dev := if env_var_or_default("DEV_OVERRIDE", "false") == "true" { "" } else { | ||
| "DATABASE_URL=postgresql://postgres:"+env_var_or_default("PG_PWD", "postgres")+"@localhost:5432/robosystems " + | ||
| "TEST_DATABASE_URL=postgresql://postgres:"+env_var_or_default("PG_PWD", "postgres")+"@localhost:5432/robosystems_test " + | ||
| "CELERY_BROKER_URL=redis://:"+env_var_or_default("VALKEY_PWD", "valkey")+"@localhost:6379/0 " + | ||
| "CELERY_RESULT_BACKEND=redis://:"+env_var_or_default("VALKEY_PWD", "valkey")+"@localhost:6379/1 " + | ||
| "VALKEY_URL=redis://:"+env_var_or_default("VALKEY_PWD", "valkey")+"@localhost:6379 " + |
There was a problem hiding this comment.
URL-encode injected passwords in dev connection strings
The new helper constructs DATABASE_URL, TEST_DATABASE_URL, and Redis URLs by splicing PG_PWD and VALKEY_PWD directly into the URI. Any password that contains reserved characters such as @, :, /, or # (which is common for randomly generated secrets) will produce an invalid URL and prevent the uv run commands from connecting, even though the credentials are correct. The previous hardcoded passwords did not hit this edge case. To make the environment-variable migration safe, the passwords need to be percent-encoded or otherwise quoted before interpolation.
Useful? React with 👍 / 👎.
Summary
This PR improves the security posture of the SEC data processing pipeline by migrating hardcoded credentials to environment variables, while adding critical functionality for data reconsolidation workflows.
Key Changes
Security Enhancements
Pipeline Functionality
Infrastructure Considerations
Testing Notes
Breaking Changes
🤖 Generated with Claude Code
Branch Info:
bugfix/force-reconsolidation-localmainCo-Authored-By: Claude noreply@anthropic.com