Skip to content

fix(NOJIRA-1234): harden yarn configuration#15

Draft
tf-seti wants to merge 1 commit intomainfrom
appsec/harden-yarn-config
Draft

fix(NOJIRA-1234): harden yarn configuration#15
tf-seti wants to merge 1 commit intomainfrom
appsec/harden-yarn-config

Conversation

@tf-seti
Copy link
Copy Markdown
Contributor

@tf-seti tf-seti commented Apr 1, 2026

Harden yarn configuration

This PR hardens yarn configuration against recent supply chain attacks
(shai hulud,
shai hulud 2,
litellm,
axios).

Changes

.yarnrc security settings:

  • ignore-scripts true — blocks all postinstall script execution (RATs, cryptominers, credential exfiltration)
  • save-exact true — forces exact version pins on yarn add (no ^ prefix)

Dependabot cooldown (if npm ecosystem configured):

  • 7-day cooldown for all version updates (major, minor, patch)
  • Delays automated upgrade PRs, reducing exposure to recently published malicious versions

What you need to know

  • ignore-scripts applies to both yarn install and yarn add — postinstall scripts will not run in either case.
  • If your project needs postinstall scripts (e.g., husky, esbuild native binaries), run them explicitly:
    yarn rebuild esbuild    # rebuild native bindings
    npx husky install       # set up git hooks

References


Automated by Application Security · supply-chain-hardening batch change

Created by Sourcegraph batch change david.salvador/harden-yarn-config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants