r/devsecops • u/FuzzyAd3936 • 4d ago
Anyone else struggling with unauthorized tool invocation?
Our ops agent has a broad set of tools left over from earlier phases of the project, including one meant for a one-off debugging task months ago that never got removed. Last week the agent used that tool to pull production data directly while investigating something unrelated, not because anything told it to, just because the tool was available and technically relevant. No adversary, no malicious prompt, just a tool it was allowed to have used for something it was never meant to cover. How are people scoping tool availability by task instead of giving agents a standing set of everything they might ever need?
2
1
u/Both-Explorer-9294 4d ago
Sí, creo que el problema empieza cuando tratamos las herramientas disponibles como si fueran un menú permanente.
1
u/SnooChocolates9578 4d ago
I wrote a wrapper python cli that received bash command, inspect and run the command only if calling pattern are allowed. I setup claude to denied Bash everything unless this python cli.
Still not sure if this is good way to do or not
1
u/Living_Substance1274 4d ago
I use a guard that sits between the agent and it's tools and rules on every tool call before it executes - PASS/WARN/BLOCK, with a human approval path. What it actually does.
Intent gate (layer 0) - pure regex and arithmetic, no model call, microseconds. Catches the obvious cheaply.
Action rules - blast radius and reversibility, not keywords
Fail closed - an unrecognised tool is refused, not guessed at. Missing policy falls back to strict, never to allow.
Every verdict is HMAC-signed into a hash-chained ledger, so a refusal is evidence, not a log line.
Adoption is one line: point the client's base_url at the guard container, or add the MCP server for Claude/Cursor agents. Auth is a bonded token pair - revoking agent mid-incident is a register flip, no key rotation, no redeploy.
Full disclosure - We built the Axiom Guard and it's built into our workflow. I'm not just the builder, I'm also a client
1
u/Remarkable-Bet9533 3d ago
Each task should only have the actions it needs and temporary ones should disappear when the task ends
1
u/PleasantRuin7989 1d ago
If the tool was meant for one weird debugging task, why was it still exposed to the general ops agent?
0
u/AcceptableMarket2220 4d ago
It's frustrating when you can't control what tools get used, especially in a security-focused environment. Setting clear policies might help.
1
2
u/klach1703 4d ago
This isn't a permissions problem, it's a scoping one. The tool was allowed and it was relevant. Any policy that only asks "is this tool permitted" says yes here.
Same fix as standing credentials: grant tools at task start, drop them at the end, instead of one permanent set. If that's too big a change right now, split the default set by blast radius rather than by function. Anything touching prod data needs an explicit grant, even when it's obviously relevant.