GH-500: Cheatsheet โ
โ Overview ยท โ Exam Guide
Exam Day Reference
Review this page 5 minutes before the exam.
GHAS Feature Lookup โ
| Feature | What it does | Reactive or Proactive? |
|---|---|---|
| Secret scanning | Detects secrets already in repo history | Reactive (alerts after commit) |
| Push protection | Blocks commits containing secrets | Proactive (blocks before push) |
| Dependabot alerts | Notifies of vulnerable dependencies | Reactive (alerts on CVE match) |
| Dependabot security updates | Auto-opens PR to fix vulnerable dep | Automated remediation |
| Dependabot version updates | Scheduled PRs to keep deps current | Scheduled (not CVE-driven) |
| Dependency review | Blocks PRs introducing vulnerable deps | Proactive (blocks at PR merge) |
| Code scanning (CodeQL) | SAST โ finds vulnerabilities in code | Reactive (alerts on push/PR) |
| SARIF upload | Import third-party SAST results | Integration |
GHAS Plan Requirements โ
| Feature | Free/Pro/Team | GHEC/GHES (no GHAS) | GHEC/GHES + GHAS |
|---|---|---|---|
| Secret scanning (public repo) | โ | โ | โ |
| Secret scanning (private repo) | โ | โ | โ |
| Push protection (private repo) | โ | โ | โ |
| Dependabot alerts | โ | โ | โ |
| Code scanning (public repo) | โ | โ | โ |
| Code scanning (private repo) | โ | โ | โ |
| Dependency review (private repo) | โ | โ | โ |
CVSS Severity Levels โ
| CVSS Score | Severity |
|---|---|
| 9.0โ10.0 | Critical |
| 7.0โ8.9 | High |
| 4.0โ6.9 | Medium |
| 0.1โ3.9 | Low |
CodeQL Setup Comparison โ
| Default Setup | Advanced Setup | |
|---|---|---|
| YAML needed | No | Yes (.github/workflows/codeql.yml) |
| Language detection | Automatic | Manual |
| Query suite | security-extended | Configurable |
| Best for | Quick start | Custom queries, monorepos |
Dependabot Version Update Key Fields (dependabot.yml) โ
version: 2
updates:
- package-ecosystem: "npm" # npm, pip, maven, cargo, nuget, bundler, gomod
directory: "/"
schedule:
interval: "weekly" # daily, weekly, monthly
open-pull-requests-limit: 5 # default: 5
ignore:
- dependency-name: "lodash"Quick Decision Rules โ
Secret already committed to main? โ Secret scanning alert โ revoke at provider first, then remove from history
Block a secret before commit? โ Push protection (most proactive option)
Vulnerable npm dependency in production? โ Dependabot alert โ enable security updates for auto-PR fix
Schedule weekly dep updates across all ecosystems? โ Dependabot version updates via .github/dependabot.yml
PR adds a library with CVE-2024-XXXX? โ Dependency review action (blocks merge automatically)
SQL injection in application code? โ Code scanning (CodeQL) alert
Third-party SAST tool results in GitHub? โ Upload SARIF file via github/codeql-action/upload-sarif
Block PR merge if code has vulnerability? โ Code scanning + branch protection (require CodeQL check)
Full dep inventory for compliance? โ Dependency graph โ Export SBOM (SPDX format)
Org-wide security posture view? โ Security Overview (org or enterprise level)
Terminology Check โ
- SAST: Static Application Security Testing โ analyze source code without executing it
- DAST: Dynamic Application Security Testing โ test a running application (not covered by GHAS)
- CVE: Common Vulnerabilities and Exposures โ standard vulnerability identifier (CVE-YYYY-NNNNN)
- CVSS: Common Vulnerability Scoring System โ standardized severity score (0โ10)
- CWE: Common Weakness Enumeration โ categories of code weaknesses (e.g., CWE-89 SQL Injection)
- SARIF: Static Analysis Results Interchange Format โ JSON standard for SAST results exchange
- SBOM: Software Bill of Materials โ complete inventory of a project's dependencies
- SPDX: Software Package Data Exchange โ open standard format for SBOMs (used by GitHub's export)
- Advisory Database: GitHub's database of known vulnerabilities (CVEs + GitHub-curated)
- Push protection: Blocks secrets from being committed by rejecting the
git push - CodeQL: GitHub's semantic code analysis engine for finding security vulnerabilities
- Dependency graph: GitHub's map of all direct and transitive dependencies in a repository
- Security overview: Org/enterprise dashboard showing GHAS alert status across all repositories