mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-19 04:59:28 +00:00
feat(hunter): add standard-mode scheduling
This commit is contained in:
@@ -88,12 +88,7 @@ def write_manifest(
|
||||
"verification_status": verification_by_id[finding.finding_id].status
|
||||
if finding.finding_id in verification_by_id
|
||||
else "not_run",
|
||||
"artifact_refs": {
|
||||
"findings_json": _relative_artifact(run.root, artifact_paths["findings"]),
|
||||
"verification_json": _relative_artifact(run.root, artifact_paths["verification"]),
|
||||
"markdown": _relative_artifact(run.root, artifact_paths["markdown"]),
|
||||
"sarif": _relative_artifact(run.root, artifact_paths["sarif"]),
|
||||
},
|
||||
"artifact_refs": _artifact_refs(run.root, artifact_paths),
|
||||
}
|
||||
for finding in findings
|
||||
],
|
||||
@@ -170,6 +165,18 @@ def _verification_by_id(verifications: list[VerificationResult]) -> dict[str, Ve
|
||||
return {result.finding_id: result for result in verifications}
|
||||
|
||||
|
||||
def _artifact_refs(root: Path, artifact_paths: dict[str, Path]) -> dict[str, str]:
|
||||
refs = {
|
||||
"findings_json": _relative_artifact(root, artifact_paths["findings"]),
|
||||
"verification_json": _relative_artifact(root, artifact_paths["verification"]),
|
||||
"markdown": _relative_artifact(root, artifact_paths["markdown"]),
|
||||
"sarif": _relative_artifact(root, artifact_paths["sarif"]),
|
||||
}
|
||||
if "trajectories" in artifact_paths:
|
||||
refs["trajectories_jsonl"] = _relative_artifact(root, artifact_paths["trajectories"])
|
||||
return refs
|
||||
|
||||
|
||||
def _relative_artifact(root: Path, path: Path) -> str:
|
||||
try:
|
||||
return path.relative_to(root).as_posix()
|
||||
|
||||
Reference in New Issue
Block a user