fix: sync pyproject.toml dependencies with requirements.txt and add CodeQL SAST workflow#1703
Open
namann5 wants to merge 1 commit into
Open
fix: sync pyproject.toml dependencies with requirements.txt and add CodeQL SAST workflow#1703namann5 wants to merge 1 commit into
namann5 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.