mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-17 03:59:28 +00:00
chore: format the whole tree and lint the scratch measurement scripts; CI has been red since 25ae4b4
CI runs ruff format --check and ruff check over the whole repository; 29 files had drifted from the formatter and
four measurement scripts carried lint findings, so every push since 25ae4b4 failed before pytest ran.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
fbbc03f3ea
commit
0d7d3f0dc9
@@ -49,20 +49,42 @@ def world(tmp_path: Path) -> dict[str, Any]:
|
||||
(plane / name).mkdir(parents=True)
|
||||
task = yaml.safe_load((Path(__file__).resolve().parents[1] / "plane/tasks/alerts.yaml").read_text())
|
||||
task["metadata"]["name"] = f"{CASE}-alerts"
|
||||
task["spec"]["env"] = [{"name": f"OUSAST_{role.upper()}_PIN", "value": pin} for role, pin in
|
||||
(("vulnerable", vulnerable), ("fixed", fixed))]
|
||||
task["spec"]["env"] = [
|
||||
{"name": f"OUSAST_{role.upper()}_PIN", "value": pin} for role, pin in (("vulnerable", vulnerable), ("fixed", fixed))
|
||||
]
|
||||
task["spec"]["workspaces"] = [{"name": "case", "path": "/workspace/case"}]
|
||||
(plane / "tasks/alerts.yaml").write_text(yaml.safe_dump(task))
|
||||
case = {"family": "injection", "ranges": {"app/index.php": [[3, 3]]}, "fixed_ranges": {"app/index.php": [[3, 3]]}}
|
||||
workspace = {"apiVersion": task["apiVersion"], "kind": "Workspace", "metadata": {"name": "case"}, "spec": {
|
||||
"git": [{"name": "repo", "repo": "https://example.com/reserved/probe", "dir": "repo"}],
|
||||
"files": [{"path": "case.json", "content": json.dumps(case)}],
|
||||
}}
|
||||
workspace = {
|
||||
"apiVersion": task["apiVersion"],
|
||||
"kind": "Workspace",
|
||||
"metadata": {"name": "case"},
|
||||
"spec": {
|
||||
"git": [{"name": "repo", "repo": "https://example.com/reserved/probe", "dir": "repo"}],
|
||||
"files": [{"path": "case.json", "content": json.dumps(case)}],
|
||||
},
|
||||
}
|
||||
(plane / "workspaces/case.yaml").write_text(yaml.safe_dump(workspace))
|
||||
run = plane / "runs/validation-46.yaml"
|
||||
run.write_text(yaml.safe_dump({"apiVersion": RUN_API_VERSION, "kind": "Run", "metadata": {"name": "validation-46"},
|
||||
"spec": {"tasks": [{"name": f"{CASE}-alerts", "task": f"{CASE}-alerts",
|
||||
"outputs": ["alerts.jsonl", "summary.json"], "budget": {"usd": 0, "calls": 0}}]}}))
|
||||
run.write_text(
|
||||
yaml.safe_dump(
|
||||
{
|
||||
"apiVersion": RUN_API_VERSION,
|
||||
"kind": "Run",
|
||||
"metadata": {"name": "validation-46"},
|
||||
"spec": {
|
||||
"tasks": [
|
||||
{
|
||||
"name": f"{CASE}-alerts",
|
||||
"task": f"{CASE}-alerts",
|
||||
"outputs": ["alerts.jsonl", "summary.json"],
|
||||
"budget": {"usd": 0, "calls": 0},
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
)
|
||||
)
|
||||
source = tmp_path / "frozen"
|
||||
(source / "src" / "openultrasast").mkdir(parents=True)
|
||||
(source / "benchmarks" / "push").mkdir(parents=True)
|
||||
|
||||
Reference in New Issue
Block a user