@murk-security/runner-linux-arm64 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/harness +0 -0
- package/package.json +1 -1
- package/runners/basic_harness_run.py +16 -5
package/bin/harness
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1093,17 +1093,28 @@ def main() -> int:
|
|
|
1093
1093
|
"-max-cost", os.environ.get("BASIC_HARNESS_MAX_COST", prof["max_cost"]),
|
|
1094
1094
|
"-compact-tokens", "100000", "-ui", "", "-hold=false",
|
|
1095
1095
|
]
|
|
1096
|
+
# How far the agents may go. Pass the spec's action tier through to the harness so the Go
|
|
1097
|
+
# side (the exploiter agent and its tier-gated behaviour) matches what prod_env enforces for
|
|
1098
|
+
# its ops on the same spec. Without this the harness stayed at its "passive" default no matter
|
|
1099
|
+
# the spec. The harness fail-closes to passive on anything unrecognized.
|
|
1100
|
+
action_tier = str((spec.get("policy") or {}).get("actionTier") or "passive")
|
|
1101
|
+
cmd += ["-action-tier", action_tier]
|
|
1096
1102
|
# Route model calls through the murk model gateway when the control plane set
|
|
1097
1103
|
# OPENROUTER_BASE_URL (then OPENROUTER_API_KEY is a signed gateway token, not the
|
|
1098
1104
|
# OpenRouter key); direct to OpenRouter otherwise.
|
|
1099
1105
|
base_url = os.environ.get("OPENROUTER_BASE_URL", "").strip()
|
|
1100
1106
|
if base_url:
|
|
1101
1107
|
cmd += ["-base-url", base_url]
|
|
1102
|
-
#
|
|
1103
|
-
#
|
|
1104
|
-
#
|
|
1105
|
-
#
|
|
1106
|
-
|
|
1108
|
+
# Key resolution:
|
|
1109
|
+
# - Gateway mode (base_url set): OPENROUTER_API_KEY in the env is a SIGNED gateway token
|
|
1110
|
+
# that the harness must send as-is. A -key-file would override it with a raw OpenRouter
|
|
1111
|
+
# key (which the gateway rejects -> the harness fails its first model call and exits 1),
|
|
1112
|
+
# so NEVER pass a key file when routing through the gateway. This also stops a developer's
|
|
1113
|
+
# ~/Code/keys/.env from hijacking a hosted/local-scan run that already has a token.
|
|
1114
|
+
# - Direct mode (no gateway): prefer an explicit key file when one exists; otherwise the
|
|
1115
|
+
# harness reads OPENROUTER_API_KEY straight from the environment. Passing a -key-file that
|
|
1116
|
+
# does not exist is fatal, so only pass it when it is really there.
|
|
1117
|
+
if not base_url and os.path.exists(KEY_FILE):
|
|
1107
1118
|
cmd += ["-key-file", KEY_FILE]
|
|
1108
1119
|
# Each team gets a validator agent that independently re-tests a candidate finding
|
|
1109
1120
|
# before the coordinator may confirm it (anti-false-positive). On by default; an
|