Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| npm install --global pnpm@12.3.4 |
|
Execution Profiles recorded for 1 job, triggered by
|
|
/agentic_review |
|
@coderabbitai review |
Code Review by Qodo
1. Repository contributors can steal token
|
| jobs: | ||
| replay: | ||
| name: GVS rebuild (${{ matrix.bin_path_mode }}) | ||
| if: github.event.pull_request.head.repo.full_name == github.repository |
There was a problem hiding this comment.
1. Repository contributors can steal token 🐞 Bug ⛨ Security
The replay job treats any same-repository pull-request head as trusted, even though the pull_request workflow and its secret-bearing steps come from that contributor-controlled revision. A contributor with permission to push a repository branch can modify the workflow to expose GARNET_API_TOKEN as soon as the pull request runs, bypassing default-branch review protections.
Agent Prompt
## Issue description
The same-repository check permits contributor-controlled pull-request workflow revisions to receive the long-lived Garnet API token.
## Fix Focus Areas
- .github/workflows/garnet-gvs-bins-path-replay.yml[13-19]
- .github/workflows/garnet-gvs-bins-path-replay.yml[68-75]
## Recommended Fix
Remove `api_token` from the pull-request job and authenticate the pinned Garnet action through short-lived OIDC with narrowly scoped `id-token: write`, following the repository's trusted Garnet recorder pattern. If OIDC cannot be used, move the secret-bearing recording into a workflow whose definition is loaded only from a trusted default-branch revision and never expose the secret to contributor-controlled workflow YAML.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Summary
This is a fork-only diagnostic, not for merge.
Records a GVS dependency build PATH comparison under Garnet: runtime-only versus runtime-first with workspace-root bins. The native oracle writes
whichandreadlink -fresults fornodeand an undeclared root tool to the step summary while Garnet records process ancestry.The comparison is driven by
BIN_PATH_MODE. It uses PATH injection and does not rebuild or change the CLI.Squash Commit Body
Checklist
Written by an agent (Cursor, GPT-5.6 Sol).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Runtime evidence (Garnet)
Kernel-recorded execution record for head
0959cd720ffa1b13582f14b27928beaa770fde45, mirrored verbatim fromthe sticky Garnet Runtime Review comment on this PR so reviewers that read only
the description ground in the same bytes. Facts only. Judgment stays with the
reviewer. Cite grounded findings as:
Execution record (verbatim mirror)
Execution Profiles recorded for 1 job, triggered by
0959cd7Garnet GVS bins PATH replay/replay↗ · 4 destinationsView this job's Execution Profile in Garnet →
💡 How to read this
Runner.Worker ← process on a path └─ npm └─ node ← process that acted └─ ○ npmjs[.]org ← observed actionfollow a path downward to see what ran and what it did — each path to an observed action is an execution chain
names on the path = processes · ○ = observed action · (…) = context
Workload behaviour (Garnet)
Garnet GVS bins PATH replay/replay· head273b744· 0 workload chains · 5 runner-platform chainsWorkload behaviour vs
ba67148: +0 −10 destinations−
registry.npmjs[.]org−
localhost−
github[.]com−
codeload.github[.]com−
nodejs[.]org−
node-registry.bit[.]cloud−
pnpm[.]io−
release-assets.githubusercontent[.]com−
unofficial-builds.nodejs[.]org−
npm.jsr[.]iorunner platform: +4 −21 destinations · not workload behaviour
0 workload chains · 0 destinations at head, 10 gone
codeload.github[.]comnodegithub[.]comgit-remote-http,nodelocalhostgit-remote-http,node,pacquet,pnprnode-registry.bit[.]cloudnodenodejs[.]orgnodenpm.jsr[.]ionodepnpm[.]ionoderegistry.npmjs[.]orgnode,pacquet,pnprrelease-assets.githubusercontent[.]comnodeunofficial-builds.nodejs[.]orgnoderunner platform · 5 chains · 4 destinations at head, 21 gone · no recorded workflow step
168.63.129.16python3.12,systemd-resolved169.254.169.254python3.1220.75.202.224provjobd3600285148ip6-allrouterssystemd-networkd140.82.112.22nginx140.82.113.21nginx140.82.114.21nginx169.254.169.123chronyd185.125.190.56chronyd185.125.190.57chronyd185.125.190.58chronyd192.168.127.1blacksmithd,sudo198.137.202.56chronyd23.143.196.204chronyd23.186.168.128chronyd5.161.94.12chronyd8.8.8.8nginx,systemd-resolve91.189.91.157chronydapi.snapcraft[.]iosnapdcloudfront.cdn.snapcraftcontent[.]comsnapdlocalhostRunner.Worker,node,php8.3,pnpm,snapd,sudonodejs[.]orgpnpmproductionresultssa15.blob.core[.]windowsnoderegistry.npmjs[.]orgpnpmunofficial-builds.nodejs[.]orgpnpmrecorded at the kernel by Garnet · profile view →