Skip to content

Threat model (#84) - #85

Merged
paureis merged 5 commits into
mainfrom
docs/84-threat-model
Nov 4, 2026
Merged

paureis merged 5 commits into
mainfrom
docs/84-threat-model

Conversation

@paureis

@paureis paureis commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Closes #84

Adds THREAT_MODEL.md: what cloudpin protects, whom it trusts, the controls (each naming the code that implements it), and what it deliberately doesn't try to stop. SECURITY.md links to it, and ROADMAP lists it under 1.3.0. Docs only; no code changes.

Questions for a reviewer (about 15 minutes):

  • Does the Out of scope list match how you'd expect a "seatbelt" to behave? In particular: a prompt-injected agent can edit .cloudpin.yml or its own hook settings.
  • Is any control claimed more strongly than the code supports? Each names its file, so it can be checked.
  • Is there a way a command could act on the wrong account without cloudpin noticing that isn't listed?

🤖 Generated with Claude Code

An outside review approved this on 2026-10-26. Merging it brought in cloudpin switch, so the credentials control and a new switching control were updated after that review.

THREAT_MODEL.md: what cloudpin protects (cloud accounts, and never the
credentials), whom it trusts (the person, the agent's good faith, the
project's pin file, each CLI's own identity answer), the controls with
the code behind each, and what is out of scope, notably a malicious or
prompt-injected agent, which can edit the pin file or its own hook
settings. SECURITY.md links to it; ROADMAP lists it under 1.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paureis paureis added this to the 1.1.0 milestone Oct 12, 2026
@paureis paureis assigned paureis and unassigned paureis Oct 12, 2026
@carlosrod1231

Copy link
Copy Markdown

Question 1: I believe the Out of Scope list matches how I'd expect a seatbelt to behave and I think it's the right call, and the doc states that. I would add that cloudpin checks the account and not a repo, Vercel project, or a region that a command targets, and maybe suggest denying agents from making edits to .cloudpin.yml and the hook settings.
Question 2: I think the doc doesn't claim control more strongly than what the code supports for the most part. However, I think "agent hooks never fail open" is too strong of a statement; in the example where the hook can't start at all, Claude Code (or Codex) would run the command anyway.
Question 3: Yes, in an agent (export AWS_PROFILE=other; aws ... and GH_TOKEN=$(cat other.token) gh ...) are checked against the default account but run on another one. MCP tools never go through the shell hook. THREAT_MODEL.md doesn't state either of these gaps

- "Agent hooks never fail open" was too strong: if cloudpin can't start
  at all, Claude Code and Codex run the command. Now "fail closed once
  cloudpin is running", with that case stated and doctor named.
- Variables set earlier in the line, and values only known when it
  runs, are a control now that #86 handles them.
- Out of scope: which resource inside the account (repo, Vercel
  project, region); an agent's MCP tools for a cloud provider.
- Advice: deny the agent edits to .cloudpin.yml and its hook settings.

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

paureis commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

Exactly what I needed.

Q1: I added to the out of scope list that cloudpin checks the account (and the project, where one is pinned), but not which repo, Vercel project or region a command targets. I also added your suggestion: use the agent's own permission settings to deny it edits to .cloudpin.yml and to its hook settings file.

Q2: You're right about "never fail open". It now says the hooks fail closed once cloudpin is running, and that if cloudpin can't start at all, Claude Code and Codex run the command anyway. cloudpin doctor checks for that now as well.

Q3: Both of your examples turned out to be bugs in cloudpin itself. export AWS_PROFILE=other; aws ... was checked against the default account, and GH_TOKEN=$(cat other.token) gh ... read the token as empty. That's fixed in #86, which ships in 1.0 tomorrow: cloudpin now follows export, unset and $env: through the line, and blocks the command when the account depends on a value it can't know ahead of time. MCP tools are in the out of scope list now too.

Feel free to take another look when you get a chance and you can approve it from Files changed > Review changes > Approve.

Much appreciated.

@paureis paureis modified the milestones: 1.1.0, 1.2.0, 1.3.0 Oct 16, 2026

@carlosrod1231 carlosrod1231 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm going to approve: the changes cover everything I raised, and #87 fixes the two bypasses with tests for both. Before merging, the ROADMAP.md conflict needs resolving (main now lists this under 1.3.0), and since paureis/cloudpin#121 Wrangler’s .env files (which can hold CLOUDFLARE_API_TOKEN) should join the kubeconfig as credential files cloudpin reads, here and in SECURITY.md/README.

paureis added a commit that referenced this pull request Oct 26, 2026
…ential files read

Since #116 cloudpin reads the .env files Wrangler loads, which can hold
CLOUDFLARE_API_TOKEN. SECURITY.md said credential files are not read except
the kubeconfig, and README said the same. Both now name the .env files and
what cloudpin takes from them. Raised in the review of #85.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paureis and others added 2 commits October 26, 2026 17:33
… names (#84)

From the review's approval: the .env files Wrangler loads can hold
CLOUDFLARE_API_TOKEN, so they join the kubeconfig as credential files
cloudpin reads, in THREAT_MODEL.md and SECURITY.md (the same SECURITY.md
wording is on release/1.2.0, with the README line).

Brought up to date with main: the user-only variables now live in
src/user-env.ts (CLOUDPIN_BRANCH included, set or unset), help and version
exempt only where the CLI stops on them (#146), redirections (#154), and a
new control that says plainly the command-line parser is the weak point,
links the 2026-10-26 audit issues and states the fail-closed aim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paureis added a commit that referenced this pull request Oct 29, 2026
* Release 1.2.0: bump the version

package.json, the package-lock.json root, plugin/.claude-plugin/plugin.json,
both version fields in server.json, and the bug report form's example.

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

* Release 1.2.0: CHANGELOG, README, ROADMAP and docs

The CHANGELOG entry (with the GitHub Action under Added), README's latest
release paragraph and its CI answer pointing at paureis/cloudpin-action,
ROADMAP's Shipped list, and the "(1.2.0, out 2026-11-05)" notes dropped
from README and docs/mcp.md.

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

* File-size guard: README.md may reach 6,500 tokens

README is one page (install, configuration, every provider and agent) and
had passed the guard's 5,000-token default, which blocked release edits.
Owner decision 2026-10-23.

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

* Release 1.2.0: the date moves to 2026-10-29

Owner decision 2026-10-23: ship a week early, because npm's 1.1.2 lacks
the wrong-account fixes found this week (#125, #127, #130, #133) and the
MCP Registry can only list a release that has mcpName.

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

* Release 1.2.0: list #146 in the CHANGELOG, ROADMAP, README and DESIGN

A help or version flag exempts only where the CLI stops on it, so README's
"never blocked" line and DESIGN's block rule say so.

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

* Release 1.2.0: list #154 and #156 in the CHANGELOG and ROADMAP

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

* Release 1.2.0: SECURITY and README name Wrangler's .env files as credential files read

Since #116 cloudpin reads the .env files Wrangler loads, which can hold
CLOUDFLARE_API_TOKEN. SECURITY.md said credential files are not read except
the kubeconfig, and README said the same. Both now name the .env files and
what cloudpin takes from them. Raised in the review of #85.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
SECURITY.md takes main's paragraph. THREAT_MODEL.md now covers cloudpin switch and
the AWS config file it reads; CHANGELOG and ROADMAP lines for #84.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paureis
paureis merged commit d1abb54 into main Nov 4, 2026
5 checks passed
@paureis
paureis deleted the docs/84-threat-model branch November 4, 2026 23:43
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.

Threat model (THREAT_MODEL.md)

2 participants