Master the GH-SEC

An interactive study guide built on 7 memory techniques to help you master GitHub Advanced Security -shift-left security for modern DevSecOps teams.

Secret Scanning 10-15%Code Scanning 15-20%Dependabot 10-15%Security Best Practices 15-20%GitHub Security Features 25-30%
What it covers

Secret scanning (push protection, custom patterns, partner programs), code scanning (CodeQL, SARIF, third-party tools), Dependabot (alerts, updates, security updates, grouped updates), dependency review, security advisories, security policies, supply chain security, and SBOM.

Ideal for

Security engineers, DevSecOps practitioners, and developers implementing shift-left security with GitHub.

Aspire to this if

You're a developer wanting to embed security into your CI/CD pipelines, or a security engineer looking to automate vulnerability detection across your organisation's repositories.

The Map

Tap any component to see what you need to know for the exam.

📦 RepositoryCode & Config🔑 Secret ScanningCredential Detection🔍 Code ScanningStatic Analysis🧬 CodeQLSemantic Queries🤖 DependabotDependency Management📋 Dependency ReviewPR Gate📢 Security AdvisoriesDisclosure & Coordination🔗 Supply Chain SecuritySBOM & Provenance📊 Security OverviewOrganisation Dashboard
📦 Repository
Code & Config
🔑 Secret Scanning
Credential Detection
🔍 Code Scanning
Static Analysis
🧬 CodeQL
Semantic Queries
🤖 Dependabot
Dependency Management
📋 Dependency Review
PR Gate
📢 Security Advisories
Disclosure & Coordination
🔗 Supply Chain Security
SBOM & Provenance
📊 Security Overview
Organisation Dashboard

The Story

Follow the narrative to build a mental model of how everything connects.

📦

The Repository Fortress

Every secure software journey begins at the repository -the fortress that houses your code. Inside, SECURITY.md declares how vulnerabilities should be reported, CODEOWNERS guards sensitive paths, and branch protection rules stand as sentinels ensuring no code enters without proper review and passing checks.

Exam IntelSECURITY.md = vulnerability disclosure policy. CODEOWNERS = review enforcement for sensitive paths. Branch protection = required status checks, signed commits, linear history. Security tab = unified alert dashboard.
🔑

The Secret Sentinels

Before any code crosses the fortress walls, the Secret Sentinels stand guard. Push protection intercepts secrets at the git push boundary -blocking API keys, tokens, and credentials from ever reaching the remote repository. Over 200 partner patterns are on constant watch, and custom patterns extend the vigil to organisation-specific secrets.

Exam IntelPush protection = pre-receive hook that blocks secrets on push. 200+ partner patterns auto-notify providers. Custom patterns = regex with named capture groups. Dry-run mode for testing. Bypass requires audit trail. Delegated bypass = designated reviewers approve exceptions.
🔍

The Code Inspectors

Deep within the fortress, CodeQL inspectors treat your source code as a queryable database. They run semantic analysis -not just pattern matching -finding SQL injection, XSS, path traversal, and authentication flaws that surface-level tools miss. The default query suite catches high-confidence issues; the security-extended suite casts a wider net.

Exam IntelCodeQL = semantic SAST, code-as-data. Default setup = zero-config for supported languages. Advanced setup = custom workflow YAML. Three query suites: default (precision), security-extended (breadth), security-and-quality (all). SARIF = standard output format for all tools.
🤖

The Dependency Watchdog

The Dependabot watchdog patrols the supply chain, sniffing every manifest file for known vulnerabilities. When a CVE is published, it raises an alert instantly. For critical findings, it opens a pull request with the fix before you even notice the problem. Version updates keep dependencies current, and grouped updates prevent PR fatigue.

Exam IntelDependabot = three modes: alerts (notify), security updates (auto-PR for CVEs), version updates (keep current). dependabot.yml in .github/ directory. Grouped updates = combine PRs. 20+ ecosystems. Reachability analysis auto-dismisses low-impact alerts.
📋

The Gate Review

At the pull request gate, the dependency review action examines every change to your dependency graph. It surfaces new vulnerabilities, flags disallowed licences, and can block merges if severity thresholds are exceeded. No risky dependency slips through unnoticed.

Exam IntelDependency review = GitHub Action in PR workflow. Rich diff of dependency changes. Block on severity threshold (low/medium/high/critical). Licence compliance = fail on disallowed licences. Works with lockfiles for accurate transitive dependency tracking.
📢

The Advisory Council

When a vulnerability is discovered, the Advisory Council convenes in private. Repository security advisories provide a confidential space to assess, coordinate, and fix. GitHub, as a CVE Numbering Authority, can assign a CVE number. A private fork allows patches to be developed in secrecy before coordinated public disclosure.

Exam IntelRepository advisories = private disclosure + coordination. GitHub = CNA, can assign CVEs. Private forks for secret fixes. Published advisories propagate to Dependabot alerts ecosystem-wide. GitHub Advisory Database = global catalogue. Private vulnerability reporting = external researchers report securely.
🔗

The Supply Chain Ledger

The Supply Chain Ledger records every component in your software. The dependency graph maps all direct and transitive dependencies. SBOM exports in SPDX format satisfy compliance auditors. Artifact attestations and npm provenance link every deployed binary back to its source commit -an unbroken chain of trust.

Exam IntelDependency graph = direct + transitive deps. SBOM = SPDX format export. Artifact attestations = Sigstore-based build provenance. npm provenance = package → source commit link. Supply chain = SBOM + provenance + dependency review + Dependabot.
📊

The Watchtower

High above the fortress, the Security Overview dashboard surveys the entire organisation. Risk views highlight repositories with open critical alerts. Coverage views reveal where GHAS features remain unenabled. Trend lines show whether your security posture is improving or deteriorating over time.

Exam IntelSecurity Overview = org-level dashboard. Risk view = repos by open alert severity. Coverage view = GHAS feature enablement. Trends over time. Filterable by team, language, topic. Exportable for compliance reporting.
🛡️

The Security Culture

True security is not just tools -it is culture. Rulesets enforce policies at scale across repositories. Code scanning auto-fix suggests AI-powered remediation. Security campaigns let teams tackle alert backlogs systematically. The goal: every developer is a security practitioner.

Exam IntelRulesets = scalable policy enforcement (replace legacy branch protection). Code scanning autofix = Copilot-powered suggestions. Security campaigns = coordinated alert remediation. Organisation-level enablement = GHAS at scale. Custom security configurations = reusable policy templates.
🔄

The Continuous Cycle

Security is never done. Every push triggers secret scanning, every PR runs code scanning and dependency review, every published advisory updates Dependabot alerts. The cycle is continuous, automated, and ever-watchful -shifting security left into the developer workflow where issues are cheapest to fix.

Exam IntelShift-left = catch issues early in dev cycle. Push = secret scanning. PR = code scanning + dependency review. Merge = Dependabot monitors. Advisory = ecosystem-wide alerts. CI/CD integration = security as part of the pipeline, not an afterthought.

Mnemonic Wall

Memorable acronyms and phrases to anchor key exam concepts in your memory.

🔑
SPDC
Secret scanning features in order of deployment: enable scanning, add push protection, test with dry-run, extend with custom patterns.
🔍
DSQ
CodeQL query suites from narrowest to broadest. Default = high precision. Security-extended = more findings. Security-and-quality = everything.
🤖
ASV
"ASV -Alerts notify, Security updates patch CVEs, Version updates keep current." Three Dependabot modes.
🛡️
GHAS
The four pillars of GitHub Advanced Security mapped to its core features.
📋
SARIF
The standard format for code scanning results. All tools -CodeQL, Semgrep, SonarQube -output SARIF for GitHub ingestion.
📦
SBOM
Complete inventory of software components. Exported in SPDX format from the dependency graph. Required for supply chain compliance.
🔗
DRAP
"DRAP the supply chain." Four layers of supply chain security from detection to attestation.
🚫
BDA
Push protection flow: Block the secret on push, Delegate bypass to reviewers, Audit all bypass events.
🏗️
CDB
CodeQL analysis pipeline: Create a database from source, Define queries to run, Build SARIF results.
📊
RCT
Security Overview dashboard sections. Risk = open alerts. Coverage = feature enablement. Trends = progress over time.
🔐
PCAF
Coordinated vulnerability disclosure flow: Private advisory → CVE assignment → fix in private fork → publish.
⚙️
RGCE
Organisation-level security management: Rulesets enforce policies, GHAS enablement at scale, custom security configurations, enforcement via required workflows.

Versus Arena

Side-by-side comparisons to sharpen your understanding of similar concepts.

vs
Secret ScanningvsPush Protection

Secret Scanning vs Push Protection

AspectSecret ScanningPush Protection
WhenAfter commit reaches remoteBefore commit reaches remote
ActionAlert + notify partnerBlock the push
RemediationRevoke + rotate secretRemove secret from commit
BypassN/A -already committedDelegated bypass with audit trail
CoverageFull repo history + wikiNew pushes only
Custom patternsYes -regex with named groupsYes -same patterns
vs
Default SetupvsAdvanced Setup

Code Scanning Setup Modes

AspectDefault SetupAdvanced Setup
ConfigurationZero-config, UI toggleCustom workflow YAML
Query suitesDefault or extended (UI toggle)Any suite or custom queries
LanguagesAuto-detectedManually specified
Third-party toolsCodeQL onlyAny SARIF-producing tool
Build stepsAutomaticCustom build commands
Best forQuick enablementCustom analysis needs
vs
Dependabot AlertsvsSecurity UpdatesvsVersion Updates

Dependabot Feature Comparison

AspectDependabot AlertsSecurity UpdatesVersion Updates
PurposeNotify of CVEsAuto-PR for CVE fix / Keep deps current
TriggerNew advisory publishedAdvisory match / Schedule (daily/weekly)
ConfigurationEnabled in settingsEnabled in settings / dependabot.yml
OutputAlert in Security tabPull request / Pull request
ScopeVulnerable deps onlyVulnerable deps / All deps
Grouped updatesN/AN/A / Yes -combine PRs
vs
CodeQLvsThird-Party SAST

CodeQL vs Third-Party SAST

AspectCodeQLThird-Party SAST
Analysis typeSemantic (code-as-data)Pattern matching / semantic varies
IntegrationNative to GitHubSARIF upload via Actions
SetupDefault or advancedCustom workflow only
Languages9 supported languagesVaries by tool
Custom rulesCodeQL query languageTool-specific DSL
CostIncluded with GHASSeparate licence often required
vs
Repository AdvisoryvsGitHub Advisory Database

Advisory Types

AspectRepository AdvisoryGitHub Advisory Database
ScopeSingle repositoryGlobal ecosystem
VisibilityPrivate until publishedPublic
Created byMaintainersGitHub + community + NVD
CVE assignmentRequest from GitHub (CNA)Already assigned
Private forkYes -fix before disclosureN/A
PropagationFeeds into Advisory DatabaseTriggers Dependabot alerts
vs
Branch ProtectionvsRulesets

Branch Protection vs Rulesets

AspectBranch ProtectionRulesets
ScopeSingle branch patternMultiple repos via org rulesets
ManagementPer-repository settingsCentralised org-level
LayeringOne rule per branchMultiple rulesets can stack
BypassAdmin overrideBypass list with audit
Tag protectionSeparate settingIncluded in rulesets
RecommendedLegacy -still supportedModern approach -preferred
vs
SBOMvsDependency Graph

SBOM vs Dependency Graph

AspectSBOMDependency Graph
PurposeExportable compliance documentLive in-repo dependency map
FormatSPDX JSONGitHub UI / API
IncludesAll components + metadataDirect + transitive deps
Use caseAudits, regulatory complianceDependabot, dependency review
ProvenanceStatic snapshotDynamic, auto-updated
DownstreamExternal toolsPowers GHAS features

Cheat Sheet

Organised reference grouped by exam domain — everything you need on one page.

Secret Scanning

10-15%

Core Features

  • 200+ partner patterns detected automatically
  • Push protection blocks secrets pre-receive (git push boundary)
  • Custom patterns: regex with named capture groups
  • Partner program: auto-notify service providers on exposure
  • Dry-run mode: test custom patterns before enforcement

Push Protection

  • Blocks at push time, not commit time
  • Delegated bypass: designated reviewers approve exceptions
  • All bypass events are audit-logged
  • Can be enforced at org level via custom security configurations
  • Users see remediation guidance when blocked

Operations

  • Alerts show secret type, location, commit SHA, and validity
  • Validity checks: GitHub verifies if secret is still active
  • Non-provider patterns: generic high-entropy string detection
  • Historical scanning: scans full repo history on enablement
  • Excluded paths: configure via secret_scanning.yml

Code Scanning

15-20%

CodeQL

  • Semantic analysis: treats source code as a queryable database
  • Supported: C/C++, C#, Go, Java/Kotlin, JS/TS, Python, Ruby, Swift
  • Default setup: zero-config, auto-detects languages
  • Advanced setup: custom workflow YAML, build steps, query packs
  • Query suites: default → security-extended → security-and-quality

SARIF & Integration

  • SARIF = Static Analysis Results Interchange Format (OASIS standard)
  • All tools output SARIF for unified alert experience
  • Upload via upload-sarif action in GitHub Actions
  • Third-party tools: Semgrep, SonarQube, Checkmarx, Snyk, etc.
  • Results appear as code scanning alerts in Security tab + PR checks

Alert Management

  • Dismiss as: false positive, used in tests, won't fix
  • Autofix: Copilot-powered fix suggestions for CodeQL alerts
  • Alert severity: error, warning, note
  • Branch filtering: alerts tracked per branch (default branch primary)
  • Security campaigns: coordinated remediation of alert backlogs

Dependabot

10-15%

Three Modes

  • Alerts: notify when dependencies have known CVEs
  • Security updates: auto-PR to patch vulnerable dependencies
  • Version updates: scheduled PRs to keep all deps current

Configuration

  • dependabot.yml in .github/ directory
  • Package ecosystems: npm, pip, Maven, NuGet, Docker, Actions, Bundler, Cargo, Composer, Go, Gradle, Hex, pub, Terraform, and more
  • Schedule: daily, weekly, monthly for version updates
  • Grouped updates: combine multiple dependency PRs
  • Allow/deny lists: control which deps to update
  • Registries: private registry authentication

Advanced

  • Reachability analysis: auto-dismiss alerts for unreachable code
  • Compatibility scores: shows CI pass rate for updates
  • Auto-merge: combine with branch protection for hands-free patching
  • Dependabot secrets: scoped secrets for private registry access
  • Ignore conditions: suppress specific updates

Security Best Practices

15-20%

Repository Security

  • SECURITY.md: vulnerability disclosure policy
  • CODEOWNERS: enforce reviews for security-sensitive paths
  • Branch protection / rulesets: required checks, signed commits
  • Least privilege: minimum permissions for tokens and apps
  • Secret rotation: regular rotation schedule + automated detection

Shift-Left Security

  • Pre-commit hooks: local secret scanning before push
  • PR checks: code scanning + dependency review as required checks
  • IDE integration: CodeQL for VS Code for local analysis
  • Security training: CodeQL query writing as security education
  • Threat modelling: identify risks before writing code

Organisational Policies

  • Custom security configurations: reusable GHAS policy templates
  • Rulesets: enforce policies across repos at org level
  • Required workflows: mandate security checks for all repos
  • Audit log: track all security-related events
  • SAML SSO + SCIM: identity governance for GitHub orgs

GitHub Security Features

25-30%

Security Overview

  • Org-level dashboard: risk view, coverage view, trends
  • Filter by team, language, topic, severity
  • Exportable reports for compliance
  • Alert metrics: mean time to remediate, open/closed trends

Supply Chain Security

  • Dependency graph: direct + transitive dependency map
  • SBOM: SPDX format export for compliance
  • Artifact attestations: Sigstore-based build provenance
  • npm provenance: package → source commit linking
  • Dependency review action: PR gate for risky deps

Advisories & Disclosure

  • Repository security advisories: private disclosure + coordination
  • GitHub Advisory Database: global vulnerability catalogue
  • GitHub is a CVE Numbering Authority (CNA)
  • Private forks: fix vulnerabilities before public disclosure
  • Private vulnerability reporting: external researcher intake

Access & Governance

  • GitHub Apps: fine-grained permissions over PATs
  • Fine-grained PATs: repo-scoped, expiring tokens
  • Deploy keys: read-only or read-write per repo
  • IP allow lists: restrict org access by network
  • Audit log streaming: SIEM integration for security events

The Memory Palace

Walk through themed rooms — each object anchors a concept in spatial memory.

The Gate

Secret Scanning -Where credentials are caught

🔑
Partner Patterns
200+ token types detected automatically. Partner program notifies providers on exposure
🚫
Push Protection
Blocks secrets at git push boundary. Delegated bypass with audit trail
🔧
Custom Patterns
Regex with named capture groups for org-specific secrets. Dry-run before enforcement
✅
Validity Checks
GitHub verifies if detected secrets are still active with the partner
📜
Historical Scanning
Full repo history scanned on enablement. Covers commits, issues, PRs, wikis
⚙️
Excluded Paths
secret_scanning.yml to skip test fixtures, docs, or generated files

The Analysis Chamber

Code Scanning -Where vulnerabilities are found

🧬
CodeQL Engine
Semantic SAST -code as queryable database. 9 supported languages
⚡
Default Setup
Zero-config: toggle in UI, auto-detect languages, auto-select queries
🔧
Advanced Setup
Custom workflow YAML, build steps, query packs, third-party tools
📋
SARIF Format
Standard output format. CodeQL, Semgrep, SonarQube -all produce SARIF
🤖
Autofix
Copilot-powered fix suggestions for CodeQL alerts. Accept or modify
📊
Query Suites
default (precision) → security-extended (breadth) → security-and-quality (all)

The Dependency Vault

Dependabot & Supply Chain -Where packages are tracked

🔔
Dependabot Alerts
CVE notifications for vulnerable dependencies. Auto-dismiss via reachability analysis
🔒
Security Updates
Auto-generated PRs to patch known vulnerabilities in dependencies
📦
Version Updates
Scheduled PRs via dependabot.yml. Grouped updates reduce PR noise
🕸️
Dependency Graph
Maps direct + transitive deps. Powers Dependabot + dependency review
📄
SBOM Export
SPDX format for compliance. Complete inventory of all components
📋
Dependency Review
PR action: block on vulnerability severity or disallowed licences

The Advisory Hall

Advisories & Disclosure -Where vulnerabilities are coordinated

📝
Repository Advisories
Private vulnerability disclosure and coordination before public release
🌐
Advisory Database
Global catalogue: GitHub-reviewed + NVD + community contributions
🏷️
CVE Assignment
GitHub is a CNA -can assign CVE numbers for open-source vulnerabilities
🔀
Private Forks
Develop fixes in private before coordinated public disclosure
📬
Private Reporting
External researchers report vulnerabilities securely via repository settings
🔗
Propagation
Published advisories flow to Advisory Database → Dependabot alerts ecosystem-wide

The Command Centre

Security Overview & Governance -Where posture is managed

📊
Security Overview
Org dashboard: risk view, coverage view, trends. Filter by team/language/severity
📏
Rulesets
Org-level policy enforcement across repos. Replaces legacy branch protection
⚙️
Security Configurations
Reusable GHAS policy templates. Apply to repos at scale
📋
Audit Log
All security events logged. Streaming to SIEM for real-time monitoring
🔐
Access Controls
GitHub Apps, fine-grained PATs, deploy keys, IP allow lists, SAML SSO + SCIM
🏗️
Attestations
Sigstore-based artifact attestations. npm provenance for package integrity

Pattern Spotter

Decision trees and trigger-answer pairs — see the pattern, know the answer.

Secret Found -What Happens?
Secret Found -What Happens?
  ├── Push protection enabled? → Yes → Block push, show remediation guidance, offer delegated bypass
  ├── Partner pattern detected? → Yes → Alert created + partner notified automatically for revocation
  ├── Custom pattern match? → Yes → Alert created, no partner notification (org-specific secret)
  └── Already committed to history? → Revoke immediately, rotate credentials, remove from history if needed
Which Code Scanning Setup?
Which Code Scanning Setup?
  ├── Supported language, standard build? → Default setup -zero-config, toggle in repository settings UI
  ├── Need custom build steps? → Advanced setup -custom workflow YAML with build commands
  ├── Need third-party tool? → Advanced setup -add tool step, upload SARIF via upload-sarif action
  └── Want broadest coverage? → security-and-quality suite (includes code quality + security rules)
Vulnerable Dependency Detected
Vulnerable Dependency Detected
  ├── CVE published for a dependency? → Dependabot alert created in Security tab with severity and fix version
  ├── Security updates enabled? → Auto-PR opened with minimum version bump to fix vulnerability
  ├── PR introduces new vulnerable dep? → Dependency review action blocks merge if severity threshold exceeded
  └── Alert for unreachable code path? → Reachability analysis auto-dismisses as low impact
Vulnerability Disclosure Flow
Vulnerability Disclosure Flow
  ├── Vulnerability discovered internally? → Create repository security advisory (private). Request CVE from GitHub
  ├── External researcher reports? → Private vulnerability reporting → maintainer receives private notification
  ├── Fix ready? → Develop in private fork. Merge and publish advisory simultaneously
  └── Advisory published? → Flows to GitHub Advisory Database → triggers Dependabot alerts ecosystem-wide

Decision Cards

Need to prevent secrets from being pushed?→Enable push protection -blocks at git push boundary. Delegated bypass for exceptions with audit trail.
Want to detect org-specific secrets?→Create custom patterns with regex and named capture groups. Use dry-run mode to test before enforcement.
Need code scanning with zero configuration?→Use default setup -toggle in repo settings. Auto-detects languages, selects appropriate query suite.
Want to integrate a third-party SAST tool?→Use advanced setup workflow. Run tool in Actions, output SARIF, upload via upload-sarif action.
Need to keep all dependencies up to date?→Configure version updates in dependabot.yml. Use grouped updates to reduce PR noise. Set schedule: weekly.
Want to block PRs introducing vulnerable deps?→Add dependency-review-action to PR workflow. Set fail-on-severity threshold (e.g., high).
Need a complete software inventory?→Export SBOM from dependency graph in SPDX format. Includes all direct and transitive dependencies.
Want to coordinate private vulnerability disclosure?→Create repository security advisory. Fix in private fork. Request CVE from GitHub (CNA). Publish when ready.
Need to enforce security policies across all repos?→Use org-level rulesets + custom security configurations. Apply GHAS features at scale via enablement settings.
Want to measure security posture across the org?→Security Overview dashboard: risk view for open alerts, coverage view for feature enablement, trends over time.
Need build provenance for published packages?→Use artifact attestations (Sigstore) in GitHub Actions. For npm, enable provenance to link package → source commit.
Want AI-powered fix suggestions for code scanning alerts?→Enable code scanning autofix (Copilot). Suggests fixes for CodeQL alerts. Review and accept or modify.

Train with practitioners, not presenters

Lucid Labs delivers Microsoft certification training led by Microsoft Certified Trainers (MCTs) and grounded in real-world project experience. We adapt every session to your team's environment, data stack, and business objectives — because the best exam prep comes from engineers who build these solutions every day.

🔑
Secret Scanning Mastery
Hands-on labs configuring push protection, custom patterns, and partner program integrations across real repositories.
🧬
CodeQL Deep Dive
Write custom CodeQL queries, understand semantic analysis, and integrate third-party SAST tools via SARIF.
🤖
Dependabot & Supply Chain
Configure Dependabot for alerts, security updates, and version updates. Implement dependency review and SBOM exports.
📊
Organisation-Scale Security
Deploy GHAS across your organisation with rulesets, custom security configurations, and Security Overview dashboards.
Talk to us about GitHub Advanced Security training

Custom training for teams & individuals — remote or on-site across Australia

Keith Oak
Keith Oak
Chief Technology Officer — Lucid Labs

Microsoft Solutions Partner architect specialising in Fabric, Azure Data & AI, and GitHub Enterprise. 18+ years delivering data platforms for Australian businesses — building the systems these exams test every day.