Skip to content

Remove unused OKX auth; always fetch X Layer source unauthenticated - #920

Merged
marktoda merged 1 commit into
mainfrom
claude/practical-hopper-7dbec7
Jul 7, 2026
Merged

Remove unused OKX auth; always fetch X Layer source unauthenticated#920
marktoda merged 1 commit into
mainfrom
claude/practical-hopper-7dbec7

Conversation

@Ponx

@Ponx Ponx commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

X Layer (OKX) hook submissions were failing source verification in CI (e.g. run 28876960754, issue #709). The Fetch source step aborted with:

OKX_ACCESS_KEY, OKX_SECRET_KEY, and OKX_PASSPHRASE are required for X Layer source fetches.

The OKX_* repo secrets are unset, so fetch_source.py raised before ever contacting OKX and the hook got labeled unverified.

Root cause

The OKX verify-contract-info endpoint is public — it returns verified source with no OK-ACCESS-* signature headers. You can hit it directly in a browser:

https://web3.okx.com/api/v5/xlayer/contract/verify-contract-info?chainShortName=xlayer&contractAddress=0x2e11d4f7bbb9af02a439fa5bedb8a4c7ce9540c0

Our code assumed OKX's signed-request scheme (correct for trading/account APIs) was needed here. It wasn't — and the required secrets were never populated anyway, making the automated path impossible to satisfy.

Fix

  • Delete the okx_curl_args signing helper and always do a plain unauthenticated curl, matching browser behavior — for both the primary and proxy-implementation fetches.
  • Remove the now-unused OKX_ACCESS_KEY / OKX_SECRET_KEY / OKX_PASSPHRASE env vars from the analyze-hook and review-hook workflows.

Verification

Ran the updated script against the live endpoint:

$ python3 scripts/fetch_source.py xlayer 0x2e11d4f7bbb9af02a439fa5bedb8a4c7ce9540c0
ContractName: KickItHook
Verified: True
Source fetched and parsed: KickItHook (verified=True, proxy=False)

🤖 Generated with Claude Code

The OKX verify-contract-info endpoint is public and returns verified
source without any OK-ACCESS-* signature headers. Our code required
OKX_ACCESS_KEY/SECRET_KEY/PASSPHRASE and hard-failed before making the
request when they were unset (which they always were), so X Layer hook
submissions were incorrectly labeled unverified.

Drop the signing path entirely and always do a plain curl, matching what
a browser does. Also remove the now-unused OKX_* secret env vars from the
analyze-hook and review-hook workflows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment Jul 7, 2026 3:21pm

Request Review

@marktoda
marktoda merged commit d9f85ca into main Jul 7, 2026
8 checks passed
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.

2 participants