What is the BEST practice for secrets in applications?
Answer
Secure environment variables and secret management
Explanation
The best practice for managing sensitive information like API keys and other secrets in applications is to use secure environment variables and dedicated secret management systems (e.g., AWS Secrets Manager, Google Secret Manager, HashiCorp Vault). This approach ensures that secrets are not committed to version control, are not hardcoded (A), and can be rotated securely. Hardcoding (A) and storing in public GitHub (C) are major security vulnerabilities. Embedding secrets directly in prompts (D) can lead to them being logged or exposed during model interactions, which is also a security risk.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
Why are retries important in API workflows?
View question →
Which response format is BEST for machine readability?
View question →
What is tool use primarily designed for?
View question →
What should developers monitor in production AI systems?
View question →
Which API design improves reliability?
View question →
What is a common reason for API rate limits?
View question →