Skip to content

ci: harden UltraModern GitHub Actions workflows - #7

Merged
BleedingDev merged 1 commit into
main-ultramodernfrom
codex/ultramodern-zizmor-actions-hardening-20260627
Jun 26, 2026
Merged

ci: harden UltraModern GitHub Actions workflows#7
BleedingDev merged 1 commit into
main-ultramodernfrom
codex/ultramodern-zizmor-actions-hardening-20260627

Conversation

@BleedingDev

Copy link
Copy Markdown
Owner

Summary

  • apply the GitHub Actions hardening from the upstream Modern.js PR onto main-ultramodern without changing fork-specific mise setup
  • set checkout persist-credentials: false where jobs only need read access
  • keep skip-CI output interpolation routed through environment variables before shell use
  • move GitHub Pages deployment permissions from workflow scope to the deploy job

Verification

  • uvx zizmor -q --format json --no-progress --no-exit-codes --collect=workflows .github/workflows
    • after: 1 finding, H1/M0/L0/I0
  • /Users/satan/side/experiments/skills/actionlint/scripts/run_actionlint.sh /Users/satan/worktrees/ultramodern-zizmor-actions
  • git diff --cached --check before commit

Remaining zizmor finding

  • dangerous-triggers in .github/workflows/ultramodern-production-readiness.yml: existing workflow_run behavior is preserved because changing it would alter readiness proof semantics after package publishing.

Upstream PR left open for Modern.js review: web-infra-dev#8728

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@semanticdiff-com

semanticdiff-com Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  .github/workflows/lint-Linux.yml  67% smaller
  .github/workflows/docs-pages.yml  23% smaller
  .github/workflows/integration-test-Linux.yml  20% smaller
  .github/workflows/type-check.yml  20% smaller
  .github/workflows/ut-macOS.yml  20% smaller
  .github/workflows/integration-test-Windows.yml  12% smaller
  .github/workflows/ut-Windows.yml  12% smaller
  .github/workflows/check-dependencies.yml  0% smaller
  .github/workflows/diff.yml  0% smaller
  .github/workflows/test-builder-e2e.yml  0% smaller

@BleedingDev
BleedingDev merged commit 44058e2 into main-ultramodern Jun 26, 2026
8 checks passed
@BleedingDev
BleedingDev deleted the codex/ultramodern-zizmor-actions-hardening-20260627 branch June 26, 2026 23:46

@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: a64b678180

ℹ️ 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".

uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve credentials before running skipCI

When this workflow runs in a private/internal repository, the immediately following Check skip CI step invokes scripts/skipCI.js, which starts with git fetch origin main. actions/checkout documents that persisted credentials are what let later scripts run authenticated git commands, and setting persist-credentials: false opts out, so that fetch will fail before the tests can run or be skipped. This same pattern is repeated in the other skip-CI workflows changed here; either keep credentials for these jobs or authenticate the fetch explicitly.

Useful? React with 👍 / 👎.

Comment on lines +19 to +20
permissions:
contents: read

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Grant Pages read permission to the build job

When this workflow is used from a private repository or fork, actions/configure-pages@v6 calls the GitHub Pages getPages API, which requires Pages read permission. This job-level permissions block grants only contents: read (unspecified scopes become none), so the Configure Pages step fails with Resource not accessible by integration before any artifact is uploaded; add pages: read to the build job while keeping write/OIDC limited to deploy.

Useful? React with 👍 / 👎.

BleedingDev added a commit that referenced this pull request Jul 13, 2026
BleedingDev added a commit that referenced this pull request Jul 13, 2026
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