How do you secure secrets and variables in GitLab CI projects?
IntermediateProductionGitHub Actions and GitLab CI in Production
Answer
Mark production variables protected and scope them to the production environment so only protected branches/tags can use them. Mask them, prefer ID-token based retrieval from Vault or cloud secret managers, restrict who has Maintainer access (they can read variable values), disable CI_DEBUG_TRACE in production projects (it prints secrets), and avoid echo $VAR or env in scripts. Audit events show variable changes.
More on GitHub Actions and GitLab CI in Production
How do you organise reusable workflows for an organisation on GitHub?IntermediateHow do you reduce GitHub Actions minutes cost on private repos?IntermediateHow do you secure self-hosted runners?AdvancedHow do you design the GitHub Actions OIDC trust policy for AWS safely?AdvancedHow do you handle approvals and deployments across environments in GitHub Actions?IntermediateHow do you handle required checks when workflows use path filters or matrices?Advanced