Lesson 2 of 5 · 8 minutes of reading, plus 10 on your report
The chain
A single permission doesn't tell you much. What matters is the chain: who gets in, what they can do, which keys they find and what those keys open. If one link is missing, the chain breaks.
Step 1 of 6 · Before you start
You'll learn how what an agent can do links up until it reaches something of yours that has value, and where to break it.
You need nothing for steps 1 to 4. For step 5, RosmarOps.
In the previous lesson you saw what an AI agent is, who gives it permission and how to read the “Result” block of your report.
Step 2 of 6 · The idea, with an example
The building's keyring
Four questions, always in the same order.
In lesson 1 we were looking at the inspector. Now we look at the painter: what it can open while it works.
Who gets in?
The painter who comes to work in the building. Claude Code, Cursor, an MCP server: any program that can act on your computer.
What do you let it do?
Walk into the flats without knocking, only with permission, or never. Read, write, run commands, go online.
Which keys does it find?
The keys hanging in the flats it can walk into: a service's key saved in a .env file (a text file where many programs keep their keys), a token, a private key.
What does each key open?
The garage, the strongbox, the bank account. Your Stripe account, your repositories, a database or another agent's configuration.
Why the order matters
- A key on its own isn't a problem if nobody can reach it without asking you.
- An agent with lots of permissions isn't a problem if there's nothing valuable within its reach.
- The problem is the whole chain. And to break it, you only need to remove one link: the easiest is almost always the second one, what you let it do.
What you can't see
- RosmarOps reads what each agent is allowed to do, not what it does while it works.
- And what it couldn't read, it doesn't count as clean: it tells you it couldn't read it.
Step 3 of 6 · Try it
Break the chain
Do this, in order:
- Read the card on the right (on a phone, below). It's the one for the “Agent” link.
- Tap the “Capability” link and read its card.
- Tap “Credential” and read its card.
- Tap “Resource” and read its card.
- Read the message under the controls. It says “The chain is whole”.
- Press “Ask”. Look at the arrow between the second and third links: now it's dashed and red, and links 3 and 4 fade out.
- Press “Deny”. The arrow is still broken. Read the message.
- Set the switch “Can it run any command without asking you?” to “Yes”. Look at the same arrow: it turns amber and says “reaches, partly”. Links 3 and 4 come back.
- Press “Ask”. It's still “partly”.
- Set the switch to “No”. The chain breaks again.
- Press “Allow”. The chain is whole again.
Can Claude Code read your .env?
Can it run any command without asking you?
A made-up example, with the real shape of what RosmarOps draws. Source: the glossary and the program's public schema.
What you've just seen: a common trap
- Forbidding the agent to read a file cuts the direct path.
- But if the agent can run any command without asking you, a program it launches can read that file anyway.
- RosmarOps sees this and flags it: the chain still holds, “partly”.
Step 4 of 6 · Check it
First a game of six changes, then a test of four questions.
What breaks?
You change one thing on your computer. In which link of the chain does RosmarOps see it? It can be more than one, or none.
You change something. Where does it show?
Test
Step 5 of 6 · On your computer
Ten minutes. Find a real chain in your own report.
- Run RosmarOps and open the report.
Don't have it yet? Download itThanks for trying it. If you find it useful, a star on GitHub helps others find it.
Star on GitHubWhat you see: the report in your browser, with “RosmarOps report” at the top and the “Result” block you read in lesson 1.
- Scroll down to the “Findings” block. Look for a problem with the word “KEY” above its title. Its title says something like “Your Stripe is within reach of 2 agents.”
What you see: under the block's title, a line with the numbers, like “3 problems · 5 findings · 1 urgent · 2 to review”. The word “KEY” is in capitals, above the problem's title, with an icon on the left.
Can't see the key problem? If you have more than six problems, the rest are folded at the end of the table, in a link like “The other 5 problems (12 findings)”. Tap it to open them.
- Read the line underneath: “These agents can read its keys without asking you: …”. There you have the agents, the first link. And “without asking you” is the capability, the second one.
What you see: the agents' names, separated by commas, at the end of that line.
- Tap “See the steps ›” (or the link in the “How to fix it” column) to go to that problem in “The detail, problem by problem”. Its title says, for example, “Your Stripe key: Claude Code can read it without asking you”. There you have the credential, the third link.
What you see: the page scrolls down to that problem.
- Read the sentence that follows: “With it anyone can move money or read your customers' payments.” That's the resource, the fourth link.
What you see: that sentence just under the problem's title.
- Write down your chain in four words: agent → capability → credential → resource.
- Now decide which link you would break. It's almost always the second one: the agent asking you before reading that file. The first problem in your report and the “Start here” card tell you how.
What you see: the “Start here” card, right at the top, in the “Result” block.
What if you don't have any problem marked “KEY”?
It means that, in what RosmarOps was able to read, no agent reaches a key without asking you. Also look at the line “Outside the scope of this analysis” in your report: what it couldn't read doesn't count as clean.
Step 6 of 6 · What you take away
- The chain has four links: who gets in, what it can do, which keys it finds and what they open.
- To break it, removing one is enough, and the easiest is almost always the second: that it asks you.
- Forbidding it to read a file isn't enough if it can run any command without asking you.
New terms
AI agent · Capability · Key or credential · Resource · MCP server · Allow, ask, deny · Key fingerprint
Every fact in this lesson comes from RosmarOps's code, which is public (github.com/qtorb/rosmarops), from the Observatory and from Claude Code's official documentation.
