Skip to content

Remove committed API key, require env at first use (#15)#24

Open
ojuschugh1 wants to merge 1 commit into
projnanda:mainfrom
ojuschugh1:fix/credential-handling
Open

Remove committed API key, require env at first use (#15)#24
ojuschugh1 wants to merge 1 commit into
projnanda:mainfrom
ojuschugh1:fix/credential-handling

Conversation

@ojuschugh1

Copy link
Copy Markdown

Closes #15.

The Smithery API key in agent_bridge.py was a real committed secret, not a placeholder. The "your key" Anthropic fallbacks in agent_bridge.py, mcp_utils.py, and nanda.py silently masked missing env vars and produced confusing 401s.

Dropped both. Anthropic client is now lazy-init so import still works without the env, but the first call raises with a clear pointer to .env.example. Also added .env.example and tightened .gitignore.

The Smithery key (bfcb8cec-...) has been public since it was first committed. You'll want to rotate it on the Smithery side too, since removing it from main doesn't invalidate the value in git history.

Tested locally: import without env works, first LLM call raises cleanly, with env set everything works as before.

The Smithery fallback in agent_bridge.py was a real committed
secret, not a placeholder. The "your key" Anthropic fallbacks
masked missing env. Drop both. Lazy-init the Anthropic client
so import still works without the env, but the first call
raises a clear error.

Adds .env.example and tightens .gitignore.

Closes projnanda#15
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.

🚨 HIGH: API Key Exposure in Framework Integration Examples

1 participant