Skip to content

Todo 14 grant skill - #11

Open
pnc wants to merge 2 commits into
mainfrom
todo-14-grant-skill
Open

Todo 14 grant skill#11
pnc wants to merge 2 commits into
mainfrom
todo-14-grant-skill

Conversation

@pnc

@pnc pnc commented Aug 24, 2026

Copy link
Copy Markdown
Member

Add a skill and a script that can be used to generate, review, and grant duration-limited STS credentials for agent use.

pnc and others added 2 commits August 24, 2026 17:39
With git worktrees .images is often a symlink into the primary checkout's
image cache, and a trailing-slash pattern matches only real directories --
so the symlink showed as untracked and was easy to commit by accident.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phil says:

1. The agent proposes an IAM policy and waits
2. Operator examines and grants it using a script (grant.py) not writable
   by the VM; the script reads and displays the grant to avoid a TOCTOU
   switcheroo.

The grant does create an actual role since AWS has limited ability to
issue "one off" IAM scoping (you can do it, but it's
severely length-limited.)

Claude says:

grant.py runs on the host from the repo root, not shared/, so the guest
cannot rewrite the command between the operator reviewing it and running
it, and it applies the exact policy bytes it printed and confirmed before
issuing 1-hour STS credentials to shared/aws/credentials. The guest half
is a skill in shared/skills reached via a ~/.claude/skills symlink that
runcmd creates once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pnc

pnc commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

This is obviously dangerous and I'd like scrutiny on both the security posture as well as the human interface here.

@ddellacosta ddellacosta 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 guess fundamentally the riskiest thing to me here is if I enable some permission that I didn't think through carefully. The boundaries between host/guest wrt grant.py access seem solid to me, and I appreciate that the skill includes something that describes all the proposed permissions, and that there's a test confirming the vm can't modify grant.py. In the end I think it's most likely that we ourselves may get used to rubber-stamping whatever permissions it provides us so whatever helps us guard against that is a plus I think...will keep thinking on it though.

Comment thread tests/test_e2e.py
in the repo root, outside the shared mount: if the guest could rewrite it
between the operator's review and their run, the review would be
meaningless (a TOCTOU on the human checkpoint). The guest may only write
the *policy* file under shared/, which grant.py displays and confirms.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

may get used to rubber-stamping

This is my fear, too, especially for "actually we need one more permission," are we really going to re-review the whole thing carefully?

I am wondering if syntax coloring for Put/Delete regexed IAM actions might help? Maybe a global "no more than X without an extra mollyguard you have to type besides "y"?

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.

2 participants