Microsoft DevOps Engineer Expert AZ-400 Practice Question

You are configuring a GitHub Actions workflow for a repository containing several Go-based microservices. The build job must run inside the golang:1.21-alpine container, specified using the container keyword, to maintain consistency with production images. When you add the CodeQL action to this job, the init step fails because the CodeQL CLI is incompatible with Alpine Linux. You must perform CodeQL analysis on pull requests, but the primary build artifact must still be generated from the alpine container. Which modification meets all requirements?

  • In the existing job, build the code, and then pass the compiled binaries as artifacts to a second job that runs the CodeQL analyze step.

  • Add CODEQL_RUN_IN_ALPINE=true to the job's environment variables to enable a compatibility mode for Alpine Linux.

  • In the existing job, add a step to install a glibc compatibility layer inside the Alpine container before the CodeQL init step runs.

  • Create a second job that runs on an ubuntu-latest runner. This job will check out the code and use the CodeQL action to initialize, build, and analyze the Go code.

Microsoft DevOps Engineer Expert AZ-400
Develop a security and compliance plan
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot