Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

agent-authorizer

Latest version: v0.14.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: roeehersh
4 Stars
0 Forks
1 Versions
Python Repo language

Scan summary

agent-authorizer was last scanned on 23 Nov 2026 at version 0.14.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 23 Nov 2026.
  • Findings: No rules fired in version 0.14.0.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.14.0 LATEST 23 Nov 2026 No rules fired

No rules fired in 0.14.0

Findings

Findings for v0.14.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.14.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

agent-authorizer

Authorizes what an AI agent does against the permissions of the user it is acting for, under any agent framework. The agent keeps its own credential; each action it takes for a user runs only if that user may do it. The repository README explains the problem.

The secure-tools API (Toolkit, Session) is alpha and may still change; the permission engine (AgentAuthorizer, guarded, the adapters) is stable.

The agent-authorizer server's dashboard (/dashboard/) shows every run of your agent-authorizer tools, from every agent that reports to it: who it ran for, and every request each run made inside GitHub, Jira, Slack and the other systems, allowed or refused. A toolkit whose permissions are remote reports with nothing else configured; agent_authorizer.otel exports each run as a span. See the dashboard guide, and python examples/demo/run.py for five systems at once.

Teams write custom tools for their own agents: open a pull request against the GitOps repository, scale a deployment, read customer records, post to Slack. Those tools usually run with one service credential for everyone who talks to the agent, and every team rebuilds the same safety checks by hand, or skips them. agent-authorizer is a decorator on a plain Python function. The function declares nothing; agent-authorizer watches what it does:

import agent_authorizer
from agent_authorizer import Session, AgentAuthorizer, as_user
from github import Github                            # any SDK: PyGithub, slack_sdk, boto3, raw requests

agent_authorizer.configure(permissions=AgentAuthorizer.from_config("agent-authorizer.yaml"))   # the github-acme connection, among others


@agent_authorizer.tool()
def propose_fix(repo: str, path: str, fix: str) -> str:
    repo_ = Github(auth=token).get_repo(repo)
    current = repo_.get_contents(path)               # the agent reads on its own authority
    with as_user():                                  # pr.create on repo:acme/x: checked against the user
        pr = repo_.create_pull(title="fix", body=fix, head="fix", base="main")
    return pr.html_url


with Session("dana@example.com").active():           # the user your app authenticated
    agent.run(prompt)

Every HTTP request the body makes is mapped to the action it is, checked against the session's user, and refused before it is sent when they may not do it; see Actions observed at the wire. A tool can also declare what it does, and the two compose:

from agent_authorizer import permission_check

agent_authorizer.configure(credentials={"github-bot": github_token}, limits={"destructive": 3})


@agent_authorizer.tool(
    effect="write",
    scope={"repo": "acme/gitops-*"},                 # the tool itself can touch nothing else
    authorize=permission_check(tp, "github-acme", "pr.create", "repo:{repo}"),
    credential="github-bot",                          # injected below; the model never sees it
)
def open_gitops_pr(repo: str, title: str, change: str, *, credential: str) -> str:
    ...

The decorated function keeps its signature (minus the injected credential), so LangChain, Pydantic AI, CrewAI, the OpenAI Agents SDK or your own loop can put their own @tool on top. No adapter is needed. Or let agent_authorizer.tool apply it: as_tool= takes the framework's decorator and returns that framework's tool, with every check inside.

from langchain_core.tools import tool

@agent_authorizer.tool(effect="read", untrusted_output=True, as_tool=tool)
def read_email(id: str) -> str: ...

Some frameworks hide a tool's exception from the model or let it escape the run (the OpenAI Agents SDK's function_tool answers "An error occurred while running the tool"; LangChain's default ToolNode, Pydantic AI, Google ADK, CrewAI and the MCP SDK's server behave their own way). There, agent_authorizer.configure(on_refuse=str) makes a refusal the tool's result, so the model can tell the user why; the guide lists which frameworks need it.

agent_authorizer.configure(...) sets up the default behind agent_authorizer.tool; tools declared earlier pick the settings up at call time. A program that needs two sets of settings makes Toolkit(...) objects and uses their agent_authorizer.tool.

What a tool can declare

Protection Declared with What it guarantees
User from the session Session(user).active() The user comes from your app, never from the model's arguments
Argument validation type hints, validate={...} str is a str, Literal is one of its values; your validators run before anything else
Scope limits scope={"repo": "acme/gitops-*"} The tool can only touch what it declares, whoever asks
Action limits limit=, Toolkit(limits={"destructive": 3}) A loop or an injection cannot run 200 deletes in one session
User authorization authorize=permission_check(...) or any callable The call runs only if the person asking may do it
Untrusted-input check untrusted_output=True on readers An action whose arguments repeat untrusted content (an email, a web page) is refused
Fencing automatic for untrusted string output; agent_authorizer.fence() for any text Untrusted text reaches the model in a block whose id its author could not know; forged tags are replaced and borrowed frames counted
Exfiltration guard reads_private=True, sends_out=True Once a session has read private data and seen untrusted content, nothing is sent out
Credential injection credential="name" The secret is fetched after every check and never enters the model's context; echoes of it in the output are redacted
Audit Toolkit(audit=...) One event per call, refused or run, with who asked and why it was decided
Observed actions Toolkit(permissions=tp), no effect Every request the body makes is mapped to an action, inside as_user() checked against the user and refused before it is sent; outside it runs on the agent's authority (act_as="user" checks every request but those in as_agent())
Recorded entitlements Toolkit(record=...), then entitlements= A run records what the tool did; the tool is then held to it, with the user's actions checked before the body runs

The order of checks

Every call goes through the same steps. A failed step refuses the call before the tool's body runs, and anything that cannot be evaluated (an authorizer that raises, a credential source that is down) refuses too.

  1. Session. No current session means no call.
  2. Arguments. Types, then validators, then scope rules.
  3. Limits. One slot is taken from each cap, and given back if the call never reaches its body.
  4. Authorization. Only an explicit allow lets the call through.
  5. Untrusted input. Arguments repeating six or more consecutive words of untrusted output are refused.
  6. Exfiltration. A sends_out tool in a session that has read private data and seen untrusted content is refused (exfiltration="off" turns the guard off).
  7. Credential. Fetched only now.
  8. The body. Its output is redacted, recorded if untrusted, and fenced.
  9. Audit. One event, whatever happened.

The exfiltration guard

An agent can be made to leak data only when one session has all three of what Simon Willison calls the lethal trifecta: access to private data, exposure to untrusted content, and a way to send data out. Tools already declare which of these they are, so the toolkit tracks the first two per session and guards the third:

@agent_authorizer.tool(effect="read", reads_private=True)
def read_customers() -> str: ...

@agent_authorizer.tool(effect="read", untrusted_output=True)
def read_email(id: str) -> str: ...

@agent_authorizer.tool(effect="write", sends_out=True)
def post_slack(channel: str, text: str) -> str: ...

After read_customers and read_email have both run in a session, post_slack is refused. This does not depend on spotting injected words, so a model that paraphrases the injection does not get past it.

Hooks in async tools

In async tools, sync hooks (an authorizer, a credentials callable) run in a worker thread, so blocking I/O in them cannot stall the event loop; pass async def hooks to run them on the loop.

Watch it live

agent_authorizer.watch() serves a page that shows every call the toolkit decides, as it happens: who asked, the arguments, ran or refused and why, each request the body made and the system it reached, with a map of the tools and those systems. It is read-only: it changes nothing in the toolkit.

import agent_authorizer

page = agent_authorizer.watch()                    # the default toolkit; agent_authorizer.watch(kit) for another
print(page.url)                            # http://127.0.0.1:PORT/t/<token>/
...
page.close()                               # or use it as a context manager

page.events() returns what the page shows.

The page binds to the loopback interface only, and every path carries a random token, so another program or web page on the machine cannot read anything without the printed URL. It has no accounts: to show it to people elsewhere, put something that authenticates them in front of it.

Refusals

A refused call raises ToolRefused with a code (out_of_scope, not_authorized, untrusted_input, exfiltration_risk, ...) and a message written for the model. Three codes answer "may this user do this?" and must not be confused: not_authorized (the user was checked and lacks access), authorization_error (the question could not be answered: an upstream timeout, an unknown answer, an unreachable agent-authorizer; try again shortly) and not_configured (nothing was checked: agent-authorizer has no such connection or action, a server refused the client's key, or the toolkit has no permissions engine; an operator must configure it). Only not_authorized says the user may not. Most frameworks pass the exception's text back to the model. Where a framework hides it, Toolkit(on_refuse=str) returns the message as the tool's result instead. A check that itself fails unexpectedly (a scope predicate that crashes, a session source that is down) refuses with check_error or the check's own code.

An exception from the tool's own body passes through unchanged, with two exceptions. If its message contains the injected credential, or the tool is marked untrusted_output (its error text may carry what it fetched), it is raised as ToolError: the secret redacted, the untrusted text recorded and fenced, and the original exception kept on .original for your own logs.

A validator accepts by returning True (or any truthy value, such as a re.Match) and rejects by returning anything falsy (False, None) or raising. Generator tools are not supported: return the whole result. A returned iterator is turned into a list before redaction; an async iterator is refused.

Fencing untrusted text

agent_authorizer.fence(payload, label=..., source=...) returns (block, frames): the payload between two tags whose id is minted after the payload was fetched, a preamble telling the model that everything inside is data (it starts with agent_authorizer.FENCE_START), and a fixed closing line (agent_authorizer.FENCE_END) after which trusted text resumes. Fence tags carrying any other id, and the closing line, are replaced in the payload with [forged fence tag], and the preamble says how many. Frames borrowed from other trust systems (<system-reminder> and other tags of that family, "type": "tool_result" / "tool_use", a Human:, Assistant: or System: turn, ChatML and Llama markers) are counted after NFKC, logged and left as they are; frames is that count. The label (often a path the model chose) is clipped to 300 characters, kept to one line and JSON-quoted. label and source are keyword-only.

block, frames = agent_authorizer.fence(event.diff, label=event.ref, source="CI event")
prompt = f"Review requested by {requester} for {event.ref}.\n{block}"

It works on text no tool produced (a chat thread's earlier messages, a CI event's diff) and on part of a result. agent_authorizer.neutralize(text, limit=300) gives text that is shown outside any fence (a path the model chose, in a PR body or a log line) the label's treatment: tags and the closing line replaced, one line, clipped. untrusted_output=True fences a tool's whole string output with the same function, unless the body already fenced its untrusted part itself (a whole block, minted during the call).

Permission checks in tools

permission_check asks AgentAuthorizer, the permission engine in this package, whether the session's user may perform the action, live, in the system that owns the resource (GitHub, Jira, Kubernetes, AWS, and 18 more). It works with AgentAuthorizer.from_config(...) in-process or AgentAuthorizer.remote(...) against an agent-authorizer server. Any callable that returns AuthDecision, True or False can be the authorizer instead. The engine also works on its own: permission checks on their own, below.

Actions observed at the wire

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases agent-authorizer

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229