MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / classify_check_result

Function classify_check_result

workflow/parser.py:121–140  ·  view source on GitHub ↗
(
    target: str,
    history: Iterable[Any],
    check_count: int,
    benchmark_name: str,
    remaining_vulns: int,
)

Source from the content-addressed store, hash-verified

119
120
121def classify_check_result(
122 target: str,
123 history: Iterable[Any],
124 check_count: int,
125 benchmark_name: str,
126 remaining_vulns: int,
127) -> tuple[str, int]:
128 if check_success_markers(target, history, benchmark_name):
129 return "success", check_count
130
131 # Scanner output often contains noisy findings that are unrelated to the
132 # benchmark objective. Keep the workflow bounded and fail fast once the
133 # current exploit path has been retried enough times.
134 if check_count >= 3:
135 return "failed", check_count
136
137 if check_count % 5 == 0 and check_count != 0:
138 return "retry", check_count
139
140 return "retry", check_count + 1

Callers 1

check_nodeFunction · 0.85

Calls 1

check_success_markersFunction · 0.85

Tested by

no test coverage detected