While the current config design correctly uses api_key_env to store environment variable names (not actual keys), there's no runtime validation to catch accidental secret leakage. A user could unknowingly paste an actual API key into a template variable or config field.
Add a validation layer that detects potential secrets in config values and warns users before saving.
Acceptance Criteria
Notes
While the current config design correctly uses
api_key_envto store environment variable names (not actual keys), there's no runtime validation to catch accidental secret leakage. A user could unknowingly paste an actual API key into a template variable or config field.Add a validation layer that detects potential secrets in config values and warns users before saving.
Acceptance Criteria
ValidateConfig()function topkg/config/that scans all string values in the config for patterns that look like secrets:sk-prefix (OpenAI/Anthropic API keys)ghp_prefix (GitHub personal access tokens)gho_,ghu_,ghs_prefixes (GitHub OAuth/user/server tokens)xoxb-,xoxp-prefixes (Slack tokens)config.SaveConfig()-- warn the user before writing if potential secrets are detectedailloy customizeinteractive mode -- warn immediately when a suspicious value is enteredapi_key_envis never used to store actual key valuesNotes
ailloy customizeas a compiler for ai instructions and workflows #24pkg/config/config.go(addValidateConfigfunction)