// module 09 · Running the program
Drift detection on a schedule
Every control from the earlier modules can be undone by someone with admin rights, usually for a good reason and usually without telling anyone: a ruleset deleted to unblock a release, an event policy removed to test a workflow, fork PR approval loosened for a contributor. This lesson puts all the course's checks into one fleet audit, runs it every day from the security team's repo, and keeps one issue open while anything has drifted. It covers the token problem (the workflow's own token can't read other repos' settings), the GitHub App that solves it, and a real drift demo: three settings broken, detected, put back and confirmed.
Learning Objectives
- Combine the course's check scripts into one audit that exits non-zero when anything drifted
- Explain why the `GITHUB_TOKEN` can't run the audit and what token can
- Run the audit from a scheduled workflow with a read-only GitHub App token, and handle the case where no credentials are set
- Keep one drift issue open, updated and closed automatically instead of a new issue every day
- Break three controls on purpose, detect them, restore them with the scripts that set them, and confirm
This lesson is for enrolled learners
Log in, then enroll to read the full lesson, run its lab and take the quiz.
