Skip to content

security: remove hardcoded Uniswap API key from public plugin doc#83

Open
memosr wants to merge 1 commit into
base:masterfrom
memosr:security/remove-hardcoded-uniswap-api-key
Open

security: remove hardcoded Uniswap API key from public plugin doc#83
memosr wants to merge 1 commit into
base:masterfrom
memosr:security/remove-hardcoded-uniswap-api-key

Conversation

@memosr

@memosr memosr commented Jun 6, 2026

Copy link
Copy Markdown

Summary

skills/base-mcp/plugins/uniswap.md line 28 contains a live x-api-key value committed to the public repository:
"x-api-key": "NeoYO3V50_koJAipDEalYWbMO1XMaFPAQmpOm6_Npo0"
This is a real credential anyone who clones the repo can extract.

Why this matters

Immediate risk: the key can be abused by anyone, which leads to rate-limiting or revocation. Once that happens, every user copying this plugin example as a starting point sees auth failures with no indication that the cause is a shared-and-burned credential.

Long-term risk: this file is positioned as a reference plugin. Anyone authoring a new Base MCP plugin uses it as a template. Shipping a hardcoded secret in the reference teaches plugin authors that embedding raw credentials in skill files is the expected pattern.

The fix

- "x-api-key": "NeoYO3V50_koJAipDEalYWbMO1XMaFPAQmpOm6_Npo0"
+ "x-api-key": "<YOUR_UNISWAP_API_KEY>"

The placeholder format <YOUR_*> matches the existing convention used elsewhere in the same file (e.g., <address>, <base units>).

Also added a one-line note under the ## Auth Headers section:

Obtain a Uniswap Trade API key from https://hub.uniswap.org/ — never commit your key to version control.

Follow-up recommendation

The leaked key should be rotated out of band by whoever originally issued it, independent of this PR. Removing it from the source tree alone doesn't invalidate the key; only the issuer can do that.

Verification

  • ✅ One file modified: skills/base-mcp/plugins/uniswap.md
  • ✅ Placeholder uses existing <*> convention in the file
  • ✅ Auth note points to the official Uniswap developer portal
  • ✅ No other content touched

skills/base-mcp/plugins/uniswap.md:28 contained a live x-api-key value
committed to the public repo. Anyone who clones can extract it; once
abused, the key gets rate-limited or revoked, silently breaking the
plugin for every legitimate user copying this example.

It also normalizes embedding raw secrets in skill files, which is the
exact opposite of what plugin authors should learn from a reference
implementation.

Replaced with <YOUR_UNISWAP_API_KEY> placeholder (matching the <*>
convention already used elsewhere in the same file) and added a one-line
note under the auth section pointing to https://hub.uniswap.org/ with a
reminder not to commit credentials.

The shared key in the public repo should also be rotated out of band by
whoever issued it.
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

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