Marcel Lupo

Best Practices for Using GitHub Secrets

Stop storing long-lived credentials as GitHub secrets. Use OIDC and Azure Key Vault to build a truly passwordless and more secure CI/CD pipeline.

Best Practices for Using GitHub Secrets
#1about 2 minutes

Understanding the fundamentals of GitHub Secrets

GitHub Secrets provide an encrypted way to store sensitive data like API keys within repositories for use in CI/CD workflows.

#2about 6 minutes

Managing secrets at different scopes in the UI

Secrets can be managed at the repository, environment, or organization level through the UI, but repository-level secrets become difficult to rotate at scale.

#3about 5 minutes

Consuming secrets in workflows and avoiding common pitfalls

Reference secrets in GitHub Actions using the `secrets` context, but be aware of pitfalls like hard-coding, commit history exposure, and improper access control.

#4about 5 minutes

Integrating GitHub with Azure Key Vault for centralization

Use Azure Key Vault as a centralized secret store to manage secrets outside of GitHub, improving scalability and separating access controls.

#5about 7 minutes

Configuring passwordless authentication using OpenID Connect

Set up a federated identity in Azure Entra ID with OpenID Connect to allow GitHub Actions to authenticate to Azure without long-lived secrets.

#6about 7 minutes

Fetching Azure Key Vault secrets in a GitHub workflow

Use the `azure/login` action with OIDC to authenticate, then use Azure CLI within a workflow to retrieve secrets from Key Vault for subsequent steps.

#7about 4 minutes

Key benefits of the Azure Key Vault integration

Integrating with Azure Key Vault provides centralized management, granular RBAC, secret versioning and history, and enhanced auditing capabilities.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.