Skip to content

security(deploy-pages): enforce explicit caller contract - #1272

Open
seonghobae wants to merge 5 commits into
mainfrom
codex/pr901-current-main-replacement-20260824
Open

security(deploy-pages): enforce explicit caller contract#1272
seonghobae wants to merge 5 commits into
mainfrom
codex/pr901-current-main-replacement-20260824

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Root cause

The reusable Cloudflare Pages workflow predated the current least-privilege boundary: it declared no named secret interface, instructed callers to use secrets: inherit, and interpolated caller-controlled project, path, and domain strings into Wrangler, Cloudflare URLs, and the shell summary before validation.

The historical #901 implementation was source-valid but DIRTY, duplicated an unrelated CHANGELOG entry, omitted the root README from its contract test, and accepted uppercase or 59-character project names that Cloudflare Pages rejects.

Change

  • require exactly CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID at workflow_call
  • replace every central deploy-pages example with explicit two-name mappings
  • fail closed on project, build-directory, symlink, and domain inputs before command, URL, or summary use
  • enforce the observed Cloudflare Pages project-name boundary: 1-58 lowercase alphanumeric/hyphen characters, no leading/trailing hyphen
  • keep checkout pinned, contents: read, caller-repository checkout, and Cloudflare deployment semantics
  • document migration, rollback, current live consumer search, and APA 7th references

Consumer evidence

A live gh search code deploy-pages.yml@ --owner ContextualWisdomLab on 2026-08-24 returned only this central workflow plus the central root and infrastructure README examples. No product caller migration is currently required.

Verification

  • TDD RED: adding root README to the contract reproduced its remaining secrets: inherit example
  • TDD RED: production validation accepted both Uppercase and 59-character project names
  • focused production-validator contracts: 32 passed
  • uv run --with pip coverage run -m pytest -q: 1,425 passed, 1 skipped, 16 subtests
  • coverage: 8,346 statements and 3,214 branches at 100%
  • interrogate: 100%
  • compileall, actionlint with ShellCheck 0.11.0, git diff check, and healthy synchronized CodeGraph

The explicit --with pip isolates the current-main fresh-uv bootstrap gap tracked separately by #1265.

Supersedes #901.
Closes #900.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f380d53e-8655-48b4-b767-049c32a63009

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pr901-current-main-replacement-20260824

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 04:07

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread .github/workflows/deploy-pages.yml
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 10:51
@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 11:10
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.

security(deploy-pages): replace blanket inherited secrets with an explicit reusable-workflow contract

1 participant