QA
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→

More Git & GitHub Interview Questions

Beginner LevelGit & GitHub

Compare git rebase versus git merge and explain how git bisect finds regressions.

Beginner LevelGit & GitHub

What is the difference between git init and git clone?

Beginner LevelGit & GitHub

What are the Three Trees in Git (Working Directory, Staging Area / Index, Commit History)?