Browse the guide
Demos
Code Quality
CodeQL, secret scanning, dependency review, and Copilot Autofix from the GitHub UI.
What This Demonstrates
GitHub Code Quality features — CodeQL analysis, Copilot Autofix, dependency review, and secret scanning — work directly from the GitHub UI and PR workflow.
Prerequisites
- Repository admin access (for enabling features)
- GitHub web UI
a) Enable Code Scanning (CodeQL)
- Navigate to the repo on GitHub → Settings → Code security and analysis.
- Enable Code scanning with the default CodeQL setup.
- Show the auto-generated
codeql.ymlworkflow detecting JavaScript/TypeScript. - Trigger a scan and walk through the results under Security and quality → Code scanning alerts.
b) Copilot Autofix on Code Scanning Alerts
- Open a code scanning alert from the Security and quality tab.
- Click Generate fix (Copilot Autofix) on a finding.
- Walk through the suggested patch — explain how it addresses the vulnerability.
- Commit the fix directly or open a PR from the suggestion.
c) Dependency Review in PRs
- Create a branch and add or bump a dependency in one of the services’
package.json. - Open a PR — show the Dependency Review summary that appears.
- Point out how vulnerable or license-incompatible dependencies are flagged before merge.
d) Secret Scanning + Push Protection
- Navigate to Settings → Code security → Secret scanning — show it’s enabled.
- Show Push protection is on (blocks pushes containing detected secrets).
- Optionally demo by attempting to push a dummy secret pattern and showing the block.
e) Security Overview Dashboard
- Go to Security and quality → Overview at the repo or org level.
- Walk through the dashboard: open alerts, fixed alerts, coverage.
- Highlight how code quality findings, dependency alerts, and secret alerts roll up into one view.
f) Code Scanning in a PR (Inline Experience)
- Open a PR that triggers a CodeQL finding (e.g., missing input validation).
- Show the inline annotation on the PR diff with the finding details.
- Show Copilot Autofix suggesting a remediation inline.
- Accept or dismiss the suggestion.
Follow-Up Prompts
- “What other CodeQL queries should we enable for this Node.js project?”
- “Generate a dependency review action that blocks PRs with critical vulnerabilities.”