Skip to content

Security: enforce disabled GitHub Pages and document site shutdown - #4

Merged
EmergentMonk merged 3 commits into
mainfrom
security/no-github-pages-policy
Nov 12, 2026
Merged

EmergentMonk merged 3 commits into
mainfrom
security/no-github-pages-policy

Conversation

@EmergentMonk

@EmergentMonk EmergentMonk commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Incident

GitHub's automatic pages build and deployment workflow #43184072056 completed successfully for RHEL-LAB merge commit 3209cbd9a2dc842c4f89f95336b1f66b15cc3391. Repository metadata still advertises has_pages: true, although there is no Pages deployment YAML in this repository.

Changes

  • scripts/pages_policy.py: offline, standard-library check of the exact repository's GitHub event has_pages state; fail closed when enabled, missing or ambiguous.
  • Scan committed workflow YAML for known Pages publish actions, Pages write permission, and gh-pages deployment references.
  • tests/test_pages_policy.py: 11 synthetic, no-network regression tests.
  • New Pages disabled (security policy) CI job; existing Python source checks preserved.
  • docs/PAGES_SHUTDOWN.md, README and AGENTS.md: authoritative administrative shutdown instructions and limits.

Required admin action (cannot be done by a PR)

Settings → Pages → Build and deployment → Source: Deploy from a branch → Branch: None → Save.

GitHub docs explicitly state this deletes the Pages site without removing the GitHub repository. The workflow run already completed and cannot be cancelled. This change does not disable Pages itself or erase a published site.

CI behavior

  • Unit tests should run normally.
  • The new Pages policy job is expected to fail while Pages remains enabled; this is the intentional drift signal. Once the owner disables Pages in Settings, rerun it to verify event metadata reports has_pages: false.
  • No deployment permissions, extra GitHub API requests or external network calls added.
  • Keep owner review/merge authorization; do not bypass the policy for a green check.

Commit

55ab4bccf8fdf8da90c13dadc4af62aa301c9cad

Summary by Sourcery

Enforce the repository's no-Pages security policy and document the administrative steps required to disable the existing GitHub Pages site.

New Features:

  • Add an offline, fail-closed policy check for GitHub Pages repository status and Pages publishing references in committed workflows.

Enhancements:

  • Add CI enforcement and repository guidance for keeping GitHub Pages and public web deployments disabled.

CI:

  • Add a dedicated Pages-disabled security policy job to CI while preserving existing source checks.

Documentation:

  • Document the required administrative Pages shutdown procedure, its limitations, and the repository's no-web-deployment policy.

Tests:

  • Add offline regression coverage for disabled or ambiguous Pages metadata, repository identity, workflow safety, and common publishing patterns.

@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Sorry @EmergentMonk, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 hour and 17 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T08:43:27.668888Z 55ab4bc PR opened
🔒 Security Review ✅ Completed 2026-11-12T08:44:25.701245Z 55ab4bc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Implement the fail-closed Pages metadata check and scan committed workflows for publishing markers.

  • scripts/pages_policy.py L1-72

Configuration

Add a dedicated CI job that runs the offline Pages policy check against the event metadata and committed workflows.

  • .github/workflows/ci.yml L28-45

Documentation

Document the administrative shutdown requirement and the limits of the source-controlled guard.

  • AGENTS.md L21
  • README.md L9-12, L34-35
  • docs/PAGES_SHUTDOWN.md L1-44

Tests

Add offline regression tests for repository metadata validation, workflow publishing markers, and CLI failure behavior.

  • tests/test_pages_policy.py L1-120

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55ab4bccf8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/pages_policy.py Resolved

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

@EmergentMonk
EmergentMonk merged commit 6b272c5 into main Nov 12, 2026
2 of 3 checks passed
@EmergentMonk
EmergentMonk deleted the security/no-github-pages-policy branch November 12, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant