Lesson 05 · GitHub platform · security
GitHub watches your dependencies and your diffs for you — for free, on every repo. Two jobs: catch vulnerable packages already in the repo, and stop secrets from ever landing in it.
You've tracked work with issues, automated checks with Actions, organised it with Projects, and published it with Pages. The last piece: the Security tab, which runs a small set of automated checks against the repo without you writing any workflow YAML for them.
package.json, requirements.txt, etc.) against a vulnerability database. Flags packages with known CVEs.First two are one job: known-vulnerable dependencies. Alerts find them, security updates fix them. Third is a different job: leaked credentials — not a dependency problem, a "someone pasted an API key into code" problem.
Passive. Just tells you: "this repo depends on [email protected], which has a known prototype-pollution CVE." Shows up in the Security tab. No code changes.
Always on, can't be disabled per-repo on GitHub Free for public repos
Active. Opens an actual PR bumping the version, with the CVE explained in the PR description. You still review and merge it — nothing auto-merges.
Opt-in, toggled separately in repo Settings → Code security
Secret scanning normally works like the others: after the fact, scan what's already in the repo, alert you. Push protection is different in kind — it runs at git push time. If a commit contains something matching a known secret pattern (an AWS key, a Stripe token, a GitHub PAT, dozens more), the push is rejected outright, with the offending line and file named in the error.
The Security tab also surfaces code scanning (CodeQL — static analysis that finds bugs like SQL injection or XSS in your own code, not just dependencies). It's real and useful, but setup and custom queries are deep enough to be their own lesson — this course covers it at awareness level only: it exists, it's in the same tab, revisit if a real need shows up.
Security closes the loop differently than Pages did — it's not a new output, it's a backstop across everything else:
Primary source — read this one: GitHub Docs — GitHub security features. The full map: Dependabot, secret scanning, code scanning, and how they fit together.
Then configure it: GitHub Docs — About secret scanning. Covers push protection setup in detail.