Workflows: publish and merge-gate leave a write-scoped token in .git/config while npm install scripts run
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- github-actions, typescript
Direzione di ricerca
Read .github/workflows/release-cli.yml and .github/workflows/ci.yml, focusing on the publish and merge-gate checkouts and the later npm ci steps. Set persist-credentials: false for both checkouts, then verify neither job relies on the stored credential for a Git operation; pull request #282 is already open against this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Two jobs check out the repository with the default persist-credentials: true while their GITHUB_TOKEN has a write scope, then run npm ci with install scripts enabled:
| Workflow | Job | Token scopes | Later step that runs third-party code |
|---|---|---|---|
release-cli.yml |
publish |
contents: write, id-token: write |
npm ci --no-audit --fund=false in packages/diffci-cli (scripts on) |
ci.yml |
merge-gate |
checks: write |
npm ci --no-audit --fund=false in packages/diffci-cli (scripts on) |
actions/checkout writes the job token into .git/config as an http.https://github.com/.extraheader entry, where every later step in the job can read it, including a dependency's preinstall/postinstall script. In publish that token can push to main, move tags and edit releases.
Neither job needs the stored credential:
publishcreates the GitHub Release, theaction-vtag and the release assets throughgh/the API withGH_TOKEN, andGIT_SSH_COMMANDis already/bin/false. Its only git commands read history (rev-parse), and its checkout hasfetch-depth: 0, so the Action smoke never fetches.merge-gateposts its check run with the Action'sgithub-tokeninput. The Action's--unshallowfetch of a public repository works without credentials.
scorecard.yml, codeql.yml and rust-replay.yml already set persist-credentials: false. credit-contributors.yml needs the stored token because it runs git push.
Reproduce
grep -n -A3 'actions/checkout' .github/workflows/release-cli.yml: the publish job's checkout sets only fetch-depth: 0, and the job has contents: write. The same is true for merge-gate in ci.yml, with checks: write.
Expected: a job whose token can write, and that does not git push, checks out with persist-credentials: false.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 4
- Merge medio
- 18h 41m
- PR unite (30g)
- 48
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DiffCI/core
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at randomForse già presa @FredApps l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Agent tools: changed_files lists only the new path of a renamed fileForse già presa @FredApps l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
DiffCI/core#243 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
adapter good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
agent-ready area: ui-server priority: p3 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
schlessera/brain-kit#4249 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation tool triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
can1357/oh-my-pi#19608 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bcgov/nr-waste-plus#1549 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-tx-parse#18 ·