Skip to content

fix(bfl-api): prevent API key echoing and chat credential requests - #979

Open
Laihu08 wants to merge 1 commit into
OpenMontageInc:mainfrom
Laihu08:fix/964-bfl-api-asks-for-the-api-key-in-chat-and-echoes-it-to-output
Open

Laihu08 wants to merge 1 commit into
OpenMontageInc:mainfrom
Laihu08:fix/964-bfl-api-asks-for-the-api-key-in-chat-and-echoes-it-to-output

Conversation

@Laihu08

@Laihu08 Laihu08 commented Nov 23, 2026

Copy link
Copy Markdown

Summary

Fixes security issue in bfl-api skill and api-key-setup reference docs where BFL_API_KEY was printed to stdout using echo $BFL_API_KEY and agents were instructed to ask users for raw API keys in chat.

Related issue

Fixes #964

Changes

  • Replaced raw echo $BFL_API_KEY in .agents/skills/bfl-api/SKILL.md and .claude/skills/bfl-api/SKILL.md with safe non-echo presence check [ -z "$BFL_API_KEY" ] && echo "Error: BFL_API_KEY not set" || echo "OK: Key configured".
  • Updated .agents/skills/bfl-api/references/api-key-setup.md and .claude/skills/bfl-api/references/api-key-setup.md to instruct agents to direct users to update .env directly rather than asking for raw keys in chat.
  • Added contract test test_bfl_api_skill_no_secret_echoing_or_chat_credentials in tests/contracts/test_agent_instruction_integrity.py.

Testing

  • pytest tests/contracts/test_agent_instruction_integrity.py tests/contracts/test_agent_skill_pointers.py: 242 passed in 1.93s.
  • pytest tests/contracts/test_agent_instruction_integrity.py: 3 passed in 0.01s (verified contract assertions).

Checklist

  • The change is focused on a single logical concern.
  • I ran the relevant tests locally (make test-contracts / make test) where applicable.
  • I updated docs/README if behavior or usage changed.
  • No unrelated files (build artifacts, local config) are included in the diff.

AI assistance: this change was prepared and reviewed with Gemini (Google Vertex AI) and tested as described above.

Update bfl-api skill and api-key-setup documentation to check BFL_API_KEY presence safely without echoing the key value. Direct users to update .env directly rather than requesting raw API keys in chat.

Assisted-by: Gemini (Google Vertex AI)
@Laihu08
Laihu08 requested a review from calesthio as a code owner November 23, 2026 13:55
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.

bfl-api asks for the API key in chat and echoes it to output

1 participant