Parses and normalizes attack surface scope definitions: IP ranges, CIDR, domains, wildcards, and exclusions. Framework-agnostic, zero-dependency.
Parse and normalize attack surface scope definitions from any source — bug bounty programs, penetration test briefs, ASM platforms. Handles IPv4/IPv6, CIDR ranges, domain wildcards, and exclusion rules. Zero dependencies.
npm install @hailbytes/asm-scope-parserimport { parseScope } from '@hailbytes/asm-scope-parser';
// 1. Parse a mixed scope definition
const scope = parseScope([
'10.0.0.0/8',
'*.example.com',
'!192.168.1.0/24', // exclusion
]);
// 2. Check membership
scope.includes('10.1.2.3'); // true
scope.includes('192.168.1.5'); // false (excluded)
scope.excludes('192.168.1.5'); // true
// 3. Export
scope.toCIDR(); // string[] of all CIDR ranges
scope.toJSON(); // NormalizedScope objectPentesters, bug bounty hunters, and ASM platform engineers who need a reliable, framework-agnostic way to parse and validate scope definitions from diverse sources.
@hailbytes/sbom-diff— Diff CycloneDX/SPDX SBOMs@hailbytes/phishing-template-linter— Lint GoPhish email templates- HailBytes Platform
Part of the HailBytes open-source security toolkit.