Add secret scanning, Dockerfile lint, ruff lint/format gate, coverage gate, and automatic CVE remediation PRs
- gitleaks (via docker cp, dockerignore-agnostic) and hadolint scan every push/PR - new ruff lint stage (ruff.toml pins known-first-party for host/container consistency; F841/B007 in webui.py left un-fixed via per-file-ignores — app-logic changes, flagged for review rather than auto-fixed) - pytest --cov-fail-under=90 gate on the test stage (already had pytest-cov, never wired into CI until now) - scheduled Trivy critical failures now attempt an apk upgrade rebuild and open a PR if it clears the finding, instead of just failing red - ruff --fix/--format applied to existing code to start the gate clean
This commit is contained in:
@@ -102,7 +102,13 @@ def test_site_info_get_and_post(client, app_env):
|
||||
data = resp.get_json()
|
||||
assert data["info"]["title"] == "Test"
|
||||
|
||||
client.post("/api/site-info", json={"info": {"subtitle": "New subtitle"}, "social": {"instagram_url": "https://insta.example"}})
|
||||
client.post(
|
||||
"/api/site-info",
|
||||
json={
|
||||
"info": {"subtitle": "New subtitle"},
|
||||
"social": {"instagram_url": "https://insta.example"},
|
||||
},
|
||||
)
|
||||
|
||||
updated = client.get("/api/site-info").get_json()
|
||||
assert updated["info"]["title"] == "Test"
|
||||
@@ -271,9 +277,7 @@ def test_trigger_build_success_invokes_subprocess(client, app_env, monkeypatch):
|
||||
)
|
||||
|
||||
calls = []
|
||||
monkeypatch.setattr(
|
||||
webui.subprocess, "run", lambda *a, **k: calls.append((a, k))
|
||||
)
|
||||
monkeypatch.setattr(webui.subprocess, "run", lambda *a, **k: calls.append((a, k)))
|
||||
|
||||
resp = client.post("/api/build")
|
||||
assert resp.get_json() == {"status": "ok"}
|
||||
|
||||
Reference in New Issue
Block a user