mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 20:49:28 +00:00
search-with-proof: family-to-oracle mapping, build memory, tolerant tool calls
Demos declare their oracle within the family allowed set (injection: sql or command; output_encoding: xss; untrusted_destination: ssrf; path: path); builds and app starts use the search memory budget instead of the 256 MB tool limit (npm died with SIGTRAP); malformed tool-call JSON is fed back once. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
c190d34f60
commit
bf243e6680
@@ -20,7 +20,7 @@ from typing import Any, cast
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
from . import task_storage
|
||||
from .demo import validate_demo
|
||||
from .demo import validate_demo, validate_oracle
|
||||
from .executor import clean_environment
|
||||
from .verify import Side, SideRecord
|
||||
|
||||
@@ -132,8 +132,7 @@ def validate_spec(spec: Any) -> dict[str, Any]:
|
||||
validate_demo(spec["demo"])
|
||||
if spec["demo"]["build"]["recipe"] != "none":
|
||||
raise ValueError("verifier requires executor-built archive; builds are forbidden")
|
||||
if spec["family"] not in {"sql", "path", "command", "ssrf", "xss"}:
|
||||
raise ValueError("invalid verification family")
|
||||
validate_oracle(spec["family"], spec["demo"]["oracle"])
|
||||
timeout = spec["timeout_seconds"]
|
||||
if type(timeout) is not int or not math.isfinite(timeout) or not 1 <= timeout <= 300:
|
||||
raise ValueError("invalid verification timeout")
|
||||
|
||||
Reference in New Issue
Block a user