Skip to content

docs(cloud): scope is a guardrail; read-only rests on the IAM floor#65

Merged
sourcehawk merged 1 commit into
feature/cloud-context-mcpfrom
feature/cloud-context-mcp--review-docs
May 31, 2026
Merged

docs(cloud): scope is a guardrail; read-only rests on the IAM floor#65
sourcehawk merged 1 commit into
feature/cloud-context-mcpfrom
feature/cloud-context-mcp--review-docs

Conversation

@sourcehawk
Copy link
Copy Markdown
Owner

Description

Towards #44

Addresses two review findings on the cloud-context MCP that are guardrail-vs-floor clarifications rather than code bugs. Both reduce to the same principle, now stated explicitly in the docs: scope and the command allowlist are guardrails on the agent's explicit behavior, while the read-only, per-project IAM grant on the pinned identity is the hard floor.

Changes

  • Scope is enforced on explicit flags, not omission (validate.go:74). The Scope section now states that scope constrains the value of an explicit --project/--region/--zone, but omitting the flag falls back to the CLI's default target, which scope does not police. Hard project confinement comes from granting the pinned identity read-only IAM only on the in-scope projects (as the setup section already recommends); region scope is a guardrail against explicit pivots, not a hard limit.
  • Allowlist entries must be leaf read-verbs (allowlist.go:120). The Command-allowlist section now states entries must be complete leaf verbs, never an intermediate group path, because the prefix match would otherwise admit sibling verbs including mutating ones. The shipped defaults are all leaf reads, and the no-write guarantee rests on the read-only IAM grant (a viewer principal's mutating call fails at the cloud), not on the allowlist alone.

Testing

Docs-only. make docs builds the site and regenerates the cloud-providers/ route. The corresponding security improvements these clarify (the bidirectional deny-floor filter and the bounded probe) shipped in #64.

🤖 Generated with Claude Code

…IAM floor

Addresses two review findings: scope only constrains explicit --project/--region
values (omission falls back to the CLI default, so hard project confinement is the
per-project IAM grant), and allowlist entries must be leaf read-verbs (an intermediate
override would admit mutating siblings via prefix match; the no-write guarantee is the
read-only IAM grant, not the allowlist alone).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sourcehawk sourcehawk merged commit a32040f into feature/cloud-context-mcp May 31, 2026
@sourcehawk sourcehawk deleted the feature/cloud-context-mcp--review-docs branch May 31, 2026 00:54
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