Implementing DevOps Solutions and Practices Using Cisco Platforms (DEVOPS) — Question 59

A DevOps engineer must build a Docker image to containerize an application. Then the image must be pushed to a repository on Docker Hub in a CI/CD pipeline using GitHub Actions.

Which approach securely encrypts the Docker Hub access token as an environment variable within the CI/CD pipeline?

Answer options

Correct answer: B

Explanation

The correct answer is B because GitHub encrypted secrets provide a secure way to store sensitive information like access tokens, ensuring they are not exposed in logs or the repository. Options A and C are less secure as they may allow exposure of the token, while option D is also insecure since Base64 encoding does not encrypt the data, making it easily decodable.