BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDesigning and Implementing Microsoft DevOps Solutions (AZ-400)Automating container scanning
Lesson277 words

Automating container scanning

Automate container scanning

A container image bundles your application and an operating system userland. Both carry vulnerabilities, and they age differently: your code changes when you change it, the base image accumulates CVEs on someone else's schedule.

Two things to scan

TargetFinds
Base image and OS packagesCVEs in the distribution layers you inherited
Application code insideVulnerable patterns — CodeQL

Where scanning goes in the pipeline

Loading Diagram...
Figure 1 — Mermaid diagram

Scan before push so a vulnerable image never enters the registry, and scan in the registry continuously so an image that was clean at build time raises an alert when a new CVE lands. Both are needed for the same reason a quiet repository still needs Dependabot alerts: the code stopped changing, the threat landscape did not.

CodeQL in a container

Running CodeQL analysis inside a container is a documented objective, and it needs advanced setup — the generated workflow file is where you specify the container and the build. Default setup cannot express it.

The typical reason is a compiled language whose build environment lives in the container: CodeQL must observe the real build to analyse it, so the analysis has to run where that build runs.

Rebuilding is the fix

Most base-image findings are resolved by rebuilding on a patched base rather than by changing your code — which makes an automated periodic rebuild a security control, not merely hygiene.

Primary sources

  • https://docs.github.com/en/code-security/code-scanning
  • https://learn.microsoft.com/en-us/azure/container-registry/scan-images-defender
All Designing and Implementing Microsoft DevOps Solutions (AZ-400) Study Resources

Related Notes

  • Agent and runner infrastructure421 words
  • Agent and runner infrastructure — quick notes150 words
  • Alerting on pipeline events255 words
  • Alerting on pipeline events — quick notes94 words
  • Analyzing usage and application performance241 words
  • Analyzing usage and application performance — quick notes73 words
  • Appropriate access levels217 words
  • Appropriate access levels — quick notes85 words
  • Automating container scanning — quick notes96 words
  • Automating documentation from Git history191 words
  • Automating documentation from Git history — quick notes55 words
  • AZ-400 — exam map — roadmap403 words

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Designing and Implementing Microsoft DevOps Solutions (AZ-400) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, left to right. Build image connects to Scan image<br/>before push. S connects to Push to registry. P connects to Registry scanning<br/>continuous, on new CVEs. R connects to Deploy gate.