tool-authorization-policy-v2
6 rules · Keryn Software Licence · rules 0.8.0 · all packs
How to read a rule
- Severity
- How bad the finding is if it is real:
errorfails a default gate,warningandinfodo not. - Confidence
- P0 exploitable as written; P1 dangerous in context; P2 a heuristic or a posture check: confirm by reading the code.
- False-positive risk
- low: an exact API or flag, so hits are almost always real; medium: the pattern is legitimate in many programs, so check each hit; high: it finds a lead to confirm, so expect benign hits.
- Edge
- The relationship the finding sits on. reaches: content or traffic gets to a thing; calls: one thing invokes another; reads: one thing reads from another; writes: one thing writes to another; sends: data leaves for another party; grants: authority is given or left unchecked; depends_on: something relies on a component it does not verify; trusts: one party believes another without evidence. The boundary it crosses, when there is one: user->prompt (untrusted input reaching a prompt); model->code (model output reaching code, a shell, a query or a page); secret->outside (a secret leaving the trusted side); supply-chain (code, models or prompts pulled in from outside).
- Taxonomy chips
- References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.
seceng.toolauth.dangerous-tool-no-approval-ts
Section titled “seceng.toolauth.dangerous-tool-no-approval-ts”warning typescript, javascript tool-authorization-policy
Tool/action performs dangerous side effect without visible approval, scope, role, or ownership gate.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
CWE-862 LLM06 ASI03 ASI02 GOVERN MANAGE
Also reported under the older id seceng.llm06.dangerous-tool-verb-no-approval-js.
seceng.toolauth.dangerous-tool-no-approval-python
Section titled “seceng.toolauth.dangerous-tool-no-approval-python”warning python tool-authorization-policy
Python tool/action performs dangerous side effect without visible approval, scope, role, or ownership gate.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
CWE-862 LLM06 ASI03 ASI02 GOVERN MANAGE
Also reported under the older id seceng.llm06.dangerous-tool-verb-no-approval, seceng.llm06.dangerous-tool-verb-unprotected.
seceng.toolauth.model-controlled-user-or-tenant
Section titled “seceng.toolauth.model-controlled-user-or-tenant”warning typescript, javascript, python tool-authorization-policy
Tool or agent action accepts userId, tenantId, organizationId, or accountId from model/tool arguments.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
CWE-639 LLM06 LLM08 ASI03 ASI02 ASI06 GOVERN MANAGE
seceng.toolauth.approval-check-after-side-effect
Section titled “seceng.toolauth.approval-check-after-side-effect”warning typescript, javascript, python tool-authorization-policy
Approval or authorization check appears after the side effect. Approval gates must happen before the action.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
CWE-696 LLM06 ASI03 ASI02 GOVERN MANAGE
seceng.toolauth.policy-bypass-flag-from-request
Section titled “seceng.toolauth.policy-bypass-flag-from-request”warning typescript, javascript, python tool-authorization-policy
Request/model/tool input controls skipApproval, dryRun=false, force, admin, or bypass flags.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
CWE-20 CWE-807 LLM06 ASI02 GOVERN MANAGE
Try it: a snippet that triggers this rule
Written for this page, not taken from any project. Save it as src/routes/actions.js and scan it with keryn scan src --verbose; the finding below appears.
import express from "express";import { runAction, requireApproval } from "../actions.js";
const router = express.Router();
router.post("/actions/:name", async (req, res) => { if (!req.body.skipApproval) { await requireApproval(req.params.name, req.user); } const result = await runAction(req.params.name, req.body.args); res.json(result);});
export default router;Checked with Keryn’s browser engine when this page was built: it reports seceng.toolauth.policy-bypass-flag-from-request at line 7 (warning, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.
seceng.toolauth.audit-missing-for-dangerous-tool
Section titled “seceng.toolauth.audit-missing-for-dangerous-tool”info typescript, javascript, python, java, csharp tool-authorization-policy
Dangerous tool/action lacks visible audit event with user, tenant, resource, and action context.
Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.
Edge inspected: calls one thing invokes another.