ci: fix bandit nosec and cyclonedx-py syntax

This commit is contained in:
Username
2025-12-25 21:01:55 +01:00
parent de39a36174
commit 033751d8e5
2 changed files with 3 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ jobs:
- name: Generate SBOM
run: |
# Generate CycloneDX SBOM for supply chain transparency
cyclonedx-py requirements requirements.txt -o sbom.json --format json
cyclonedx-py requirements requirements.txt -o sbom.json --of json
echo "SBOM generated with $(jq '.components | length' sbom.json) components"
- name: Validate SBOM

4
fpaste
View File

@@ -134,10 +134,10 @@ def request(
) -> tuple[int, bytes, dict[str, str]]:
"""Make HTTP request and return (status, body, headers)."""
headers = headers or {}
req = urllib.request.Request(url, data=data, headers=headers, method=method) # noqa: S310
req = urllib.request.Request(url, data=data, headers=headers, method=method)
try:
with urllib.request.urlopen(req, timeout=30, context=ssl_context) as resp: # noqa: S310
with urllib.request.urlopen(req, timeout=30, context=ssl_context) as resp: # nosec B310
return resp.status, resp.read(), dict(resp.headers)
except urllib.error.HTTPError as e:
return e.code, e.read(), dict(e.headers)