Intermediate LevelGit & GitHub
How do GitHub Actions Secrets manage API keys and deployment credentials securely?
❓ Interview Prompt: Explain GitHub Secrets encryption (Libsodium), organization vs repository secrets, log masking, and environment secret protection.
GitHub Secrets encrypt sensitive credentials stored at repository or environment levels using Sodium public-key cryptography, masking secret values with asterisks in Actions logs.
Code Implementation Example
yaml
- name: Deploy
run: ./deploy.sh
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}💡Injecting encrypted GitHub Secrets into workflow environment variables.
🎯 Interview Key Takeaway
Store sensitive deployment keys in encrypted GitHub Secrets and reference them in YAML via ${{ secrets.KEY }}.
#GitHub Secrets#Security#CI/CD#Intermediate
Back to all Git & GitHub Questions→