fix(seer): Add auth signing to grouping record delete-by-hash requests#110205
Merged
fix(seer): Add auth signing to grouping record delete-by-hash requests#110205
Conversation
call_seer_to_delete_these_hashes() was making unsigned POST requests to Seer's delete-by-hash endpoint, bypassing the auth middleware and generating "No auth header found" log noise. Use make_signed_seer_api_request() to add Rpcsignature auth headers, matching how all other Seer calls work. Co-Authored-By: Claude <noreply@anthropic.com>
…oded string Use type(e).__name__ for the reason in logs and metrics so that MaxRetryError and TimeoutError are correctly identified rather than all being labeled as ReadTimeoutError. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
ReadTimeoutError is a subclass of TimeoutError, so catching both is redundant. Match the pattern used in similar_issues.py. The import is retained for the other function in this module. Co-Authored-By: Claude <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.
call_seer_to_delete_these_hashes()was making unsigned POST requests directly viaseer_grouping_connection_pool.urlopen()to Seer's/v0/issues/similar-issues/grouping-record/delete-by-hashendpoint. This bypassed Seer'sauth_and_json_middleware, which logged"No auth header found for request to {url}"and let the request through without authentication (see HackerOne report).This switches to
make_signed_seer_api_request()which adds theAuthorization: Rpcsignature rpc0:{signature}header, matching how every other Seer call in the codebase works (e.g.,make_similar_issues_request()in the siblingsimilar_issues.pymodule).Also broadens exception handling to catch
TimeoutErrorandMaxRetryErrorin addition toReadTimeoutError, consistent with the patterns insimilar_issues.py.Note:
call_seer_to_delete_project_grouping_records()(GET-based delete) still needs a coordinated fix with the Seer side to convert from GET to POST before it can be signed — tracked by the existing TODO in the code.