Skip to content

fix(sapi): read the SAPI key from CROWDSEC_SAPI_KEY only - #30

Open
sabban wants to merge 2 commits into
mainfrom
fix/sapi-key-env-only
Open

sabban wants to merge 2 commits into
mainfrom
fix/sapi-key-env-only

Conversation

@sabban

@sabban sabban commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Addresses the directory review's credentials findings.

  • crowdsec-service-api no longer reads ~/.config/crowdsec/sapi_key or tells users to write it; the key comes from CROWDSEC_SAPI_KEY only.
  • If unset, the skill tells the user to export it and restart, and never asks for it in chat.

Why not userConfig: per the manifest reference, a sensitive option is not substituted into skill content and CLAUDE_PLUGIN_OPTION_* is not exported to Bash-tool commands, so a skill can't use it. A non-sensitive option would store the key in plaintext in settings.json.

🤖 Generated with Claude Code

Drop the ~/.config/crowdsec/sapi_key fallback and the recipe that writes it.
The skill no longer reads credential files from the user's machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@buixor

buixor commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

check:

  • how it would run on mac
  • what would be the effort to support keyrings, pass, 1password etc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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