🛡️ Sentinel: Security hardening and workflow fixes#110
Conversation
- Add timeout=5 to subprocess calls in scripts/init.py to prevent hanging. - Revert actions/checkout version to stable @v4 in GitHub workflows. - Enable additional Ruff security and quality rules (B, TRY, PTH). - Fix existing lint issues by migrating to pathlib in scripts/init.py and ignoring TRY003. - Create security journal with critical learnings.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Improve email regex in scripts/init.py to resolve SonarCloud warning. - Refactor scripts/init.py into modular functions to improve maintainability and resolve B-rating Quality Gate failure. - Ensure all subprocess calls have timeouts and proper exception handling. - Maintain stable actions/checkout@v4 in workflows. - Keep stricter Ruff security rules enabled.
- Revert actions/checkout version to v7 in check.yml and docs.yml. - Address PR comments regarding the version change.
|



🚨 Severity: MEDIUM
💡 Vulnerability:
subprocesscalls inscripts/init.py(DoS/Hanging risk).actions/checkoutversion (v7) in GitHub Actions workflows.🎯 Impact:
🔧 Fix:
timeout=5and exception handling tosubprocesscalls.actions/checkoutto@v4.B,TRY, andPTHrules in Ruff.scripts/init.pytopathlibfor better path handling and fixed closure capture bugs in regex replacements.✅ Verification:
uv run ruff check .anduv run coverage run -m pytest ..PR created automatically by Jules for task 16241376048782602464 started by @amrabed