
The layers explained
Below is a concise breakdown of each layer, its role, and the GitHub feature that implements it.Layer 1 — Dependabot alerts
Dependabot alerts scan your dependency manifests and notify you when packages have known vulnerabilities, helping you prioritize remediation for third‑party code.
Layer 2 — Dependabot security updates
When a reachable vulnerability is found, Dependabot can open a pull request that upgrades the vulnerable package to a patched version. This automates remediation and reduces mean time to repair.
Layer 3 — Secret scanning
Secret scanning detects sensitive data (API keys, credentials) in your commits and alerts you so the secret can be revoked or rotated quickly — preventing accidental leaks.
Layer 4 — Push protection
Push protection integrates with secret scanning to block commits or pushes that would expose secrets (when configured). It acts as an automated gate to stop problems before they reach your history.
Deep code analysis — CodeQL
CodeQL performs deep static analysis of your repository to find logic errors, insecure patterns, and other issues that dependency scanners cannot detect because they focus on code you wrote rather than third‑party libraries. The critical insight: Dependabot protects against vulnerable dependencies (third‑party code), while CodeQL analyzes your own source code (developer-written logic). These are complementary protections.
- Dependabot only → misses vulnerable application logic in your code.
- CodeQL only → misses vulnerable third‑party libraries.
- Both together → much stronger, more complete coverage.
Billing and cost control for GHAS
GitHub Advanced Security can affect cost management for organizations. Understand how billing works so you can optimize spend without sacrificing coverage.
Key billing points to remember for the exam and for cost optimization:
- GitHub Advanced Security is free for public repositories.
- Billing is based on active committers in GHAS-enabled private repositories: any user who has made at least one commit to a GHAS-enabled private repository within the trailing 90 days counts toward billing.
- Commits to public repositories do not count toward GHAS billing.
- Archiving a GHAS-enabled private repository removes its committers from the billing count after 90 days — a measurable cost lever for cleanup and lifecycle management.
Quick study checklist (for exam and practice)
- Understand the different attack surfaces: third‑party dependencies vs. your own source code.
- Know which GHAS feature maps to which layer (Dependabot alerts, Dependabot updates, Secret scanning, Push protection, CodeQL).
- Remember GHAS billing rules for private repositories and the 90‑day archival effect.
- Practice configuring Dependabot, enabling secret scanning/push protection, and running CodeQL workflows.
Links and references
- GitHub Advanced Security overview: https://docs.github.com/en/code-security
- Dependabot documentation: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically
- Secret scanning and push protection: https://docs.github.com/en/code-security/secret-scanning
- CodeQL documentation: https://codeql.github.com/docs/