PermitDiff
Detect when a permission change grants more authority.
CORE QUESTION — Did this permission change grant more authority?
A text diff sees two numbers. PermitDiff sees that a refund was denied before and allowed after the policy change.
Maturity · Isolated Evaluation Harness — Pinned public reference; no external corpus result is claimed.
| Stage | Recorded boundary |
|---|
Engineering decisions — ledger of 4, as recorded. The signal edge marks the rejected alternative in each row.
| Ref | Decision — and why | Trade-off accepted | Rejected alternative |
|---|---|---|---|
| A | Compare decisions, not text The ceiling change is one number. The $150 refund is a new allow. | Requires structured policy parsing instead of universal text regexes across arbitrary YAML dialects. | Inspect raw git line diffs on policy YAML. |
| B | Keep the two channels separate A scenario corpus can miss a rule. A static check can be incomplete. Neither one gets to hide the other. | Outputs two independent diagnostic channels that reviewers must examine before waiving. | Collapse scenario replay and static checks into a single heuristic score. |
| C | Fail closed on an unknown change If a changed rule cannot be shown to be non-expanding, the public verdict is block. | Produces false-positive blocks when dynamic predicates exceed the bounded analyzer. | Downgrade unanalyzable rule changes to warnings. |
| D | Make the result reproducible Both YAML inputs and corpus fixtures are hashed into canonical digests in the report. | Rejects non-canonical or dynamically fetched policy references unless resolved to a pinned git commit. | Compare unpinned mutable branches without source digests. |
Revision table — evidence provenance, verbatim from the record
| Rev | Evidence | Result | Semantics |
|---|---|---|---|
| A | Authority transition This is one runnable reference example, not an external benchmark. | The public quickstart shows refund.create at $150 (15,000 minor units) move from deny to allow when the ceiling rises from $100 to $500 (10,000 → 50,000 minor units; 100 minor units = $1 USD). | REPRODUCIBLE Synthetic |
| B | External corpus Local reference tests are not independent validation. | No external corpus result is claimed. | RECORDED Not claimed |
Audience — AI Security Teams · AppSec · Agent Platform Engineers · Security Engineering · CI/CD and Release Engineering
| Artifact | https://github.com/TensorScholar/permitdiff |
|---|---|
| Pinned commit | 8997ff45d28212f5be90095fde3da48c8fdaea60 |
| Verification | make check |
Recorded output — bounded refund-ceiling expansion comparison
decision: review
observed: {'same': 2, 'expanded': 1, 'restricted': 0, 'unknown': 0}
findings: ['rule_scope_broadened:refund-allow']
reasons: ['authority_expansion']
PermitDiff reference comparison
baseline: baseline v0 digest=80c0a334ae89...
candidate: candidate v1 digest=6e93f3d9c299...
corpus: 3 scenarios digest=cb0a3af02493...
Summary:
privilege_expansions: 1
restrictions: 0
unknown_transitions: 0
new_allows: 1
approval_bypasses: 0
static_authority_expansions: 1
static_authority_unknowns: 0
Transitions:
[unchanged/note] corpus-000: refund.create amount=5000 unchanged (allow (rule refund-allow)); no review signal.
[expanded/high] corpus-001: refund.create amount=15000 deny (default) -> allow (rule refund-allow).
[unchanged/note] corpus-002: search.query amount=0 unchanged (deny (default)); no review signal.
Static findings:
[potential_expansion] rule_scope_broadened: Rule 'refund-allow': allow scope broadened (match relation: broader).
Unknown semantics fail closed. See examples/README.md for the full suite.Measurement contract — what would make the preferred answer fail?
EVALUATION METHOD
A permission change needs a review when the same scenario is denied before and allowed after.
Public reference quickstart: refund.create ceiling 10_000 → 50_000 minor units ($100 → $500 at 100 minor units = $1 USD), scenarios at $50 (5_000), $150 (15_000), and search.query at 0.
$150 refund
deny, then allowsearch.query
deny on both policiesStatic ceiling
widened allow bound, checked apart from the corpusPublic verdict
review · authority_expansionNot claimed
runtime authorization, proof, production IAM, external validationResearch program authority-change — as recorded
Status: Public reference published
Question: Can a permission change be shown to grant more authority before release, without treating an unresolved rule as safe?
Method: same scenarios on baseline and candidate · bounded static check · fail closed when a changed rule cannot be shown to be non-expanding
Observed: The public reference demonstrates a bounded authority-expansion example.
Boundary: No external corpus result is claimed.
NOTE 1 — OWNERSHIP.
Personal engineering project
Published under Apache-2.0 at github.com/TensorScholar/permitdiff (v0.1.0rc2+ with Git ref baseline resolution and Claude Code preapproval projection). Verified via make check; no external customer corpus result is claimed.
NOTE 2 — READING. Numbers on this page carry their boundary lines. Quoting a result without its boundary omits its scope.