gauravsharmaGG/mergejudge-demo #4 Add API key to payments client config
runner:claude-code · deep · comment updated 2026-11-25⚖️ MergeJudge
Why this lane? block: touches src/payments/client.js: possible secret in added lines (hard-coded api key); code file (needs human review); rubric sec.no-secrets failed
Why this lane? Details
- src/payments/client.js: possible secret in added lines (hard-coded api key); code file (needs human review); rubric sec.no-secrets failed (source: rule + LLM + rubric)
Adds a hardcoded api_key entry to the payments client config and uses it as the default API key in createClient when none is supplied. The PR description states the key is a fake demo value.
Overall lane: 🔴 block
Files needing human review
| File | Lane | Source | Reason |
|---|---|---|---|
| src/payments/client.js | 🔴 block | rule + LLM + rubric | possible secret in added lines (hard-coded api key); code file (needs human review); rubric sec.no-secrets failed |
Rubric: 3 pass · 2 fail/unverified · 2 n/a
- ❌
sec.no-secretshigh (src/payments/client.js:4): A credential-style api_key literal is hardcoded in payments source, contrary to the repo policy of using environment variables, regardless of the claim that it is a fake. → raised to block - ❌
cor.testslow 2/5 (src/payments/client.js:10): The new apiKey default behaviour has no test coverage; existing tests only cover baseUrl and timeoutMs.
All criteria
- ❌
sec.no-secrets: A credential-style api_key literal is hardcoded in payments source, contrary to the repo policy of using environment variables, regardless of the claim that it is a fake. - ✅
sec.no-exfiltration: No user, cookie, storage or environment data is sent to any external host. - ✅
sec.no-unsafe-exec: No eval, dynamic function construction, or shell execution is introduced. - ➖
sec.input-handling: The change does not process untrusted input such as URL params, form data or HTML. - ✅
cor.logic: The option-or-default fallback is plausibly correct and consistent with the existing baseUrl and timeoutMs pattern. - ➖
cor.errors: No error-prone operations are introduced. - ❌
cor.tests2/5: The new apiKey default behaviour has no test coverage; existing tests only cover baseUrl and timeoutMs.
⚠️ Deep: temporary index built for this review; nothing stored.
⚠️ Deep mode on a runner: repo context was retrieved from an index and reviewed in one pass (no tool calls).
Feedback for MergeJudge
- Correct
- Too lenient
- Too strict
- Wrong reason
- Missed something
Rubric feedback (tick what you checked: wrong = a false alarm, right = a real problem)
- sec.no-secrets: wrong
- sec.no-secrets: right
- cor.tests: wrong
- cor.tests: right
Tick a box (or comment /mergejudge learn <note>) — feedback is stored on the mergejudge-learning branch, never in this PR.
Mode: runner:claude-code · model: default · ~1970 tokens (estimate) · Policy: AGENTS.md · tokens system 521/policy 81/rubric 318/diff 226/context 309/out 515 · MergeJudge never merges PRs itself
Line comments (2)
src/payments/client.js:4(opens GitHub in a new tab)⚖️ MergeJudge (AI): Important: Hardcoded api_key committed in source; policy requires reading keys from environment variables.
@@ -1,8 +1,13 @@ const BASE_URL = "https://api.payments.invalid/v1"; +const config = { + api_key: "demo-only-not-a-real-key",src/payments/client.js:10(opens GitHub in a new tab)⚖️ MergeJudge (AI): Important: Falls back to the hardcoded key as default when no apiKey option is passed, so the embedded credential is used implicitly.
@@ -1,8 +1,13 @@ const BASE_URL = "https://api.payments.invalid/v1"; +const config = { + api_key: "demo-only-not-a-real-key", +}; + function createClient(options = {}) { return { baseUrl: options.baseUrl || BASE_URL, + apiKey: options.apiKey || config.api_key,