Publish job persists a write credential where core's unpinned scripts can read it
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- git, github-actions, typescript
Línea de trabajo
Lee .github/workflows/publish.yml, .github/actions/bump-versions-action/action.yml, lib/bump-versions.ts y .github/workflows/bump-versions.yml. Comprueba cómo gestionan las credenciales tanto los checkouts de publish como la action, y luego ejecuta las comprobaciones de lint y YAML mencionadas. Está terminado cuando el workflow de publish ya no expone credenciales persistentes, mientras que la actualización de versiones sigue autenticándose mediante la entrada con alcance limitado de la action, y el segundo invocador se ha actualizado según sea necesario.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The publish job checks out this repo with credentials persisted, then runs two npm scripts from an unpinned external branch in the same runner. Those scripts can read the checkout's http.extraheader and reuse the job's contents: write token against this repository.
Detail
.github/workflows/publish.yml checks out extension-repo without persist-credentials: false, so extension-repo/.git/config carries an AUTHORIZATION: basic <base64 x-access-token:GITHUB_TOKEN> header. The job grants contents: write.
The same job then checks out paranext/paranext-core with no ref, resolving to whatever its default branch HEAD is at run time, and executes two core-owned scripts before the release is created:
npm run stage-dev-packagesnpm run verify:dev-packages
npm ci --ignore-scripts does not cover these — they are explicit invocations, added deliberately because the install skips lifecycle scripts.
A malicious or compromised core revision could read the sibling checkout's git config, extract the header, and push to this repository.
Why this workflow specifically
Every other workflow already sets persist-credentials: false on its own checkout — test.yml, lint.yml, codeql.yml. publish.yml is the only one that does not, and the only one with contents: write. This is a gap in an otherwise consistent pattern, not a missing convention.
Mitigating factors
workflow_dispatchonly, so a maintainer has to trigger it.- The unpinned core ref is deliberate and documented in-workflow; this issue is about the credential, not the floating ref. Pinning core for release builds only would make release builds diverge from what CI validated.
The two halves are coupled
persist-credentials: false alone breaks the version bump. lib/bump-versions.ts runs git push -u origin HEAD, which authenticates through exactly the header being removed. So the fix has to be:
persist-credentials: falseon bothextension-repocheckouts inpublish.yml— the second one matters too, sinceclean: falsereuses the directory and would otherwise re-persist the credential.bump-versions-actiontakes atokeninput and configures the credential itself, scoped to that one step.
Neither half ships alone.
Upstream consideration
.github/actions/bump-versions-action/action.yml is currently byte-identical to paranext-extension-template. publish.yml has already diverged substantially and is effectively repo-owned, but the action has not.
That means the vulnerability is template-wide — any extension repo built on this template has the same publish-job shape — and a local-only fix to the action creates a conflict surface on every future template merge. Worth deciding whether the action half belongs upstream before patching it here.
Verification already done
A prototype of the above was built and reverted (it was noticed on merge-template, which should stay a clean template merge). Confirmed during that work:
- Restore-on-exit logic tested under bash: token live during the run; header removed where none pre-existed, restored to the persisted value where one did, and restored on failure.
ncipollo/release-actiondefaultstokento${{ github.token }}and authenticates via the API, not the checkout — the release step is unaffected by dropping persisted credentials..github/workflows/bump-versions.ymlis a second caller of the action; it checks out no external repo so has no exposure, but it would need the new input passed.npm run lintpassed; all YAML parsed.
Nothing was run in CI.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 0
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 74
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sillsdev/interlinearizer-extension
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
sillsdev/interlinearizer-extension#552 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
sillsdev/interlinearizer-extension#548 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sillsdev/interlinearizer-extension#543 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
sillsdev/interlinearizer-extension#537 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
sillsdev/interlinearizer-extension#515 ·
Los mantenedores suelen responder en 1 día
Todos los issues de sillsdev/interlinearizer-extension
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
guards: accept readonly arrays (and other array-likes) in isEmpty / hasElements / safeLengthAbiertoenhancement tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
privatenumber/tsx#866 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
danielmiessler/LifeOS#2533 ·
Los mantenedores suelen responder en 9 días
-
auto:producer auto:uiux
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fritzprix/libr-agent#2447 ·
Los mantenedores suelen responder en 1 día