Conversation
Decide-only: Gate.DecideOnly and POST /v1/decide/{tool} rule on a call and
record it without forwarding or holding it. The artifact's outcome says the
gate did not act, and only toolcall.requested and toolcall.decided are
published. For callers that execute tools themselves (a benchmark harness)
and for measuring a policy in shadow before it enforces. Operator-only: an
agent that can ask what would pass can search the policy for values that
slip through.
Tool tags: tool_tags labels tools with classes, and a rule can name a tag
instead of a tool, so one rule governs every tool carrying it. New rule kind
"tool" fires on the action itself (e.g. every destructive tool escalates);
it takes no arg and needs a tool or a tag. Validation refuses tags on tools
missing from tool_scopes, rules on tags no tool carries, rules setting both
tool and tag, and unscoped tool rules.
Existing behaviour is unchanged; all existing tests pass. New tests: the
twelve calls through /v1/decide (same decisions, nothing forwarded, no hold,
chain verifies), the agent refused at /v1/decide, tag scoping, tag
validation, and a tool rule by name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ptdu2pZMVdE5x6XkwcUDjj
CVE-2026-84445 (HIGH, denial of service via malformed RPC requests) was published for grpc v1.83.1 after main's last security scan, so Trivy now fails for every service that links it. v1.83.2 has the fix. It is an indirect dependency in all fourteen modules that require it; bumping it raises golang.org/x/net to v0.58.0 and, in five modules, golang.org/x/text to v0.41.0 and golang.org/x/sys to v0.47.0, the minimums grpc v1.83.2 requires. Every module builds, vets and passes its tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ptdu2pZMVdE5x6XkwcUDjj
New rule kinds, each deterministic and failing closed when a value cannot be checked: - floor: numeric minimum (min). - denylist: denied values, compared without regard to case. - pattern: an RE2 expression the whole value must match. - domain: the host of an email address, URL or bare host name must be an allowed domain or a subdomain of one; parsed, so URL userinfo tricks read as the real host; several @ or a non-ASCII host fail closed. - max_items: at most max items in a list (a lone value counts as one). - compare: arg op match_arg must hold (lt, le, gt, ge on numbers; eq, ne on numbers or plain values). Lists and nesting: each: true applies a single-value rule to every element of a list (without it a list still fails closed, as before), and arg and match_arg may be paths, "payment.amount" or "items[*].amount"; a missing path or a value of the wrong shape fails closed like an absent argument. evaluate is split into argument resolution and a per-value checkValue; the existing kinds' checks and messages are unchanged and all existing tests pass. New tests cover each kind, lists, paths, compare and validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ptdu2pZMVdE5x6XkwcUDjj
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #64. Please review and merge #64 first. This branch is stacked on it, so until #64 merges this PR also shows #64's two commits. Only the last commit,
785de45, is new here.Extends
aex-toolgate's argument-value rules in the same style: declarative, deterministic, fail closed, one record per call. The existing kinds' checks and messages are unchanged, and all existing tests pass.New rule kinds
floormin)denylistdeniedvalues, compared without regard to caseNEW-ACCT-9911, nornew-acct-9911patternACME-ACCT-\d{3}domainallowedor a subdomain of onecfo@eu.corp.examplepasses;cfo@evilcorp.exampleandhttps://corp.example@evil.exampledon'tmax_itemsmaxitems in a list (a lone value counts as one)compareargopmatch_argmust hold:lt/le/gt/geon numbers,eq/neon numbers or plain valuesdomainparses the value rather than matching a suffix, so URL userinfo tricks resolve to the real host. Several@signs or a non-ASCII (homoglyph) host fail closed.Lists and nested arguments
each: trueapplies a single-value rule to every element of a list argument, and to a lone value as a list of one. Without it a list still fails closed, as today. Allowed on ceiling, floor, allowlist, denylist, suffix, prefix, pattern, domain and sensitive_field.argandmatch_argmay be paths.payment.amountreads a field of an object argument;items[*].amountreads the field of every element of a list, each of which is checked. An argument literally named with a dot is found by its exact name first. A path missing from the call, or running into a value of the wrong shape, fails closed like an absent argument. Lookup rules resolve paths too.How
Rule.evaluateis split into argument resolution (resolveArg: plain argument, path, or[*]path) and a per-valuecheckValue. The existing switch moved intocheckValueverbatim, changing only its return shape, so every existing kind decides and explains exactly as before.Validation
The policy is refused when:
floorhas nomin;denylisthas an empty list;patternis missing or doesn't compile;domainentry isn't a bare lower-case ASCII domain (e.g.@corp.example,Corp.example);max_itemshasmaxbelow 1;comparehas a badopor nomatch_arg, or uses[*]on either side;eachis set on a kind that doesn't check single values;a..b,a[*]b).Tests
values_test.gocovers:@, a homoglyph host, a URL without a host);eachover lists, including the unchanged behaviour without it;[*]paths, and an argument literally named with a dot;compareon flat and nested arguments;Everything passes under
-race(the pattern cache is shared across requests).🤖 Generated with Claude Code
https://claude.ai/code/session_01Ptdu2pZMVdE5x6XkwcUDjj