Least privilege

From runxhq/runx · View interactive version

Least privilege is an AI agent skill from the GitHub repository runxhq/runx. Review a grant against exact attributable verified receipts, identify recorded and unrecorded authority, and state the policy and usage evidence needed before narrowing it.

How to use this skill

Skill file

Least Privilege

Review one skill, actor or grant against a bounded set of exact receipts. The

result distinguishes authority recorded in signed receipts from authority not

recorded in that selection, and gives the reviewer a clear next action. It

never changes a grant.

Native Runx owns receipt lookup, signature verification and authority semantics.

This skill binds the review subject, checks the completeness of the supplied

proof and organizes the authority evidence. It does not implement a scope

parser, wildcard matcher, permission hierarchy or policy engine.

Composes

<!-- Generated from the native closure; run pnpm core-skills:composes:generate. -->

What the evidence can establish

The native field named exercised_scopes currently projects signed scope

references and authority terms. Its source identifies that origin. Those

records are not a per-operation successful-usage trace. Counts in this report

count receipts recording an exact scope, not successful calls.

A scope missing from a finite receipt window may still support infrequent,

reserved, recovery or compliance work. Even a recorded scope is not proved

necessary. repo:write does not imply repo:read, and a wildcard cannot be

replaced by the first matching string. Scope strings remain opaque here.

A workflow root can record no scopes while its verified child tree contains actual

operations. Select attributable child receipts when reviewing those operations;

root metadata is not an aggregated successful-usage log. Exact retained operation

claims may provide further bounded evidence through their native reader, but

they still do not prove full coverage, necessity or the semantics of a replacement

grant.

The current native evidence is insufficient to prove a minimal replacement

grant. The method therefore retains the entire grant, emits no executable

attenuation proposal, and requests policy and representative usage review.

A trustworthy narrowing proposal requires the authority owner to establish

coverage and replacement semantics; do not add that mechanism to this skill.

When to use it

Use receipt-audit to assess governance within one run, policy-draft to draft

and lint a policy, and diagnose-skill-run to diagnose an execution failure.

This skill neither grants new authority nor substitutes for those jobs.

Procedure and stops

  1. Supply the exact subject reference, current grant and exact receipt ids.

subject must match each receipt's skill subject, actor reference or grant

reference. A friendly label alone cannot establish attribution.

  1. Resolve missing evidence through receipt-query#read with native chain verification.

Supply an already completed receipt_evidence ledger packet to bypass that

query, or invoke from-evidence explicitly in a workflow. That phase interprets

prior reported verification and does not independently recheck signatures;

preserve its source receipt alongside the result.

Every requested id needs one verified, attributable native detail. Missing,

duplicate, unverified or mismatched details stop the comparison. Unrelated

receipt rows never contribute authority observations.

  1. Require a checked, intact native chain verdict with no breaks. Supplied

replay rows cannot provide this proof even if their fixture labels say

verified. Unknown verification remains unknown.

  1. Compare exact scope strings only. Mark each as recorded, not_recorded

or defer, preserving the receipt references and native source labels.

  1. Retain the grant. With complete proof return review_required; with

incomplete proof return needs_more_evidence. Name the missing policy,

actual usage and observation-coverage evidence before any narrowing.

A checked chain, a sealed review receipt and an empty set of changes do not

prove that a grant is minimal. Do not describe either status as safe to apply.

Inputs and result

another query. The explicit from-evidence phase accepts this same packet.

audit_report returns the status, subject, completeness and chain verdict,

limitations, scope-by-scope recorded authority, retained_grant,

not_recorded_scopes and reviewer_action. attenuation_proposals stays empty

until native evidence can support a replacement. verdict is a short operator

summary. The existing runx/least-privilege.audit.v1 packet is unchanged.

For a verified review of email:send and payment:spend, a receipt recording

only email:send yields recorded and not_recorded, respectively. Both remain

in the grant. The missing payment record is a review question, not permission

to remove payment authority.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.