Repository navigation
Conversation
Added a new 'build' job to the CI workflow, including steps for checking out the code, setting up Node.js and pnpm versions, installing dependencies, and building the project.
vicovaro
pushed a commit
to vicovaro/llmgateway
that referenced
this pull request
Jul 28, 2026
Resolves the ten open CodeQL `actions/missing-workflow-permissions` alerts (theopenco#89, theopenco#81, theopenco#37, theopenco#35, theopenco#10, theopenco#7, theopenco#6, theopenco#5, theopenco#4, theopenco#3) by giving every flagged workflow job an explicit least-privilege `permissions` block, so `GITHUB_TOKEN` no longer falls back to the repository default (read-write for repos created before Feb 2023). ## Changes | Workflow | Alerts | Change | | --- | --- | --- | | `run.yml` | theopenco#89 | workflow-level `contents: read` | | `ci.yml` | theopenco#37, theopenco#6, theopenco#5, theopenco#4, theopenco#3 | workflow-level `contents: read` (covers `quality` plus the four `run.yml` caller jobs) | | `e2e.yml` | theopenco#81, #2 | workflow-level `contents: read` | | `autofix.yml` | theopenco#35 | workflow-level `contents: read` | | `images.yml` | theopenco#10, theopenco#7 | job-level `contents: read` on `setup` and `trigger-infra-update` — the file's other jobs already scope their own permissions, so this matches the existing style | ## Why `contents: read` is sufficient everywhere Every flagged job only reads the repository; the writes in these workflows are already done with dedicated PATs rather than the workflow token: - `autofix.yml` passes `token: ${{ secrets.GH_TOKEN }}` to the autofix action, which is what pushes the fixup commit. - `images.yml` → `trigger-infra-update` dispatches into a different repository with `GH_TOKEN: ${{ secrets.GH_INFRA_TOKEN }}`. - `images.yml` → `setup` just checks out and computes an image tag. - `e2e.yml`'s `upload-artifact`/`download-artifact` steps operate on same-run artifacts, which use the runtime artifact API and need no token scope. - `run.yml` sets `GITHUB_TOKEN` on the command step, but nothing in the build/lint/setup scripts reads it — it only serves to raise API rate limits during dependency resolution. `run.yml` is a reusable workflow, so its `contents: read` is a subset of what `ci.yml` now grants and does not conflict. ## Verification - Parsed all 11 workflow files and audited the effective permissions of every job: all are now covered at either the workflow or job level, with none missing. - `prettier` reports all five touched files unchanged (already correctly formatted). --- _Generated by [Claude Code](https://claude.ai/code/session_01368Ax2WpJaKG32ySXDKKX7)_ Co-authored-by: Claude <noreply@anthropic.com>
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Include build job for dependency installation and building.