Seams for auditing: typed output observation and explicit table access - #183
Closed
UnknownJoe796 wants to merge 1 commit into
Closed
UnknownJoe796 wants to merge 1 commit into
UnknownJoe796 wants to merge 1 commit into
Conversation
Three changes to existing code that exist so an audit layer has somewhere to attach. Nothing fires them yet; the audit modules come later in the stack. - `TypedOutputInterceptor` observes a typed value after the handler produces it and before it is serialized. Firing before serialization is the point: the response body does not exist yet, so an observer that throws prevents the disclosure rather than reporting it after the fact. - `ModelInfo` splits audited from unaudited table access. `baseTable()` keeps skipping permissions but now routes through the existing `log` decorator, and the undecorated path becomes `dangerouslyDirectTable()` behind an opt-in `@UnauditedDatabaseAccess`. The goal is not to forbid the bypass but to make every instance greppable. - `ModelRestEndpoints` declares the fields it discloses. `log` already existed with an identity default, so with no audit layer installed this is behaviour-neutral. `dangerouslyDirectTable()` has a default implementation, so it is not a breaking change for existing `ModelInfo`s. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jybc9zdLT2sEfJUpErf2cd
Contributor
Author
|
Passes my review. |
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.
Stack: 1 of 16. Base:
version-5.3. Merge in order.Three changes to existing code that exist so an audit layer has somewhere to
attach. Nothing fires them yet; the audit modules come later in the stack.
TypedOutputInterceptorobserves a typed value after the handler producesit and before it is serialized. Firing before serialization is the point:
the response body does not exist yet, so an observer that throws prevents
the disclosure rather than reporting it after the fact.
ModelInfosplits audited from unaudited table access.baseTable()keepsskipping permissions but now routes through the existing
logdecorator,and the undecorated path becomes
dangerouslyDirectTable()behind anopt-in
@UnauditedDatabaseAccess. The goal is not to forbid the bypass butto make every instance greppable.
ModelRestEndpointsdeclares the fields it discloses.logalready existed with an identity default, so with no audit layerinstalled this is behaviour-neutral.
dangerouslyDirectTable()has a defaultimplementation, so it is not a breaking change for existing
ModelInfos.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jybc9zdLT2sEfJUpErf2cd