Hub rules-npm

rules-npm

v3 public Verified

npm

npm is the default package manager for Node.js, enabling developers to share and reuse code. These rules govern dependency management, script execution, and secure package publishing for AI agents.

@sigmashakeinc 2 pulls 14 rules published Apr 8, 2026 synced Oct 27, 2026 sigmashakeinc/rules/rulesets/rules-npm →
Severity
6 error 8 warn 0 info
demo.cast
npm is the default package manager for Node.js, enabling developers to share and reuse code. These rules govern dependency management, script execution, and secure package publishing for AI agents.

Rules index

14 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

npm

ask-audit-fix-force warning ask

'npm audit fix --force' can install breaking changes by upgrading across major versions. It may break your project in non-obvious ways.

Rule source requires an active Pro or Enterprise subscription.
ask-npm-deprecate warning ask

Deprecating an npm package version affects all users who install or update that version. Confirm the deprecation message is accurate.

Rule source requires an active Pro or Enterprise subscription.
ask-npm-install-url warning ask

Installing a package directly from a URL or VCS reference bypasses npm registry integrity verification. The source may be unaudited, mutable, or non-reproducible.

Rule source requires an active Pro or Enterprise subscription.
ask-npm-link warning ask

'npm link' symlinks a local package into node_modules, bypassing normal version resolution. A development build can silently be injected into a dependency tree that expects a published version.

Rule source requires an active Pro or Enterprise subscription.
ask-npm-publish warning ask

Publishing to npm is permanent (except within 72 hours). Verify the version, build output, and .npmignore before publishing.

Rule source requires an active Pro or Enterprise subscription.
ask-npmrc-custom-registry warning log

Custom npm registry detected in .npmrc. Redirecting to a non-official registry can enable dependency confusion attacks if the private registry does not prevent public package shadowing.

Rule source requires an active Pro or Enterprise subscription.
ask-npx-unversioned warning ask

Running a package with npx without a pinned version always fetches the latest release. A compromised maintainer account or hijacked package could execute malicious code in your project.

Rule source requires an active Pro or Enterprise subscription.
ask-postinstall-script warning log

Install lifecycle script detected. postinstall/preinstall scripts run automatically on 'npm install' in any project that depends on this package — a common supply-chain attack vector.

Rule source requires an active Pro or Enterprise subscription.
no-caret-or-tilde-deps error block

Caret (^) and tilde (~) version ranges are banned. Use exact version pins (e.g., "1.2.3") to ensure reproducible installs across all environments.

Rule source requires an active Pro or Enterprise subscription.
no-edit-lockfile error block

Lockfiles must not be hand-edited. They are machine-generated. Run 'npm install' (or yarn/bun/pnpm equivalent) to regenerate after changing package.json.

Rule source requires an active Pro or Enterprise subscription.
no-npm-unpublish error block

npm unpublish is blocked. Removing published packages breaks anyone depending on that version and cannot be undone after 72 hours. Use 'npm deprecate' to discourage use without removing.

Rule source requires an active Pro or Enterprise subscription.
no-npmrc-authtoken error block

Hardcoded npm auth token detected in .npmrc. Tokens committed to source control expose registry credentials to anyone with repo access. Use environment variable substitution instead: //registry.npmjs.org/:_authToken=${NPM_TOKEN}

Rule source requires an active Pro or Enterprise subscription.
no-npmrc-password error block

Plaintext password detected in .npmrc. Store credentials using 'npm login' or environment variables, never as a plaintext value in source control.

Rule source requires an active Pro or Enterprise subscription.
no-star-version error block

Wildcard version (*) in package.json resolves to whatever is latest at install time, making builds non-reproducible. Use an exact version.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 27, 2026
Hash
122c0526fde1835cb029b7de8535f53426796390b4d53dec24965f545e23d015
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-npm/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-npm. The published version only bumps when a maintainer resyncs.

No commit history available.