Skip to content

ci(qa): fetch login-email-password runtime credentials from Testbed via OIDC (#216) - #5509

Open
stamp-build[bot] wants to merge 2 commits into
mainfrom
agent/lagoon/216-testbed-oidc-cred
Open

stamp-build[bot] wants to merge 2 commits into
mainfrom
agent/lagoon/216-testbed-oidc-cred

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Lagoon (raft) opened via Stamp · View →


Summary

  • Replaces manual QA_LOGIN_ACCEPTANCE_EMAIL / QA_LOGIN_ACCEPTANCE_PASSWORD GitHub repository secrets with runtime credential retrieval from Testbed's POST /api/agent/run-cases/{run_case_id}/login-acceptance-input endpoint (include_credential: true, aligned with botiverse/testbed#347).
  • testbed_login_acceptance_input.mjs --include-credential: validates the 6 target fields + credential: { email, password }, writes ONLY the 6 target fields to $RUNNER_TEMP/testbed-login-acceptance/input.json (0700/0600) and writes credential separately to $RUNNER_TEMP/login-acceptance-credential/account (0700/0600). Stops fail-closed (removing any stale files) on missing/malformed fields or 503 LOGIN_ACCEPTANCE_CREDENTIAL_UNAVAILABLE.
  • visible_servers_probe.mjs: reads --credential-file non-destructively (no fallback to QA_TEST_* or env) so preflight and login_phase.mjs --consume-credential-file consume the exact same 0600 file. Hardens readCredentialFile with O_NOFOLLOW + fstat uid ownership checks.
  • secure_evidence.mjs: for login-email-password, fetches the runtime credential in memory via Testbed OIDC (never written to disk) before scanning/redacting qa-evidence/ (including verdict.json), failing closed (UNKNOWN, deleting evidence) if unavailable.
  • .github/workflows/qa-acceptance.yml & scripts/ci/check_workflow_secret_env.py: removes the Stage login acceptance credential step and all secrets.QA_LOGIN_ACCEPTANCE_* references; pins and mutant-tests that neither QA_LOGIN_ACCEPTANCE_* nor QA_TEST_* can leak into login-email-password.

Verification

  • node --test scripts/qa/*.test.mjs: 433 passed, 0 failed (1 skipped)
  • python3 scripts/ci/check_workflow_secret_env.py: passed
  • python3 scripts/ci/check_workflow_secret_env.py --self-test: 106 cases, 0 failed
  • python3 scripts/ci/check_source_constraints.py: passed

🤖 Generated with Claude Code

Lagoon and others added 2 commits November 23, 2026 12:37
…ia OIDC (#216)

Replace the manual QA_LOGIN_ACCEPTANCE_EMAIL / QA_LOGIN_ACCEPTANCE_PASSWORD
repository secrets with runtime credential delivery from Testbed's
POST /api/agent/run-cases/{run_case_id}/login-acceptance-input endpoint
using include_credential: true (Testbed #347).

- Extend testbed_release_settings.mjs loginAcceptanceInput({ includeCredential })
  and handle 503 LOGIN_ACCEPTANCE_CREDENTIAL_UNAVAILABLE fail-closed.
- Update testbed_login_acceptance_input.mjs (--include-credential) to write
  only the six target fields to input.json and credential {email, password}
  separately to a runner-owned 0700/0600 file (/login-acceptance-credential/account),
  stopping fail-closed and cleaning both files if either field is absent/invalid.
- Update visible_servers_probe.mjs to read --credential-file non-destructively
  so preflight and Android login_phase.mjs consume the exact same 0600 file
  with zero fallback to QA_TEST_* or legacy env vars; harden readCredentialFile
  with O_NOFOLLOW + uid ownership check.
- Update secure_evidence.mjs (runGate) to re-fetch the runtime credential in
  memory via Testbed OIDC (never written to disk) when scanning login-email-password
  evidence, failing closed (UNKNOWN) if the credential cannot be obtained.
- Remove all QA_LOGIN_ACCEPTANCE_* repository secret references and the static
  Stage login acceptance credential step from .github/workflows/qa-acceptance.yml
  and update scripts/ci/check_workflow_secret_env.py pins and mutants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ptance evidence scan (#216)

Address Argus's review of #5509:
- Pass redirect: 'manual' on both OIDC token acquisition (requestOidcToken) and
  Testbed POST calls in testbed_release_settings.mjs, failing immediately on any
  3xx status (oidc_redirect_refused / <endpoint>_http_<3xx>) with zero retries,
  zero redirect following, and no files written.
- Scan every non-empty runtime acceptance email and password in secure_evidence.mjs
  without the legacy >= 4 length filter, fail closed (UNKNOWN, secrets_checked:
  false) if either acceptance credential field is missing/uncheckable, and scan
  both raw bytes, JSON-literal-escaped strings, and parsed JSON/JSONL string trees
  so short passwords and JSON-escaped secrets in verdict.json are always caught.
- Add loopback 3xx redirect tests in testbed_login_acceptance_input.test.mjs and
  short-password, JSON-escaped, and incomplete-credential tests in login_phase.test.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants