fix: sync pyproject.toml dependencies with requirements.txt and add CodeQL SAST workflow#1703
fix: sync pyproject.toml dependencies with requirements.txt and add CodeQL SAST workflow#1703namann5 wants to merge 1 commit into
Conversation
…odeQL SAST workflow - Add cryptography>=42.0.0, httpx>=0.28.1, openai>=1.0.0 to pyproject.toml to match backend/requirements.txt. Without these, pip install . silently omits vault encryption (cryptography), webhook delivery (httpx), and AI summary features (openai), causing runtime failures. - Add CodeQL security analysis workflow to catch vulnerabilities during CI. - Add .python-version for consistent local Python version management.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
utksh1
left a comment
There was a problem hiding this comment.
Thanks for the work here. This PR needs to be reshaped before merge:\n\n1. The dependency-sync part appears stale on current main, and parts of it would actually regress declarations (for example, changing httpx[cli] to plain httpx).\n2. The CodeQL workflow may be valuable, but it should be proposed in a clean, focused PR instead of being bundled with an obsolete dependency-sync change.\n3. Please rebase on current main and resubmit only the still-relevant part of this work.\n\nIf you want to keep the CodeQL addition, open a single-purpose PR for that alone.
Summary
The
pyproject.tomldeclares runtime dependencies that are inconsistent withbackend/requirements.txt. Three critical packages —cryptography,httpx, andopenai— are present inrequirements.txtbut missing frompyproject.toml.This means any installation via
pip install .or future PyPI publication silently omits these packages, causing runtime failures in core features:cryptography>=42.0.0VaultCryptoAES-256-GCM encryption (backend/secuscan/vault.py)ImportError; all stored secrets become inaccessiblehttpx>=0.28.1backend/secuscan/notification_service.py)openai>=1.0.0backend/secuscan/ai_summary.py)ImportErrorat call timeSteps to Reproduce
pip install .(or create a fresh venv and install from pyproject.toml)ModuleNotFoundError/ImportErrorat runtimeRoot Cause
pyproject.tomlat line 11-22 lists 11 dependencies.backend/requirements.txtat line 2, 13-14 lists 3 additional packages (cryptography,httpx,openai) that are imported and used at runtime but never declared in the project metadata.Proposed Fix
PR adds the missing dependencies to
pyproject.toml:Additionally adds a CodeQL security analysis workflow for CI SAST scanning and a
.python-versionfile for consistent local development.