From add590f61edec4678fad354d43be17d868df7b63 Mon Sep 17 00:00:00 2001 From: David McHale Date: Tue, 19 May 2026 06:11:47 -0600 Subject: [PATCH 1/2] chore: add main field, expand files, expand README, add bundlephobia badge --- README.md | 53 ++++++++++++++++++++++++++++++++++++---------------- package.json | 6 +++++- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e7bb42a..87dbe8e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,18 @@ # @hailbytes/asm-scope-parser -> Parses and normalizes attack surface scope definitions: IP ranges, CIDR, domains, wildcards, and exclusions. +> Parses and normalizes attack surface scope definitions: IP ranges, CIDR, domains, wildcards, and exclusions. Framework-agnostic, zero-dependency. [![npm version](https://img.shields.io/npm/v/%40hailbytes%2Fasm-scope-parser.svg)](https://www.npmjs.com/package/%40hailbytes%2Fasm-scope-parser) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) +[![Bundle Size](https://img.shields.io/bundlephobia/minzip/%40hailbytes%2Fasm-scope-parser)](https://bundlephobia.com/package/@hailbytes/asm-scope-parser) + +--- + +## What it does + +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. + +--- ## Install @@ -11,32 +20,44 @@ npm install @hailbytes/asm-scope-parser ``` -## Who Is This For - -Pentesters, bug bounty hunters, and ASM platform engineers who need a reliable, framework-agnostic way to parse and validate scope definitions. +--- -## API +## Quick Start ```ts import { parseScope } from '@hailbytes/asm-scope-parser'; -const scope = parseScope(['10.0.0.0/8', '*.example.com', '!192.168.1.0/24']); - -scope.includes('10.1.2.3'); // true -scope.excludes('192.168.1.5'); // true -scope.toCIDR(); // string[] -scope.toJSON(); // NormalizedScope +// 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 object ``` +--- + +## Who Is This For + +Pentesters, bug bounty hunters, and ASM platform engineers who need a reliable, framework-agnostic way to parse and validate scope definitions from diverse sources. + +--- + ## See Also -- [@hailbytes/sbom-diff](https://github.com/HailBytes/sbom-diff) -- [@hailbytes/phishing-template-linter](https://github.com/HailBytes/phishing-template-linter) +- [`@hailbytes/sbom-diff`](https://github.com/HailBytes/sbom-diff) — Diff CycloneDX/SPDX SBOMs +- [`@hailbytes/phishing-template-linter`](https://github.com/HailBytes/phishing-template-linter) — Lint GoPhish email templates - [HailBytes Platform](https://hailbytes.com) -## Links - -- [hailbytes.com](https://hailbytes.com) --- *Part of the [HailBytes](https://hailbytes.com) open-source security toolkit.* diff --git a/package.json b/package.json index 3ad7349..2e94245 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "url": "https://github.com/HailBytes/asm-scope-parser/issues" }, "homepage": "https://hailbytes.com", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { ".": { "import": "./dist/index.js", @@ -32,7 +34,9 @@ } }, "files": [ - "dist" + "dist", + "README.md", + "LICENSE" ], "scripts": { "build": "tsc", From 6396e372dac47ca5cff129da88a0ff75b1f90911 Mon Sep 17 00:00:00 2001 From: David McHale Date: Tue, 19 May 2026 06:42:21 -0600 Subject: [PATCH 2/2] chore: bump to v1.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2e94245..d284b82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hailbytes/asm-scope-parser", - "version": "0.0.1", + "version": "1.0.1", "description": "Parses and normalizes attack surface scope definitions: IP ranges, CIDR, domains, wildcards, and exclusions. Framework-agnostic, zero-dependency.", "type": "module", "license": "MIT",