Skip to content

fix(ci): isolate documentation previews from privileged deployment - #157

Closed
vitormattos wants to merge 1 commit into
mainfrom
fix/privileged-docs-preview-isolation-20261111
Closed

vitormattos wants to merge 1 commit into
mainfrom
fix/privileged-docs-preview-isolation-20261111

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Problem

Dependabot-originated pull_request jobs do not receive the organization GitHub App private key. The current PR preview workflow builds successfully and then fails at create-github-app-token; retrying the failed job as a maintainer does not change the original event's secret restrictions. Making secrets available inside a PR checkout would also unnecessarily widen a trust boundary.

Change

  • Make every PR (same-repository, Dependabot, fork) build and upload the HTML preview using only read-only permissions and without application credentials.
  • Reuse the existing trusted workflow_run deployment pipeline for all PRs instead of only forks. It checks out default-branch code, checks that the PR is still open and its current HEAD matches the completed run, downloads the HTML artifact from that exact run, and rejects symlinks/basic invalid layouts before obtaining the scoped Pages credential.
  • Preserve the current byte-for-byte public HTML verification and sticky preview comment on the trusted workflow. Never execute the PR checkout in that privileged job.

Validation and limitations

Please review the security boundary and independent CI before merge; this change is not a bypass of required reviews.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>

Copy link
Copy Markdown
Member Author

Superseded by #159. This PR duplicated Pages verification and sticky-comment scripting inside the privileged workflow. #159 instead reuses the existing LibreSign/pr-preview-action and fork-publishing workflow, with only 11 additions and 10 deletions. Closing this refactor without merging; the independently reviewed replacement is #159.

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