Repository navigation
Harden CI security - #679
Merged
Merged
Conversation
Split the npm publish workflow into separate build and publish jobs for both dev and production releases. The build jobs now perform dependency installation, linting, tests, export checks, and Rollup builds without `id-token: write`. The publish jobs are the only jobs with OIDC permission, and they only download the previously generated `dist` artifact and run `npm publish`. This reduces exposure to the supply-chain pattern seen in the TanStack incident: a compromised dependency install, build script, lifecycle hook, or poisoned cache should not be able to mint an npm trusted-publishing token. Also remove dependency caches from the publish workflow entirely. Release jobs are slower as a result, but this prevents a cache written by another workflow from influencing the package artifact that eventually gets published. Disable checkout credential persistence because these jobs do not need to push back to the repository after checkout. Replace the third-party version action and `yarn version` call in the dev publish path with a small inline Node script. This avoids unnecessary third-party code and avoids running package version lifecycle scripts in the OIDC-enabled publish job. Publish with `--ignore-scripts` so npm lifecycle scripts cannot execute in the trusted-publishing step.
Drop the unnecessary repository checkout from the label workflow.
Metrics reportAt head commit e413d3b and base commit d4a5a40 at SizeNo changes All size metrics
|
Split metrics report generation from PR comment posting so untrusted PR code only runs in a read-only job. The metrics report action now only generates the comment body and writes it to the required `comment-body-path` output file. It no longer accepts a GitHub token, no longer posts comments itself, and no longer keeps the old `set-comment`/Octokit-based posting code path around. This makes accidental direct posting from the action fail structurally instead of relying on convention. Add a separate `post-comment` script for the trusted workflow job. That job checks out the base repository code, downloads the generated comment artifact, and creates or updates the PR comment using a small dependency-free GitHub REST client. This preserves the write permission boundary without requiring dependency installation in the write-capable job. Also document the metrics-report CI boundary in the agent internals notes so future workflow changes keep PR-code execution and write-capable comment posting separated.
Remove the static `CODSPEED_TOKEN` from the benchmark workflow so PR benchmark code no longer receives a long-lived CodSpeed upload token. CodSpeed supports tokenless uploads for public repositories, which fits this repo better than static credentials or OIDC because the benchmark job executes pull request code. This keeps the job read-only and avoids granting either a repository secret or `id-token: write` to untrusted benchmark runs.
… report workflow change
Extend the existing CodeQL workflow to analyze GitHub Actions workflow files in addition to JavaScript and TypeScript code. Add a dedicated `analyze-actions` job that runs CodeQL with `languages: actions` and the `security-extended` query suite. This enables GitHub’s workflow-specific security checks for issues such as untrusted checkout patterns, artifact and cache poisoning risks, excessive token exposure, missing permissions, and unpinned non-immutable actions. Also run the CodeQL workflow on pull requests that modify `.github/actions/**` or `.github/workflows/**`, so CI control-plane changes are scanned before merge instead of only after landing on `main` or during the scheduled weekly run.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
…available in base
|
This was addressed in release v3.6.0-dev.20845db4cb580aa2375b9eba3d695d0ece18bc87. |
1 task
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.
Hardens the CI-related security of this repo in reaction to the recent supply chain attacks.
Some context: