fix: Python 3.9 compatibility and pip-audit for local packages#7
fix: Python 3.9 compatibility and pip-audit for local packages#7abdelsfane merged 6 commits intomainfrom
Conversation
Add `from __future__ import annotations` to all files using PEP 604 union syntax (`X | None`). This defers annotation evaluation and makes the syntax work on Python 3.9+. Fix pip-audit by adding --local flag to skip packages not on PyPI (cryptoserve is installed from source in CI).
|
Claude finished @abdelsfane's task —— View job Security Review Complete ✅I've completed a thorough security-focused review of all 15 changed files in this PR. Security AssessmentChanges OverviewThis PR makes two types of changes:
Security Findings✅ No Security Issues FoundAfter analyzing all changes against the 6 security categories: 1. Injection Vulnerabilities ✅
2. Authentication/Authorization Bypasses ✅
3. Insecure Deserialization/eval ✅
4. Hardcoded Credentials/Secrets ✅
5. SSRF/Open Redirect Risks ✅
6. Cryptographic Misuse ✅
Analysis DetailsModified Files AnalysisWorkflow Change (
|
|
Manual review required. This PR did not meet auto-merge criteria:
|
The four source-installed packages (cryptoserve, cryptoserve-core, cryptoserve-client, cryptoserve-auto) aren't published to PyPI, so pip-audit --local still fails trying to resolve them. Use --exclude for each package instead.
|
Claude finished @abdelsfane's task —— View job Security Review Complete ✅I've completed a comprehensive security review of all 15 changed files in PR #7. Security AssessmentChanges OverviewThis PR makes two types of changes:
Security Findings✅ No Security Issues FoundI analyzed all changes against the 6 security categories: 1. Injection Vulnerabilities ✅
2. Authentication/Authorization Bypasses ✅
3. Insecure Deserialization/eval ✅
4. Hardcoded Credentials/Secrets ✅
5. SSRF/Open Redirect Risks ✅
6. Cryptographic Misuse ✅
Analysis DetailsModified Files AnalysisWorkflow Change (
|
The raise ValueError for link-local IPs was inside the same try block that catches ValueError from ipaddress.ip_address(), so the exception was swallowed. Move the link-local check to an else block so it propagates correctly.
|
Claude finished @abdelsfane's task —— View job Security Review Complete ✅I've completed a comprehensive security-focused review of all 16 changed files in PR #7. Changes SummaryThis PR makes two types of changes:
Security Findings✅ No Security Issues FoundI analyzed all changes against the 6 security categories requested: 1. Injection Vulnerabilities (SQL, command, path traversal) ✅
2. Authentication/Authorization Bypasses ✅
3. Insecure Deserialization or eval() Usage ✅
4. Hardcoded Credentials or Secrets ✅
5. SSRF or Open Redirect Risks ✅
6. Cryptographic Misuse ✅
Analysis DetailsModified Files BreakdownWorkflow Change (
|
|
Manual review required. This PR did not meet auto-merge criteria:
|
pip-audit has no --exclude option. Since our local packages are installed with pip install -e (editable mode), --skip-editable correctly skips them.
|
Claude finished @abdelsfane's task —— View job Security Review Complete ✅I've completed a comprehensive security review of all 16 changed files in PR #7. Security AssessmentChanges OverviewThis PR makes two types of changes:
Security Findings✅ No Security Issues FoundAfter analyzing all changes against the 6 security categories: 1. Injection Vulnerabilities ✅
2. Authentication/Authorization Bypasses ✅
3. Insecure Deserialization/eval ✅
4. Hardcoded Credentials/Secrets ✅
5. SSRF/Open Redirect Risks ✅
6. Cryptographic Misuse ✅
Analysis DetailsModified Files AnalysisWorkflow Change (
|
|
Manual review required. This PR did not meet auto-merge criteria:
|
1 similar comment
|
Manual review required. This PR did not meet auto-merge criteria:
|
- Add `from __future__ import annotations` to _credentials.py, __main__.py, passwords.py, _cli_style.py, and _binary_manager.py which all use PEP 585 lowercase generics (list[], dict[], tuple[], set[]) in type annotations - Remove placeholder --ignore-vuln PYSEC-0000 (not a real vulnerability ID)
|
Claude finished @abdelsfane's task —— View job Security Review Complete ✅I've completed a comprehensive security-focused review of all 20 changed files in PR #7. Changes SummaryThis PR makes two types of changes:
Security Findings✅ No Security Issues Found (FINDINGS_COUNT=0)I analyzed all changes against the 6 requested security categories: 1. Injection Vulnerabilities (SQL, command, path traversal) ✅
2. Authentication/Authorization Bypasses ✅
3. Insecure Deserialization or eval() Usage ✅
4. Hardcoded Credentials or Secrets ✅
5. SSRF or Open Redirect Risks ✅
6. Cryptographic Misuse ✅
Analysis DetailsWorkflow Change (
|
With --strict, pip-audit treats skipped editable packages as collection failures and exits non-zero. Without --strict, it skips them with a warning and still reports real vulnerabilities in third-party deps.
|
Claude finished @abdelsfane's task —— View job Security Review Complete ✅I've completed a comprehensive security-focused review of all 20 changed files in PR #7. Changes SummaryThis PR makes two types of changes:
Security Findings✅ No Security Issues FoundI analyzed all changes against the 6 security categories: 1. Injection Vulnerabilities (SQL, command, path traversal) ✅
2. Authentication/Authorization Bypasses ✅
3. Insecure Deserialization or eval() Usage ✅
4. Hardcoded Credentials or Secrets ✅
5. SSRF or Open Redirect Risks ✅
6. Cryptographic Misuse ✅
Analysis DetailsWorkflow Change (
|
|
Manual review required. This PR did not meet auto-merge criteria:
|
1 similar comment
|
Manual review required. This PR did not meet auto-merge criteria:
|
Summary
from __future__ import annotationsto 14 files using PEP 604 union syntax (X | None) — fixes Python 3.9 test failurespip-auditby adding--localflag to skip source-installed packages not on PyPITest plan