Andy.Permissions
2026.9.7-rc.23
dotnet add package Andy.Permissions --version 2026.9.7-rc.23
NuGet\Install-Package Andy.Permissions -Version 2026.9.7-rc.23
<PackageReference Include="Andy.Permissions" Version="2026.9.7-rc.23" />
<PackageVersion Include="Andy.Permissions" Version="2026.9.7-rc.23" />
<PackageReference Include="Andy.Permissions" />
paket add Andy.Permissions --version 2026.9.7-rc.23
#r "nuget: Andy.Permissions, 2026.9.7-rc.23"
#:package Andy.Permissions@2026.9.7-rc.23
#addin nuget:?package=Andy.Permissions&version=2026.9.7-rc.23&prerelease
#tool nuget:?package=Andy.Permissions&version=2026.9.7-rc.23&prerelease
Andy.Permissions
A Claude-Code / opencode style tool permission and consent system for the Andy stack. It gates
Andy.Tools executions through an Allow / Ask / Deny rule engine with layered, file-backed
persistence, and supports injecting permissions up front so unattended container runs never prompt.
Repository: https://github.com/rivoli-ai/andy-permissions
ALPHA RELEASE WARNING
This software is in ALPHA stage. NO GUARANTEES are made about its functionality, stability, or safety.
CRITICAL WARNINGS:
- APIs, schemas, and storage formats may change without notice between releases.
- Permission evaluation and enforcement are NOT FULLY TESTED for security-critical use.
- DO NOT USE in production environments.
- DO NOT rely on this as the sole control protecting sensitive files, credentials, or systems.
- The authors assume NO RESPONSIBILITY for unauthorized access, data loss, or security breaches.
USE AT YOUR OWN RISK.
Overview
Andy.Permissions decides whether a tool call may proceed, by matching it against a merged set of
rules. Rules use the familiar tool(specifier) form (for example read_file(~/.ssh/**) or
bash_command(git status:*)) and resolve to one of three outcomes:
Allow- proceed without prompting.Ask- request consent from the host (interactive prompt, container policy, or remote broker).Deny- block the call. Deny is absolute and is never overridden by an Allow in any layer.
Permissions apply to every tool, not just shell commands: you can ban reads of a directory, restrict writes, scope network hosts, and require confirmation for destructive operations.
Features
- Rule model with
tool(specifier)parsing, mirroring Claude Code'ssettings.jsonpermissions. - Path matching with traversal-safe lexical normalization, command-prefix matching with argument boundaries, host/domain matching, and symlink-aware deny (a symlink in an allowed directory cannot reach a denied secret).
- A fail-closed shell command splitter so
git status && rm -rf /cannot inherit an allow granted togit status— withbash -cunwrapping, benign-wrapper stripping (timeout,nice,env, …), command-substitution surfacing, redirection detection, and shell-function/fork-bomb rejection. - A built-in command classifier: known read-only commands auto-allow on fallback, while dangerous
commands (
rm -rf,sudo, interpreters,dd, …) and output redirection raise a safety floor of Ask over broad allows. Argument-audited sogit -c,find -exec,sed -i,rg --preare not "safe". - A precedence model where Deny is absolute, otherwise the highest-precedence layer wins, otherwise a tool-metadata fallback.
- Layered, corruption-resilient file store: managed (admin, uncoverable — discovered by default at
/etc/andy/permissions.managed.json, or%ProgramData%\andy\permissions.managed.jsonon Windows), user, project, local, session, and injected layers with atomic writes. - A pluggable consent seam (
IPermissionPrompt) with a non-interactive provider for headless and container use (fail-closed or bypass), and reject-with-feedback surfaced back to the model. - A decorating
IToolExecutorthat enforces decisions in front of any executor, plus dependency injection helpers and a container bootstrap driven by environment variables.
The full cross-tool best-of-breed specification and gap analysis is in
docs/permission-spec.md.
Requirements
- .NET 10.0 SDK
Build and test
dotnet restore
dotnet build
dotnet test
Container usage
See docs/container-usage.md for the full guide (Docker examples, rules
format, modes) and examples/permissions.container.json for a
ready-to-mount rules file.
For unattended runs, inject the rules up front so no consent is ever requested:
ANDY_PERMISSIONS_FILE- path to a JSON rules file to load as the highest-precedence layer.ANDY_PERMISSIONS_JSON- inline JSON rules (used when no file is set).ANDY_PERMISSION_MODE- the baseline mode. A mode is a fallback shift overAsk(it never turns aDenyinto anAllow). Headless resolution:fail-closed(default, and any unrecognized value) -Ask⇒ Deny; denies anything not pre-allowed.default- the interactive baseline; with no TTY it denies like fail-closed.plan- read-only;Ask⇒ Deny (nothing needing consent proceeds).accept-edits-Ask⇒ Allow when every asked resource is a filesystem path (in-scope file edit), else Deny.bypass(aliasyolo) -Ask⇒ Allow; still honors every Deny.
Rules file shape:
{
"allow": ["read_file(/workspace/**)", "bash_command(git:*)"],
"ask": ["write_file(/workspace/**)"],
"deny": ["read_file(~/.ssh/**)"]
}
Project layout
src/Andy.Permissions/ The library (depends on Andy.Tools)
tests/Andy.Permissions.Tests/ xUnit test suite
Design
The full design, review resolutions, and test matrix live in the andy-engine repository at
docs/permissions-design.md. Cross-repo work is tracked in the epic rivoli-ai/andy-engine#5.
License
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Andy.Tools (>= 2026.7.21-rc.84)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.9.7-rc.23 | 69 | 9/7/2026 |
| 2026.9.7-rc.21 | 61 | 9/7/2026 |
| 2026.7.31-rc.18 | 75 | 7/31/2026 |
| 2026.7.27-rc.16 | 302 | 7/27/2026 |
| 2026.7.21-rc.14 | 455 | 7/21/2026 |
| 2026.7.21-rc.12 | 80 | 7/21/2026 |
| 2026.6.21-rc.10 | 159 | 6/21/2026 |
| 2026.6.4-rc.8 | 79 | 6/4/2026 |
| 2026.6.4-rc.6 | 255 | 6/4/2026 |
| 2026.6.4-rc.4 | 86 | 6/4/2026 |
| 2026.6.4-rc.2 | 73 | 6/4/2026 |
| 2026.6.4-rc.1 | 75 | 6/4/2026 |