Skill 4.3.5
Automate container scanning, including scanning container images and configuring an action to run CodeQL analysis in a container
Key Concepts
Images are scanned in the pipeline with tools such as Trivy before they are pushed, and Defender for Containers scans images in registries. A pipeline can upload SARIF results to appear as code scanning alerts.
CodeQL can run in a container by setting container: on the job in a workflow, which is useful when the build needs a specific toolchain. The image must include what CodeQL needs, such as Git and the build tools.