Skip to main content

SKY-SCA-HRD001 · Supply chain and agent configuration

Change weakens install hardening

High

Install hardening is the set of package-manager settings that make installs safer: blocking install scripts, waiting a few days before using a new release (a cooldown), and pinning CI actions to a commit. SKY-SCA-HRD001 reports a pull request that turns one of these off or makes it weaker.

Languages
.npmrc, package.json, pnpm-workspace.yaml, .yarnrc.yml, bunfig.toml, uv.toml, pyproject.toml, pip.conf, requirements*.txt, Dependabot, Renovate, GitHub Actions workflows
Turned on by
skylos . --sca --diff origin/main on a pull request
Quality gate
Full scan: not checked. Diff scan: fails the gate on its own. In a diff scan one finding fails the gate on its own, whatever the limits. It only runs in diff scans.
Finding type
review
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

These settings stop most malicious releases before they run: an install script cannot run if scripts are blocked, and a cooldown keeps a hijacked version out until it has been found and removed. A one-line change to .npmrc in an unrelated pull request removes that protection for every developer and CI runner.

What Skylos flags

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

.npmrc · INI · changed
registry=https://registry.npmjs.org/Removed: ignore-scripts=trueAdded: ignore-scripts=false
1 committed file the change leaves alone
package.json · JSON
{  "name": "shop",  "version": "1.0.0",  "dependencies": {    "ms": "2.1.3"  }}

What Skylos leaves alone

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

.npmrc · INI · changed
registry=https://registry.npmjs.org/ignore-scripts=trueAdded: save-exact=true
1 committed file the change leaves alone

package.json: same as in the flagged example.

Why Skylos leaves it alone

The pull request edits .npmrc too, but install scripts stay blocked. Adding save-exact changes how versions are written, not what may run.

More languages

TOML

Flagged

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

pyproject.toml · TOML · changed
[project]name = "worker"version = "1.0.0"dependencies = ["six==1.17.0"] [tool.uv]Removed: exclude-newer = "7 days"Added: exclude-newer = "1 day"

Not flagged

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

pyproject.toml · TOML · changed
[project]name = "worker"version = "1.0.0"dependencies = ["six==1.17.0"] [tool.uv]Removed: exclude-newer = "7 days"Added: exclude-newer = "14 days"

Why Skylos leaves it alone

uv's exclude-newer cooldown changed, but it got longer: uv now ignores releases newer than 14 days instead of 7.

How Skylos decides

  1. Runs with --sca in a diff scan (--diff or --diff-base). It takes the files Git tracks from both sides, the merge base and the working tree; untracked files never count.
  2. When a hardening file changed (.npmrc, package.json, pnpm-workspace.yaml, .yarnrc.yml, bunfig.toml, uv.toml, pyproject.toml, pip.conf, requirements files, Dependabot and Renovate settings, or GitHub workflows and actions), the ca9 library reads the settings of both sides and lists what got weaker.
  3. Weaker means: install scripts allowed again (ignore-scripts, Bun ignoreScripts, Yarn enableScripts, pnpm strictDepBuilds); a package added to an allow list for build scripts; a cooldown lowered or removed (npm min-release-age, pnpm minimumReleaseAge, Yarn, Bun, uv exclude-newer, pip uploaded-prior-to, Dependabot, Renovate); a package excluded from a cooldown; and a CI action that was pinned to a commit and no longer is.
  4. Each tool's units are respected, so pnpm minutes and npm days are not mixed up. A removed cooldown is not reported when the tool's own default is at least as long.
  5. Skips a package listed in [tool.skylos.supply_chain.hardening_exceptions] with a reason, read from the base commit only, so a pull request cannot add its own exception. If ca9 cannot compare the settings, the scan stops as incomplete instead of passing.

How to fix it

Keep the setting. If one package really needs its install script, allow that package by name (pnpm allowBuilds, Bun trustedDependencies) instead of turning scripts back on for everything, and record the reviewed exception on the base branch first, in its own pull request.

.npmrc · INI · the fix, against the flagged file
registry=https://registry.npmjs.org/Removed: ignore-scripts=falseAdded: ignore-scripts=true

When it can be wrong

  • A cooldown written as an absolute date, such as uv exclude-newer = "2026-01-01", is not compared, so moving the date forward is not reported.
  • Hardening that lives outside the repository, such as a developer's own ~/.npmrc or a CI runner's environment variables, is not seen.

Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.

How to silence it

  • [tool.skylos] ignore = ["SKY-SCA-HRD001"] turns the rule off. In pull-request CI the setting is read from the base branch, so it must be merged first.

  • For one package, add it with a reason under [tool.skylos.supply_chain.hardening_exceptions] on the base branch, for example esbuild = "needs its postinstall to fetch the binary".

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.