fix: remove unused black and requests from dev dependencies

- We use Ruff for formatting, not Black
- requests is not used directly
- Security check now audits only production dependencies
- Fail CI only on production vulnerabilities (not dev)
This commit is contained in:
root 2026-03-29 01:33:00 +00:00
parent 39783494cf
commit 622614aa45
2 changed files with 7 additions and 8 deletions

View File

@ -91,21 +91,23 @@ jobs:
env: env:
UV_NO_PROGRESS: "1" UV_NO_PROGRESS: "1"
run: | run: |
echo "Running pip-audit..." echo "Running pip-audit on production dependencies..."
uv run pip-audit --format json --output audit-results.json || true # Audit only production dependencies (exclude dev)
uv pip compile pyproject.toml --no-dev -o requirements-prod.txt
uv run pip-audit --format json --output audit-results.json -r requirements-prod.txt || true
# Parse and display results # Parse and display results
if [ -s audit-results.json ] && [ "$(cat audit-results.json)" != "[]" ]; then if [ -s audit-results.json ] && [ "$(cat audit-results.json)" != "[]" ]; then
echo "⚠️ Found vulnerabilities (dev dependencies only):" echo "❌ Found vulnerabilities in production dependencies:"
uv run python -c " uv run python -c "
import json import json
data = json.load(open('audit-results.json')) data = json.load(open('audit-results.json'))
for vuln in data: for vuln in data:
print(f\" - {vuln.get('name', 'unknown')} {vuln.get('version', '')}: {vuln.get('id', '')}\") print(f\" - {vuln.get('name', 'unknown')} {vuln.get('version', '')}: {vuln.get('id', '')}\")
print('Note: These are dev dependencies, not shipped with the package.')
" "
exit 1
else else
echo "✅ No vulnerabilities found" echo "✅ No vulnerabilities in production dependencies"
fi fi
- name: Check for secrets - name: Check for secrets

View File

@ -37,9 +37,6 @@ dev = [
"ruff>=0.3.0", "ruff>=0.3.0",
"python-semantic-release>=9.0.0", "python-semantic-release>=9.0.0",
"pip-audit>=2.7.0", "pip-audit>=2.7.0",
# Pinned to avoid vulnerabilities
"black>=24.3.0",
"requests>=2.33.0",
] ]
[project.urls] [project.urls]