L16. Automated Security Scanning: GitHub Advanced Security, Defender for Cloud DevOps & Dependabot
Course outlineLesson 16 of 18
CodeQL finds vulnerability patterns through data-flow modeling, push protection can block supported secret patterns during a push, and Defender for Cloud DevOps Security correlates code risk with the cloud resource it ships to.
What Is Automated Security Scanning?
Automated security scanning in a pipeline typically spans four distinct categories, each catching a different class of risk:
| Category | Purpose | Tools |
|---|---|---|
| Dependency scanning | Identify known-vulnerable open-source libraries | Dependabot, Snyk |
| Code/SAST scanning | Find vulnerability patterns through code analysis | CodeQL, Checkmarx |
| Secret scanning | Detect exposed API keys, tokens, credentials | GitHub secret scanning |
| Licensing scanning | Flag incompatible or restricted-use licenses | FOSSA, BlackDuck |
GitHub Advanced Security (GHAS)
GitHub security features include code scanning and secret protection. Feature availability depends on repository visibility and licensing; Dependabot alerts and updates are separate dependency features. CodeQL is a semantic code-scanning engine that models data flow to find vulnerability patterns, going far beyond simple text or regex matching. It understands how data flows through your code and detects subtle patterns like unsafe SQL construction even when the vulnerable code and input source are far apart. Secret scanning detects patterns matching known credential formats (AWS keys, GitHub tokens, private keys). With push protection enabled, GitHub can block a push containing a supported secret pattern. The secret may already exist in local commits; push protection does not erase those commits. Coverage has limits, and permitted bypasses can allow a push. If a real credential was exposed, revoke or rotate it rather than treating a blocked push as complete remediation. Dependabot flags known-vulnerable dependencies and can automatically open pull requests that bump a vulnerable dependency to the minimum available version that resolves the advisory, where supported, giving your team a ready-made fix rather than just an alert.
GitHub Advanced Security for Azure DevOps
GitHub Advanced Security for Azure DevOps (GHAzDO) provides CodeQL code scanning, secret scanning with push protection, and dependency vulnerability scanning for Azure Repos Git in Azure DevOps Services. It is offered as GitHub Code Security and GitHub Secret Protection for Azure DevOps. Dependency scanning alerts are not the same feature as automatic Dependabot pull requests on GitHub.Defender for Cloud DevOps Security
Microsoft Defender for Cloud DevOps Security connects GitHub, Azure DevOps, and GitLab repositories to Azure's Defender for Cloud. This creates a unified security posture view spanning source code and cloud infrastructure. Connected repository findings are surfaced centrally; code-to-cloud context depends on supported integrations and available mapping, rather than appearing for every repository automatically.Integrating GitHub Advanced Security with Defender for Cloud allows CodeQL findings to flow directly into Defender for Cloud's unified recommendations, supporting central prioritization while developers still review and fix findings in their repository workflow.
Container Scanning and Dependabot Updates
Container image scanning checks supported image layers and packages for known vulnerabilities. CodeQL analyzes application source code, including supported applications deployed in containers; it does not replace image or operating-system package scanning. Dependabot alerts flag a known vulnerability. When enabled and a supported update is possible, Dependabot security updates open a pull request proposing a patched dependency version. Review and test the change before merging; a generated update is not proof of compatibility.
The Scanning Mindset
Automated security scanning works best when you treat scanning results as part of your definition of done, not as an optional extra step. Tools can flag issues, but humans must decide whether to fix, suppress, or accept the risk.
References
- Microsoft Learn: current AZ-400 study guide
- Microsoft Learn: Advanced Security features for Azure DevOps
- GitHub: push protection behavior
- GitHub: Dependabot security updates
- GitHub: CodeQL analysis with containerized builds
- Microsoft Learn: Defender for Cloud DevOps security
Continue Learning
Practice artifact trust with image signing.
- ✓Automated security scanning in a pipeline generally spans four categories: dependency scanning, code/SAST scanning, secret scanning, and license scanning, each catching a different class of risk
- ✓CodeQL (part of GitHub Advanced Security) is a semantic code-scanning engine that models data flow to find vulnerability patterns, going beyond simple text/pattern matching
- ✓GitHub secret scanning with push protection can block a commit containing a detected secret pattern before it is even pushed, rather than only alerting after the fact
- ✓Microsoft Defender for Cloud DevOps Security connects GitHub, Azure DevOps, and GitLab to give a unified security posture view spanning source code and cloud resources, and can surface GitHub Advanced Security findings inside its own recommendations
- ✓Dependabot alerts passively flag a known-vulnerable dependency, while Dependabot security updates go further by automatically opening a pull request that bumps the dependency to the minimum available version that resolves the advisory, where supported
1. A developer pushes a credential matching a supported secret pattern to a GitHub repository with push protection enabled. What can push protection do?
2. A security team wants one place to see both a vulnerable open-source dependency flagged in a GitHub repository and the Azure resource it's actually deployed to, correlating code-level and cloud-level risk. What service is designed for this?
3. What is the difference between a Dependabot alert and a Dependabot security update for the same vulnerable dependency?