SKY-SCA-HRD001 · Supply chain and agent configuration
Change weakens install hardening
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/mainon 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
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
registry=https://registry.npmjs.org/Removed: ignore-scripts=trueAdded: ignore-scripts=false1 committed file the change leaves alone
{ "name": "shop", "version": "1.0.0", "dependencies": { "ms": "2.1.3" }}What Skylos leaves alone
registry=https://registry.npmjs.org/ignore-scripts=trueAdded: save-exact=true1 committed file the change leaves alone
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
[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
[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
- Runs with
--scain a diff scan (--diffor--diff-base). It takes the files Git tracks from both sides, the merge base and the working tree; untracked files never count. - 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), theca9library reads the settings of both sides and lists what got weaker. - Weaker means: install scripts allowed again (
ignore-scripts, BunignoreScripts, YarnenableScripts, pnpmstrictDepBuilds); a package added to an allow list for build scripts; a cooldown lowered or removed (npmmin-release-age, pnpmminimumReleaseAge, Yarn, Bun, uvexclude-newer, pipuploaded-prior-to, Dependabot, Renovate); a package excluded from a cooldown; and a CI action that was pinned to a commit and no longer is. - 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.
- 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. Ifca9cannot 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.
registry=https://registry.npmjs.org/Removed: ignore-scripts=falseAdded: ignore-scripts=trueWhen 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
~/.npmrcor 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 exampleesbuild = "needs its postinstall to fetch the binary".