Lab: GHAS scans and remediation
Outcome
Check GHAS eligibility in GitHub and Azure DevOps, generate safe code/dependency/container findings, triage ownership, remediate or document a time-bound exception, and observe the source-to-Defender path where licensed.
Do
- Record licensing, repository type, and feature prerequisites. Enable supported secret, dependency, and code scanning in a disposable GitHub repo and a supported Azure Repos code Git repository; do not claim Azure DevOps Server support where the current product excludes it.
- Add a harmless CodeQL-detectable training pattern or supported sample, run CodeQL, inspect SARIF/finding location, fix it, and verify closure. Build a disposable container image, scan it, set a severity gate, then correct the vulnerable package/base image or record a dated exception owner.
- Trigger a safe Dependabot alert/update PR, run tests, merge only after review, and verify the alert state. If the training tenant supports it, connect GHAS/DevOps Security to Defender for Cloud and trace the finding/recommendation without widening connector scope.
Verify
Capture eligibility, enabled features, findings, scan/gate output, remediation or exception, update PR/test, and Defender correlation when available. You should now understand: CodeQL analyzes code, dependency scanning analyzes components, container scanning analyzes images, and a finding requires ownership and a verified response.
Break and fix
- Enable an unavailable GHAS feature; diagnose licensing/platform/repository prerequisites rather than bypassing controls.
- Break CodeQL/container scan configuration or upload wrong SARIF; inspect workflow/pipeline logs, correct configuration, and rerun.
- Leave a Dependabot PR untested or exception unowned; add test evidence and expiration/owner before approval.
Scenario practice
- Configure: Select scans, gate threshold, ownership, exception expiry, and Defender connection scope.
- Diagnose: A code/container/dependency alert is missing or gate passes unexpectedly. Inspect feature enablement, workflow, image/tag, SARIF, severity filter, and repository eligibility.
- Distinguish: Contrast GHAS GitHub, GHAzDO, Defender DevOps Security, CodeQL, Dependabot, secret scanning, and container scanning.
Clean up
Delete test findings/images/repos/connectors or restore defaults; remove any temporary exception and test credentials.
Sources and re-audit
- Configure GHAS for Azure DevOps, checked 2026-08-22.
- Defender DevOps recommendations, checked 2026-08-22.
Re-audit when GHAS support, scanner configuration, or Defender integration changes.
Related
github-advanced-security · static-analysis · dependabot-alerts · secret-scanning · All labs