docs(security): design proposal for eliminating dangerously_allow#146
Open
dkaygithub wants to merge 1 commit into
Open
docs(security): design proposal for eliminating dangerously_allow#146dkaygithub wants to merge 1 commit into
dkaygithub wants to merge 1 commit into
Conversation
Categorizes the 23 current bypasses by why they bypass: aggregate stats, write-only acks, action-dispatched multi-shapes, kiosk-scope gaps, self-data shortcuts, stale-self-context, and dev-only fixtures. Proposes a discriminated TransformSpec on RouteSpec replacing the single boolean bypass with ~9 narrow primitives, all hosted in src/security/transformers/ under the existing CODEOWNERS gate. Includes a 6-phase migration plan ending with removal of the dangerously_allow_all_data_access field entirely. Not implemented yet — this is the architectural plan to iterate on before writing the framework changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Design-only PR. Proposes an architectural strategy for driving
dangerously_allow_all_data_accessto zero across the 23 routes that currently bypass the field-level stripper.The doc lives at
docs/DANGEROUSLY-ALLOW-ELIMINATION.mdand contains:TransformSpeconRouteSpecreplacing the boolean bypass with 9 narrow transformer primitives (ack,aggregate,processMeta,selfScalars,computedField,actionDispatch,kioskScope,withFreshContext,derivedFromInput/devOnly)dangerously_allow_all_data_accessfield and a CI lint rule that forbids the nameThe transformer kinds live in
src/security/transformers/— already under CODEOWNERS, so adding a transformer requires maintainer review but using one from a route handler is a normal PR.What this PR is and isn't
Implementation would follow as separate PRs per phase if the design is accepted.
Test plan
src/security/registry.tsmatches their mental modelTransformSpecplumbing)🤖 Generated with Claude Code