github-samples / github-samples/pets-workshop
GitHub security workshop: Enforce security merge gates with rulesets
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 80
- Forks
- 161
- Avg merge
- 31m
- Merged PRs (30d)
- 1
Description
Goal
Teach learners to turn security scanning from advisory feedback into an enforceable pull-request policy.
Scope
Create a repository ruleset for the default branch that requires the tested security checks and prevents a vulnerable pull request from merging. Explain check naming, merge-base behavior, bypass governance, and plan-dependent alternatives.
Acceptance criteria
- Learners create a ruleset targeting the default branch without locking themselves out of the workshop.
- The ruleset requires the CodeQL/security check produced by earlier exercises.
- A pull request containing the training finding is visibly blocked from merging.
- After remediation and a fresh scan, the same pull request becomes eligible under the security gate.
- The exercise explains required status checks, required code scanning results where available, bypass actors, and evaluate/disabled modes.
- A repository-level fallback is documented for plans that lack an organization-level control.
- Cleanup instructions remove or disable the lab ruleset after verification.
- The exercise does not duplicate the generic CI ruleset lesson in the Actions workshop; it focuses specifically on security policy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the CodeQL/security-check exercise referenced in the issue and the generic CI ruleset lesson in the Actions workshop. Build the security-focused workshop flow around the default branch, required checks, bypass and plan behavior, then verify that a vulnerable pull request is blocked, remediation allows it, and cleanup removes or disables the ruleset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, github-actions
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100