# Risk map — lerna/lerna

> Canonical page: https://codevetter.com/unpack/lerna/risk-map

# Risk map — lerna/lerna

Scanned commit ce3e38f2889b26573f1b38cfb487546903292158 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

These are source observations and explicitly labeled hypotheses, not confirmed vulnerabilities. Lerna intentionally executes workspace-controlled commands and writes release artifacts, so trust boundaries include configuration, scripts, Git, and registries. Release operations span several independent systems and are not presented as one atomic transaction. Inspection also found narrow authentication tests and strong coupling to Nx internals.
- exec joins command and arguments into shell-interpreted text, uses shell=true, and copies the parent environment into package processes; callers must treat supplied command text as executable input. — [libs/commands/exec/src/index.ts#L48-70](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/exec/src/index.ts#L48-L70) [libs/commands/exec/src/index.ts#L122-147](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/exec/src/index.ts#L122-L147)
- Configuration can execute code: applyExtends requires resolved modules, changelog presets use require/import and callable builders, and lifecycle scripts run through @npmcli/run-script unless ignored. — [libs/core/src/lib/project/apply-extends.ts#L11-29](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/project/apply-extends.ts#L11-L29) [libs/core/src/lib/conventional-commits/get-changelog-config.ts#L134-170](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/conventional-commits/get-changelog-config.ts#L134-L170) [libs/core/src/lib/run-lifecycle.ts#L75-90](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/run-lifecycle.ts#L75-L90) [libs/core/src/lib/run-lifecycle.ts#L132-144](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/run-lifecycle.ts#L132-L144)
- Publishing deliberately writes archives beneath the system temporary directory, and configured contents/assets influence filesystem destinations; the inspected contents setter uses string-prefix selection and path joining rather than a containment check. — [libs/core/src/lib/temp-write.ts#L11-13](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/temp-write.ts#L11-L13) [libs/core/src/lib/temp-write.ts#L33-43](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/temp-write.ts#L33-L43) [libs/core/src/lib/package.ts#L203-226](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/package.ts#L203-L226) [libs/commands/publish/src/index.ts#L1182-1221](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/publish/src/index.ts#L1182-L1221)
- Publish restoration defaults to enabled, but granularPathspec=false makes gitCheckout target '.'; import failure recovery invokes git am --abort and git reset --hard to the saved HEAD. — [libs/commands/publish/src/index.ts#L155-158](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/publish/src/index.ts#L155-L158) [libs/core/src/lib/git-checkout.ts#L14-20](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/git-checkout.ts#L14-L20) [libs/commands/import/src/index.ts#L307-312](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/import/src/index.ts#L307-L312)
- Hypothesis: a later failure can leave earlier release side effects in place because ordinary publish awaits composed versioning before registry upload, and version executes writes, tags, pushes, and hosted releases sequentially. (inferred) — [libs/commands/publish/src/index.ts#L324-332](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/publish/src/index.ts#L324-L332) [libs/commands/publish/src/index.ts#L380-400](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/publish/src/index.ts#L380-L400) [libs/commands/version/src/index.ts#L370-405](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/version/src/index.ts#L370-L405)
- Run and repair import nx/src internal APIs, while publish/version share preinitialized graph data; dependency upgrades therefore affect execution contracts beyond the public @nx/devkit interface. — [libs/commands/run/src/index.ts#L22-23](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/run/src/index.ts#L22-L23) [libs/commands/run/src/index.ts#L315-322](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/run/src/index.ts#L315-L322) [packages/lerna/src/commands/repair/index.ts#L1-4](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/packages/lerna/src/commands/repair/index.ts#L1-L4) [libs/core/src/lib/command/index.ts#L129-140](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/command/index.ts#L129-L140)
- OIDC exchanges identity tokens against the effective registry and suppresses exchange failures before normal publish authentication continues; GitHub acquisition and provenance branches are not exercised by the two cases in the inspected OIDC suite. — [libs/core/src/lib/oidc.ts#L68-99](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/oidc.ts#L68-L99) [libs/core/src/lib/oidc.ts#L125-146](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/oidc.ts#L125-L146) [libs/core/src/lib/oidc.ts#L170-193](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/oidc.ts#L170-L193) [libs/core/src/lib/oidc.spec.ts#L38-69](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/oidc.spec.ts#L38-L69)
- Release workflow protections include nonpersisted checkout credentials, a pinned npm registry, disabled remote build cache, serialized releases, environment-scoped Git credentials, and validation of free-text version input; their live environment configuration was not verified. — [.github/workflows/release.yml#L41-70](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/.github/workflows/release.yml#L41-L70) [.github/workflows/release.yml#L85-116](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/.github/workflows/release.yml#L85-L116)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
