mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
ci: green again -- format and lint the whole tree; push the scan and runner images to GHCR on tags
CI and the release job check `ruff format --check .` and `ruff check .` over the whole repository, while the local gate checked only src and tests, so eight benchmark scripts drifted and the v2.0.0 release job stopped before building. The fixes are formatting, two noqa comments and one renamed loop variable; no script computes anything differently. The local gate now checks the whole tree. The release workflow gains an images job: Dockerfile -> ghcr.io/<owner>/openultrasast, plane/Dockerfile.runner -> ghcr.io/<owner>/openultrasast-runner, tagged with the version, and the digests written to the job summary. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c978de9ff8
commit
d1aabf0f66
@@ -258,7 +258,7 @@ def score_v2() -> int:
|
||||
per_case, pool, unstable_pool = [], [], 0
|
||||
changing, total_questions, total_completed = [0, 0], 0, 0
|
||||
for case in cases():
|
||||
path = lambda label: RESULTS / "scans" / f"{case['id']}--{label}.json" # noqa: E731
|
||||
path = lambda label: RESULTS / "scans" / f"{case['id']}--{label}.json" # noqa: E731, B023 -- called only inside this iteration
|
||||
scans = {label: json.loads(path(label).read_text()) for label in pins(case) if path(label).is_file()}
|
||||
if len(scans) < 6:
|
||||
per_case.append({"id": case["id"], "status": "incomplete", "scans": sorted(scans)})
|
||||
@@ -279,7 +279,9 @@ def score_v2() -> int:
|
||||
]
|
||||
site_files = {site.partition("::")[0] for site in case.get("sites", [])}
|
||||
covered = set(old) | site_files
|
||||
answered = any(r.split(":")[0] in covered for label in ("vulnerable_a", "vulnerable_b") for r in scans[label].get("completed_regions", []))
|
||||
answered = any(
|
||||
r.split(":")[0] in covered for label in ("vulnerable_a", "vulnerable_b") for r in scans[label].get("completed_regions", [])
|
||||
)
|
||||
diff_v, union_v = stability(va, vb)
|
||||
diff_f, union_f = stability(fa, fb)
|
||||
changing[0] += diff_v + diff_f
|
||||
|
||||
Reference in New Issue
Block a user