Repository navigation
security(web): header-only API key; reject option-like package names with 400 - #108
Merged
Merged
Conversation
…-time API key check; remove dead code Co-Authored-By: dominicusin <dominicusin@yahoo.com>
…n-like package names with 400 Co-Authored-By: dominicusin <dominicusin@yahoo.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Documentation build overview
|
dominicusin
approved these changes
Oct 18, 2026
dominicusin
enabled auto-merge (squash)
October 21, 2026 22:06
|
Add Carrot credits or activate Agent usage billing to use Autofix |
The branch's own test test_api_key_in_query_string_is_rejected expects
401 for ?api_key=..., but require_api_key still fell back to
request.args.get("api_key"), so the query-string key was accepted and
every test job failed. Drop the query-string fallback so the secret can
no longer travel in URLs (access logs, browser history, referrers).
Verified: 958 passed, 6 skipped.
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
Follow-up to the audit (#107). Based on the #107 branch because it touches the same lines in
require_api_key; GitHub will retarget tomainonce #107 merges.require_api_keyreads the key only from theX-API-Keyheader. The?api_key=query parameter is no longer accepted: it ended up in proxy/server access logs. The API docs already stated that all endpoints require the header._check_name()is used byvalidate_maximize_payload(/api/v1/maximize,/api/v1/analyze,/api/v1/compare) andpropose_post(/api/v1/propose): names that start with-or contain whitespace return400 Invalid package name, instead of being silently treated as "not found" by the adapter guard from fix(security): reject option-like package names in adapters; constant-time API key check #107.CHANGELOG.md: new[Unreleased]→Securitysection.Checks
Link to Devin session: https://app.devin.ai/sessions/7a195999dfd146d48fbc98f4bab6707a
Open in Devin Desktop: https://app.devin.ai/desktop/session/7a195999dfd146d48fbc98f4bab6707a?variant=devin
Requested by: @dominicusin