Skip to content

harden: credential redaction, error handling, RBAC scoping, tests#43

Merged
robbycochran merged 2 commits into
mainfrom
rc-next-steps
Jun 6, 2026
Merged

harden: credential redaction, error handling, RBAC scoping, tests#43
robbycochran merged 2 commits into
mainfrom
rc-next-steps

Conversation

@robbycochran

Copy link
Copy Markdown
Collaborator

Summary

  • Credential redaction: status.Cmd() now redacts --credential KEY=VALUE and sensitive --from-literal= args in verbose logging. The ps aux exposure is an upstream OpenShell limitation (CLI-only --credential) that resolves with the gRPC migration.
  • Error handling: Fix ~10 swallowed errors in cmd/deploy.go, cmd/up.go, cmd/providers.go, cmd/teardown.go that masked gateway failures, provider list errors, and kubectl failures with silent fallbacks.
  • RBAC scoping: Remove cluster-admin ClusterRoleBinding creation — the upstream agent-sandbox manifest already includes a properly scoped ClusterRole. Remove default SA from OCP privileged SCC grants.
  • Test coverage: Add 22 new unit tests — 7 for credential redaction, 7 for provider registration, 8 for sandbox creation paths.

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test ./internal/... passes (all 5 packages)
  • go test -c ./cmd/ compiles (cmd tests crash on macOS 15.5 + Go 1.22 due to pre-existing dyld issue, will pass in CI on Linux)
  • Verify on OCP cluster: harness deploy ocp succeeds without cluster-admin, controller pod starts and creates sandboxes
  • Run harness -v providers and confirm credentials are redacted in stderr

🤖 Generated with Claude Code

robbycochran and others added 2 commits June 5, 2026 19:19
…rage

- Redact --credential and sensitive --from-literal values in verbose
  logging (status.Cmd). ps aux exposure remains an upstream OpenShell
  limitation until gRPC migration.
- Fix ~10 swallowed errors across cmd/ that masked gateway failures,
  provider list errors, and kubectl failures with silent fallbacks.
- Remove cluster-admin ClusterRoleBinding creation — the upstream
  agent-sandbox manifest.yaml already includes a scoped ClusterRole.
  Remove default SA from OCP privileged SCC grants.
- Add unit tests for providers.go (7 tests) and create.go (8 tests)
  covering force mode, provider registration, gateway detection, and
  sandbox creation paths.
- Add unit tests for status.Cmd credential redaction (7 tests).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robbycochran robbycochran merged commit 47918e5 into main Jun 6, 2026
3 checks passed
@robbycochran robbycochran deleted the rc-next-steps branch June 13, 2026 14:02
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.

1 participant