Skip to content

fix(security): relax bootstrap-admin Job securityContext for Kind - #433

Open
markturansky wants to merge 1 commit into
mainfrom
fix/coderabbit-review-findings
Open

fix(security): relax bootstrap-admin Job securityContext for Kind#433
markturansky wants to merge 1 commit into
mainfrom
fix/coderabbit-review-findings

Conversation

@markturansky

Copy link
Copy Markdown
Collaborator

Summary

  • Remove runAsNonRoot: true from bootstrap-admin Job pod securityContext — the API server image (ubi9/ubi-minimal) has no USER directive and runs as root
  • Change readOnlyRootFilesystem from true to false to match the existing migration init container pattern

Fixes the test-local-dev-simulation CI failure from PR #432 where the Job pod failed with container has runAsNonRoot and image will run as root.

Test plan

  • Kustomize build validates for base, kind, and e2e overlays
  • test-local-dev-simulation CI passes

Closes #431

🤖 Generated with Claude Code

- S1: Remove POST /role_bindings from isAuthExempt — any authenticated
  user could create arbitrary role bindings without RBAC evaluation.
  Add bootstrap-admin Job using the existing seed-admin CLI command
  to break the chicken-and-egg problem for first admin provisioning.

- S2: Add bearer token auth to sandbox /policy and /logs endpoints —
  these were completely unauthenticated, exposing sandbox state to
  any network caller.

- S7: Reject service callers with empty JWT username instead of granting
  IsGlobalAdmin=true — the legacy fallback in both HTTP and gRPC RBAC
  middleware allowed privilege escalation via static tokens without
  OIDC identity.

Closes #431 (S1, S2, S7)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added auto-merge-pending PR eligible for auto-merge, waiting for checks component/manifests labels Jul 27, 2026
@markturansky markturansky removed the auto-merge-pending PR eligible for auto-merge, waiting for checks label Jul 27, 2026
serviceAccountName: ambient-api-server
restartPolicy: OnFailure
securityContext:
runAsNonRoot: true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a base file, not an overlay. loosening security requirements for Kind should be limited to a Kind overlay

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code Review: components/ — Security & Correctness Findings (17 issues)

1 participant