ci: harden UltraModern GitHub Actions workflows - #7
Conversation
|
|
Changed Files
|
There was a problem hiding this comment.
💡 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 |
There was a problem hiding this comment.
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 👍 / 👎.
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
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 👍 / 👎.
…tale conditional root scripts (Sol gate3 #7)
Summary
main-ultramodernwithout changing fork-specificmisesetuppersist-credentials: falsewhere jobs only need read accessVerification
uvx zizmor -q --format json --no-progress --no-exit-codes --collect=workflows .github/workflows/Users/satan/side/experiments/skills/actionlint/scripts/run_actionlint.sh /Users/satan/worktrees/ultramodern-zizmor-actionsgit diff --cached --checkbefore commitRemaining zizmor finding
dangerous-triggersin.github/workflows/ultramodern-production-readiness.yml: existingworkflow_runbehavior 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