xploitscan-shared-rules 1.36.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # xploitscan-shared-rules
2
2
 
3
- Shared XploitScan rule definitions, helpers, compliance mappings, the AI false-positive filter, and the entropy-based secret scanner.
3
+ XploitScan's scan engine, the 30 free rule definitions, compliance mappings, the AI false-positive filter, and the entropy-based secret scanner.
4
4
 
5
- This package is the source of truth for XploitScan's detection logic. It's consumed by the [XploitScan CLI](https://www.npmjs.com/package/xploitscan), the [XploitScan MCP server](https://www.npmjs.com/package/xploitscan-mcp), the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=XploitScan.xploitscan-vscode), the web scan API at [xploitscan.com](https://xploitscan.com), and the [XploitScan GitHub Action](https://github.com/marketplace/actions/xploitscan-security-scanner) — one source of detection logic behind every surface.
5
+ This package is the public half of XploitScan's detection logic. It's consumed by the [XploitScan CLI](https://www.npmjs.com/package/xploitscan), the [XploitScan MCP server](https://www.npmjs.com/package/xploitscan-mcp), the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=XploitScan.xploitscan-vscode), the web scan API at [xploitscan.com](https://xploitscan.com), and the [XploitScan GitHub Action](https://github.com/marketplace/actions/xploitscan-security-scanner) — one source of detection logic behind every surface.
6
6
 
7
7
  ## What's in here
8
8
 
9
- - **214 rules** — pattern + AST-based detection for hardcoded secrets, SQL injection, XSS, SSRF, prototype pollution, crypto misuse, deserialization, JWT alg confusion, and more.
10
- - **Compliance mappings** — each rule tagged with its OWASP Top 10 (2021) category and CWE ID.
9
+ - **The 30 free rules** — pattern + AST-based detection for hardcoded secrets, SQL injection, XSS, missing auth, unprotected Stripe webhooks, CORS wildcards, weak hashing, disabled TLS verification, and more. The other 184 of XploitScan's 214 rules are Pro rules. They are not in this package: the CLI, GitHub Action, MCP server and VS Code extension download them with a paid plan's API key, and the web scanner runs them for paid accounts.
10
+ - **Compliance mappings** — every one of the 214 rules tagged with its OWASP Top 10 (2021) category and CWE ID.
11
11
  - **AI false-positive filter** — optional Claude Haiku integration that re-evaluates findings to suppress benign matches before reporting.
12
12
  - **Entropy-based secret scanner** — detects high-entropy strings that look like credentials but don't match a known service-key pattern.
13
13
 
@@ -22,13 +22,15 @@ pnpm add xploitscan-shared-rules
22
22
  ## Usage
23
23
 
24
24
  ```ts
25
- import { runCustomRules, proOnlyRules, calculateGrade } from "xploitscan-shared-rules";
25
+ import { runCustomRules, calculateGrade } from "xploitscan-shared-rules";
26
26
 
27
- // "pro" + proOnlyRules runs every rule (free + Pro)
28
- const findings = runCustomRules(sourceCode, filePath, [], "pro", proOnlyRules);
27
+ // Runs the 30 free rules.
28
+ const findings = runCustomRules(sourceCode, filePath);
29
29
  const { grade, score } = calculateGrade(findings, 1);
30
30
  ```
31
31
 
32
+ **2.0.0 is a breaking release.** It removes `allCustomRules`, `proOnlyRules` and every Pro rule object from the exports. `FREE_RULE_COUNT`, `PRO_RULE_COUNT` and `TOTAL_RULE_COUNT` are still exported as plain numbers.
33
+
32
34
  For the full API surface, see the TypeScript definitions in `dist/index.d.ts` (shipped with the package).
33
35
 
34
36
  ## Most users want the CLI, not this package