Skip to content

fix(seer): Add auth signing to grouping record delete-by-hash requests#110205

Merged
JoshFerge merged 3 commits intomasterfrom
jferg/fix/sign-seer-delete-hash-requests
Mar 9, 2026
Merged

fix(seer): Add auth signing to grouping record delete-by-hash requests#110205
JoshFerge merged 3 commits intomasterfrom
jferg/fix/sign-seer-delete-hash-requests

Conversation

@JoshFerge
Copy link
Member

call_seer_to_delete_these_hashes() was making unsigned POST requests directly via seer_grouping_connection_pool.urlopen() to Seer's /v0/issues/similar-issues/grouping-record/delete-by-hash endpoint. This bypassed Seer's auth_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 the Authorization: Rpcsignature rpc0:{signature} header, matching how every other Seer call in the codebase works (e.g., make_similar_issues_request() in the sibling similar_issues.py module).

Also broadens exception handling to catch TimeoutError and MaxRetryError in addition to ReadTimeoutError, consistent with the patterns in similar_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.

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>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 9, 2026
@JoshFerge JoshFerge marked this pull request as ready for review March 9, 2026 14:38
@JoshFerge JoshFerge requested a review from a team as a code owner March 9, 2026 14:38
@JoshFerge JoshFerge requested a review from a team March 9, 2026 14:38
…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>
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

@chromy chromy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@JoshFerge JoshFerge enabled auto-merge (squash) March 9, 2026 14:59
@JoshFerge JoshFerge merged commit cf77109 into master Mar 9, 2026
55 checks passed
@JoshFerge JoshFerge deleted the jferg/fix/sign-seer-delete-hash-requests branch March 9, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants