What is the best way to secure secrets in a CI/CD pipeline?
Short answer: Use Azure Key Vault to store secrets, connection strings, and certificates. Configure managed identity for pipeline tasks. Avoid storing secrets in code or pipeline variables directly. Example – Azure DevOps pipeline: task: AzureKeyVault@2 inputs: azureSubscription: 'MyServiceConnection' KeyVaultName: 'MyKeyVault' SecretsFilter: '*'
Real-world example (ShopNest)
Connection strings and payment keys live in Key Vault—not in source control or plain appsettings on disk.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png