Skip to content

Commit e6f952d

Browse files
davidkonigsbergSwimburgerdevin-ai-integration[bot]
authored
fix(deps): add pnpm supply chain security hardening (#14421)
* chore: add pnpm supply chain security hardening - Add onlyBuiltDependencies allowlist (@sentry/cli, esbuild, puppeteer) - Set minimumReleaseAge to 1440 minutes (1 day) to block freshly published malicious versions - Exempt @fern-api/* and @fern-fern/* from release age requirement - Enable trustPolicy: no-downgrade to catch compromised maintainer accounts - Enable blockExoticSubdeps to prevent transitive deps from using git/tarball sources Context: axios supply chain attack (March 31, 2026) where compromised maintainer account published malicious versions with a hidden RAT via postinstall scripts. These settings would have prevented installation of the compromised versions. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: use trustPolicyIgnoreAfter instead of per-package exclusions Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 0dbc9b1 commit e6f952d

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

pnpm-workspace.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,37 @@ packages:
1111
- "!packages/cli/cli-v2/dist/dev"
1212
- "!packages/cli/cli-v2/dist/prod"
1313

14+
# Supply chain security settings
15+
# See: https://pnpm.io/settings
16+
onlyBuiltDependencies:
17+
- "@sentry/cli"
18+
- esbuild
19+
- puppeteer
20+
21+
# Require packages to be published for at least 1 day before they can be installed.
22+
# This mitigates supply chain attacks like the axios compromise (March 2026) where
23+
# malicious versions were published and removed within hours.
24+
minimumReleaseAge: 1440
25+
26+
# Exempt internal Fern packages from the release age requirement since they are
27+
# published and consumed frequently within the monorepo ecosystem.
28+
minimumReleaseAgeExclude:
29+
- "@fern-api/*"
30+
- "@fern-fern/*"
31+
32+
# Prevent trust level downgrades (e.g. a previously trusted-publisher package
33+
# losing its attestation). Catches compromised maintainer accounts.
34+
trustPolicy: no-downgrade
35+
36+
# Only enforce trust checks on versions published within the last day.
37+
# Older versions that lost attestation are unlikely to be supply chain attacks;
38+
# attacks target the install window immediately after compromise.
39+
trustPolicyIgnoreAfter: 1440
40+
41+
# Block transitive dependencies from using exotic sources (git repos, tarball URLs).
42+
# Only direct dependencies may use non-registry sources.
43+
blockExoticSubdeps: true
44+
1445
catalog:
1546
"@babel/core": ^7.29.0
1647
"@babel/preset-env": ^7.29.2

0 commit comments

Comments
 (0)