Subscribe free
Morning Merge Security · Monday, November 23, 20263 min read

pnpm 11.29 and 12.23 close a publish token leak

Also: 31,088 secrets in Claude Code settings, and YAML that only Actions accepts

If you publish with pnpm, upgrade to 11.29.0 or 12.23. Earlier releases let a repository get pnpm publish to send your npm token to a registry it chose.

Then two reminders that your tools don't always see what you think they see.

The main thing

A green lens finds one crate wired to the floor, held at a lowered gate arm

pnpm 11.29 stops a repository from steering your publish token. The headline fix is about otp. A repository could write otp: ${NPM_TOKEN} beside its own registry:, and pnpm publish sent that environment variable to the registry the same file named, in the npm-otp header of its first request.

That's the weird part: a one-time password field became a way to ship a secret, because config values expand environment variables.

Starting with pnpm 11.29.0, otp is no longer read from any config file. Pass --otp on the command line or set PNPM_CONFIG_OTP. A pnpm-workspace.yaml or global config.yaml that carries otp is ignored, with a warning.

The rest of the security list tightens installs:

On the 12.x line, pnpm 12.23 carries the same otp change and the HTTPS-only credentials fix. It also removes platform variants, so a frozen install of a lockfile that records them fails with ERR_PNPM_BROKEN_LOCKFILE until you run pnpm install again.

What to do: upgrade to 11.29.0 or 12.23. Search CI and workspace config for otp and move it to --otp or PNPM_CONFIG_OTP. If you set blockExoticSubdeps: true, expect lockfiles with git or tarball subdependencies to stop passing. That's the setting finally covering the lockfile.

Secrets in the settings file

A green lens finds a brass key filed between index cards on an open shelf

GitGuardian puts a bigger number on Claude Code's settings leak. We ran Apiiro's finding on November 8: 1,122 secrets in .claude/settings.local.json files in public repositories. InfoQ's write-up adds GitGuardian's count of 31,088 secrets in that file on public GitHub, 5,343 still valid when found, plus 613 in Docker Hub images.

The mechanism is mundane. Answer "Yes, and don't ask again" to a shell command, and Claude Code saves the command as a permanent permission rule in that file. Type a password inline, and the password is in the rule.

Claude Code adds the file to your global git ignore list when it creates it inside a repo. Apiiro says that misses a folder that becomes a repo later, a clone on another machine, or a file already committed, and that Claude Code sometimes committed the file itself.

Gitleaks and TruffleHog missed many of these, mostly because the secrets sat inside shell commands.

What to do: Apiiro recommends git rm --cached .claude/settings.local.json, adding the file to the repo's own .gitignore, and rotating every credential it has ever held. Then delete any rule that contains a secret and reference secrets through environment variables instead of typing them.

Two parsers, one workflow

A green lens shows one gear tooth slightly out of line with its neighbor

GitHub Actions accepts YAML that the spec rejects. The post traces zizmor#1116 to a multi-line, single-quoted flow string whose closing }' sits at the same indentation as its parent key. YAML 1.2.2 § 8.2.3 says flow nodes must be indented at least one more space. Actions runs it anyway; a conforming parser refuses it.

The author's best guess is that Actions parses with YamlDotNet 5.3.0, released in 2018, and that even 18.1.0 still has the bug. A 2020 patch apparently fixed only the double-quoted form, likely because YAML's official test suite checks that rule only with a double-quoted string.

This matters if you audit workflows with your own tooling. A spec-conforming scanner will reject some workflows that Actions runs, and a workflow your scanner couldn't parse is unscanned, not clean. The fix in your own files costs one space: indent the closing line further.

Upgrade pnpm before your next publish, then check what your agent has been writing into .claude/settings.local.json.

← All Morning Merge Security issues

Get this in your inbox every morning.

Free. Five minutes. Unsubscribe in one click.

Subscribe free →