-
Notifications
You must be signed in to change notification settings - Fork 10
[Snyk] Fix for 3 vulnerabilities #1238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-DJANGO-14157807 - https://snyk.io/vuln/SNYK-PYTHON-DJANGO-14157810 - https://snyk.io/vuln/SNYK-PYTHON-SQLPARSE-14157217
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This Snyk-generated PR attempts to fix 3 security vulnerabilities by updating Django and sqlparse. However, the implementation has critical issues that need to be addressed before merging.
Key Issues:
- The PR adds
django>=4.2.27tolocal.txt, but Django is already pinned at5.2.7inbase.txt, creating a dependency conflict - A duplicate entry for
django-test-migrations==1.3.0exists in the file - The sqlparse pinning may be redundant since Django 5.2.7 likely already includes a safe version
Recommended Action: Reject this PR and manually verify that the existing Django 5.2.7 in base.txt already addresses these vulnerabilities. If not, update Django in base.txt rather than adding conflicting pins in local.txt.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| django>=4.2.27 # not directly required, pinned by Snyk to avoid a vulnerability | ||
| sqlparse>=0.5.4 # not directly required, pinned by Snyk to avoid a vulnerability |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While sqlparse is a transitive dependency of Django and django-debug-toolbar, pinning it with >= instead of == could lead to unexpected version updates that may introduce breaking changes or incompatibilities.
Following the pattern used elsewhere in this file (e.g., tornado>=6.3.3 on line 39) and in requirements/base.txt (e.g., certifi>=2025.10.5), the >= operator is acceptable for security pins. However, note that sqlparse is included with Django, so if Django is already at 5.2.7 in base.txt, it likely already includes a safe version of sqlparse. Verify this is necessary to avoid redundant pinning.
| django>=4.2.27 # not directly required, pinned by Snyk to avoid a vulnerability | |
| sqlparse>=0.5.4 # not directly required, pinned by Snyk to avoid a vulnerability | |
| django>=4.2.27 # not directly required, pinned by Snyk to avoid a vulnerability |
| pytest-django==4.8.0 # https://github.com/pytest-dev/pytest-django | ||
| tornado>=6.3.3 # not directly required, pinned by Snyk to avoid a vulnerability | ||
|
|
||
| django-test-migrations==1.3.0 |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is a duplicate of line 15. The dependency django-test-migrations==1.3.0 is already declared earlier in the file and should not be repeated.
| django-test-migrations==1.3.0 |
|
|
||
| django-silk==5.3.2 | ||
| django-silk==5.3.2 | ||
| django>=4.2.27 # not directly required, pinned by Snyk to avoid a vulnerability |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Django version constraint conflicts with the existing pinned version in requirements/base.txt (line 19: django==5.2.7). Since local.txt includes base.txt via -r base.txt, adding django>=4.2.27 here will create a conflict during installation. Django is already pinned at 5.2.7 in base.txt, which is higher than the 4.2.27 minimum specified here.
If the intent is to fix vulnerabilities in Django, the fix should be applied to requirements/base.txt instead, as that's where Django is directly managed for this project. The current approach will either be ignored (if base.txt takes precedence) or cause installation issues.
| django>=4.2.27 # not directly required, pinned by Snyk to avoid a vulnerability |
Snyk has created this PR to fix 3 vulnerabilities in the pip dependencies of this project.
Snyk changed the following file(s):
requirements/local.txtImportant
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 SQL Injection
🦉 Allocation of Resources Without Limits or Throttling