Skip to content

fix(security): load Infura key from env - #99

Open
derrix060 wants to merge 1 commit into
mainfrom
fix/remove-infura-key
Open

derrix060 wants to merge 1 commit into
mainfrom
fix/remove-infura-key

Conversation

@derrix060

Copy link
Copy Markdown
Member

I noticed that a live Infura key is hardcoded in 5 lines under app/exp001 and app/starkweb-client, and a scan on 2026-09-28 confirmed it still answers RPC calls. The repo is public, so anyone can burn the owner's quota.

The fix is to read it from INFURA_API_KEY; unset, Infura returns 401 so it fails loudly. The key stays in git history, so WiseMrMusa still has to rotate it in the Infura dashboard.

A live Infura project key (Starknet mainnet and sepolia endpoints)
was hardcoded in 5 lines across app/exp001/actions.ts,
app/exp001/index.ts (2 lines, one commented), app/exp001/multicall.ts
and app/starkweb-client/src/index.ts. A security scan on 2026-09-28
confirmed it still answers RPC calls, and the repo is public, so
anyone can use it on the owner's quota.

The URLs now read the key from the INFURA_API_KEY env var. If it is
unset the URL ends in /v3/undefined and Infura returns 401, so it
fails loudly instead of silently.

The key is still in git history, so this does not revoke it. The key
owner (WiseMrMusa) has to rotate it in the Infura dashboard. History
rewrite is not done here.

Claude-Session: https://claude.ai/code/session_01N9kjTzpfMHvVNLhn8TMxvk
Copilot AI balanced review requested due to automatic review settings October 9, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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