Lion Cipher Lab
Review your main branch's protection or ruleset with an expected-versus-actual check (CI/CD assessment 3 of 7)
- Penetration Testing / Red Team
- Intermediate
- ~45 min
- Free · no account required
Why it matters
Almost every supply-chain attack on a pipeline ends the same way: someone's change reaches the branch that gets built and shipped. Branch protection and rulesets are the control that stands between a stolen account, a rushed commit or a compromised workflow and your main branch. They are also easy to get subtly wrong: protection that administrators can bypass, required checks that never run, or a ruleset left in evaluate mode so it logs and blocks nothing. An assessor reads the actual settings rather than trusting that 'we have branch protection'.
What you'll learn
- reading classic branch protection through the REST API
- reading the active rules that apply to a branch
- knowing why a missing rule can mean evaluate mode, not absent
- writing expectations before reading actual settings
- checking a requirement against two mechanisms
- writing a branch protection fix as a request body
Steps in this lab
- The rule first: read your own branch before you change it
- Two mechanisms, and the one trap
- Write the expectations first, then read the actual settings
- The checking script, with samples for both mechanisms
- Run it on your own branch, then close the gaps
- The defender's view: protection is a log and a gate
Open the full interactive lab →