import type { RuleModule } from '../../types'; /** * Validate that package names in lockfile match the resolved URL. * Detects package substitution attacks where an attacker replaces a legitimate * package with a malicious one by pointing to a different package in the URL. * * Example attack: * Package key: meow@1.0.0 * Resolved URL: https://registry.npmjs.org/meowlicious/-/meow-4.0.1.tgz * The URL points to a different package (meowlicious) than expected (meow). * * Options: * - aliases: Object mapping package names to allowed URL names * Example: { 'foo': 'foo-package' } allows 'foo' to resolve to 'foo-package' * * Example config: * ```ts * pluginRules: { * 'lockfile/validate-package-names': ['error', { aliases: {} }] * } * ``` */ export declare const validatePackageNames: RuleModule;