Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ jobs:
path: sbom.spdx.json

- name: Vulnerability scan
run: |
if command -v trivy &>/dev/null; then
trivy fs . --severity CRITICAL,HIGH --ignore-unfixed --exit-code 1
else
echo "trivy not available; skipping vulnerability scan"
fi
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
Expand Down
2 changes: 2 additions & 0 deletions netengine/diagnostic/preflight.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def _parse_compose_port(raw_port: object) -> tuple[int, str] | None:
return raw_port, "tcp"
if isinstance(raw_port, dict):
published = raw_port.get("published") or raw_port.get("target")
if published is None:
return None
proto = str(raw_port.get("protocol") or "tcp").lower()
if published is None:
return None
Expand Down
5 changes: 5 additions & 0 deletions scripts/generate_license_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ def field(meta: metadata.PackageMetadata, name: str) -> str:
return compact or "UNKNOWN"


_INFRA_PACKAGES = frozenset({"pip", "setuptools", "wheel", "distribute"})


def main() -> int:
rows = []
for dist in sorted(metadata.distributions(), key=lambda d: (d.metadata.get("Name") or "").lower()):
meta = dist.metadata
name = field(meta, "Name")
if name.lower() in _INFRA_PACKAGES:
continue
version = dist.version or "UNKNOWN"
license_expr = field(meta, "License-Expression")
license_field = license_expr if license_expr != "UNKNOWN" else field(meta, "License")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def _call_require_auth(monkeypatch, state):
_Session.post_kwargs = {}
monkeypatch.setattr(auth.RuntimeState, "load", classmethod(lambda cls: state))
monkeypatch.setattr(auth.aiohttp, "ClientSession", _Session)
request = SimpleNamespace(headers={}, url=SimpleNamespace(path="/world"))
request = SimpleNamespace(method="GET", headers={}, url=SimpleNamespace(path="/world"))
credentials = HTTPAuthorizationCredentials(scheme="Bearer", credentials="token-1")

result = await auth.require_auth(request, credentials)
Expand Down