Repository navigation
fix(auth): exact-path public routes + reserved project slugs (#329) - #343
Merged
Merged
Conversation
…ved project slugs Fixes #329 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolves RUSTSEC-2026-0285 (rustls TLS 1.3 handshake) and the devalue, source-map-js and undici advisories that fail the Security workflow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <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.
What
require_authnow matches public routes exactly (/health,/metrics,/api/0/config,/api/0/setup,/api/0/auth/login,/api/0/auth/logout) and the ingest route/api/{id}/envelope/by path segments.create_project/update_projectreject empty,/-containing and reserved slugs with 400.Why
Suffix/substring checks (
ends_with("/setup"),contains("/envelope/")) let a project with slugsetuporenvelopereach/api/0/projects/{slug}...without authentication (view/modify/delete). Fixes #329.Testing
is_public_path.cargo test -p trapfalldandcargo clippy -p trapfalld --all-targets -- -D warningspass (CI green on Check/Clippy/Test/Format/Build).Note: unmatched paths (e.g.
/api/0/projects/x/setup) fall to the SPA fallback and return the SPA, not API data; unchanged. Cargo/npm Audit failures are pre-existing on develop (new advisories), tracked separately.🤖 Generated with Claude Code