Skip to content

πŸ›‘οΈ Sentinel: [MEDIUM] Add input length limits to API requests#47

Open
n24q02m wants to merge 1 commit into
mainfrom
sentinel/fix-dos-unbounded-inputs-12817441361953420958
Open

πŸ›‘οΈ Sentinel: [MEDIUM] Add input length limits to API requests#47
n24q02m wants to merge 1 commit into
mainfrom
sentinel/fix-dos-unbounded-inputs-12817441361953420958

Conversation

@n24q02m

@n24q02m n24q02m commented Jul 5, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: MEDIUM
πŸ’‘ Vulnerability: Unbounded input fields in Pydantic request models (AskRequest, DistillRequest, GraphIngestRequest). Default Pydantic strings and lists allow indefinitely large payloads, posing a risk of memory exhaustion.
🎯 Impact: Malicious actors could send extremely large strings or nested lists, causing Denial of Service (DoS) by exhausting server memory or parsing resources.
πŸ”§ Fix: Implemented length boundaries. Strings are capped at 1,000 characters using typing.Annotated[str, Field(max_length=1000)]. List sizes are bounded at 10,000 for tuples and 1,000 for simple string elements.
βœ… Verification: Ran uv run pytest to ensure legitimate requests are not rejected. Passed formatting (uv run ruff format .) and lint checks (uv run ruff check .).


PR created automatically by Jules for task 12817441361953420958 started by @n24q02m

Add strict length limits to Pydantic request models (AskRequest, DistillRequest, GraphIngestRequest) in src/tacet/serve/server.py to prevent Denial of Service (DoS) attacks caused by unbounded payloads.

Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant