Repository navigation
fix(release): verify and package TypeScript CLI artifacts - #13063
Conversation
| npm --version | ||
| npm config get ignore-scripts | ||
| npm config get strict-allow-scripts | ||
| npm install --foreground-scripts --ignore-scripts=false --loglevel verbose "$exe_tarball" "$native_tarball" |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release workflow adds a manual TypeScript verification-only mode, skips publishing jobs during that mode, clears ChangesRelease verification workflow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Maintainer
participant ReleaseWorkflow
participant TypeScriptVerification
participant ArtifactChecks
Maintainer->>ReleaseWorkflow: Dispatch with verify_ts_release=true
ReleaseWorkflow->>TypeScriptVerification: Run verification without publishing
TypeScriptVerification->>ArtifactChecks: Build and inspect release artifacts
ArtifactChecks-->>ReleaseWorkflow: Confirm files exist and smoke tests pass
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoRelease workflow: verify and package TypeScript CLI artifacts without publishing
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. Branch secret exfiltration
|
| if [ "${{ inputs.verify_ts_release }}" = "true" ]; then | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
1. Branch secret exfiltration 🐞 Bug ⛨ Security
validate-release-ref now allows non-tag refs when verify_ts_release=true, which makes verify-ts-release runnable from arbitrary branches while still receiving secrets.GARNET_API_TOKEN and executing repo-controlled build steps and npm lifecycle scripts. Any user with permission to workflow_dispatch this workflow can run a modified branch that exfiltrates that secret (and any other secrets later added to the job).
Agent Prompt
### Issue description
Manual branch verification (`workflow_dispatch` with `verify_ts_release`) bypasses the tag-only guard and reaches `verify-ts-release`, which currently uses `secrets.GARNET_API_TOKEN` and runs repository-defined build steps and `npm install` with scripts enabled. This creates a straightforward secret-exfiltration path for anyone allowed to dispatch workflows on arbitrary branches.
### Issue Context
This PR intentionally adds a no-publish verification mode; however, “no publish” is not the same as “no secrets”. The risky combination is: (a) run on arbitrary branch content + (b) secrets available in job + (c) arbitrary code execution via build/lifecycle scripts.
### Fix Focus Areas
- .github/workflows/release.yml[20-28]
- .github/workflows/release.yml[41-56]
- .github/workflows/release.yml[147-178]
- .github/workflows/release.yml[234-264]
### Concrete remediation options (pick one)
1) **Make verify mode secretless** (recommended):
- Gate the secret-consuming step(s) with `if: ${{ !inputs.verify_ts_release }}` (or move them to the publish job only), so branch verification cannot access secrets.
- If the garnet step is required for verification, replace it with a non-secret configuration or a public token with no privileges.
2) **Add an approval boundary**:
- Put `verify-ts-release` behind an `environment:` that requires approvals, or create a dedicated environment for verification.
3) **Split workflows**:
- Create a separate `release-verify.yml` workflow with **no secrets** and minimal permissions, and keep `release.yml` tag-only.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
PR Code Suggestions ✨Warning
Explore these optional code suggestions:
|
|||||||||
Summary
distignore from removing the TypeScript CLI bundle during pack and publishdevEnginesconstraintsThe no-publish verification passed in https://github.com/pnpm/pnpm/actions/runs/29460017538, including the packed TypeScript CLI, npm lifecycle installation, and native executable smoke test. The release job was skipped.
Squash Commit Body
Checklist
Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
New Features
Bug Fixes