Skip to content

GitHub security workshop: Enforce security merge gates with rulesets #277

Description

@softchris

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions