@murk-security/runner-darwin-x64 0.7.0 → 0.7.1
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 +10 -5
package/bin/harness
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1099,11 +1099,16 @@ def main() -> int:
|
|
|
1099
1099
|
base_url = os.environ.get("OPENROUTER_BASE_URL", "").strip()
|
|
1100
1100
|
if base_url:
|
|
1101
1101
|
cmd += ["-base-url", base_url]
|
|
1102
|
-
#
|
|
1103
|
-
#
|
|
1104
|
-
#
|
|
1105
|
-
#
|
|
1106
|
-
|
|
1102
|
+
# Key resolution:
|
|
1103
|
+
# - Gateway mode (base_url set): OPENROUTER_API_KEY in the env is a SIGNED gateway token
|
|
1104
|
+
# that the harness must send as-is. A -key-file would override it with a raw OpenRouter
|
|
1105
|
+
# key (which the gateway rejects -> the harness fails its first model call and exits 1),
|
|
1106
|
+
# so NEVER pass a key file when routing through the gateway. This also stops a developer's
|
|
1107
|
+
# ~/Code/keys/.env from hijacking a hosted/local-scan run that already has a token.
|
|
1108
|
+
# - Direct mode (no gateway): prefer an explicit key file when one exists; otherwise the
|
|
1109
|
+
# harness reads OPENROUTER_API_KEY straight from the environment. Passing a -key-file that
|
|
1110
|
+
# does not exist is fatal, so only pass it when it is really there.
|
|
1111
|
+
if not base_url and os.path.exists(KEY_FILE):
|
|
1107
1112
|
cmd += ["-key-file", KEY_FILE]
|
|
1108
1113
|
# Each team gets a validator agent that independently re-tests a candidate finding
|
|
1109
1114
|
# before the coordinator may confirm it (anti-false-positive). On by default; an
|