@hailbytes/vulnerability-calculator 1.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/CHANGELOG.md +22 -0
- package/LICENSE +374 -0
- package/README.md +299 -0
- package/hailbytes-vuln-calculator.js +862 -0
- package/index.d.ts +58 -0
- package/package.json +61 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type declarations for @hailbytes/vulnerability-calculator.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface VulnInputs {
|
|
6
|
+
target_hosts: number;
|
|
7
|
+
scan_intensity: 'light' | 'medium' | 'aggressive' | 'continuous' | string;
|
|
8
|
+
scan_frequency: 'daily' | 'weekly' | 'monthly' | 'quarterly' | string;
|
|
9
|
+
time_pressure?: 'light' | 'medium' | 'aggressive' | 'continuous' | string;
|
|
10
|
+
scanning_tools: string[];
|
|
11
|
+
compliance_needs?: string[];
|
|
12
|
+
[extra: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface VMResources {
|
|
16
|
+
cpu: number;
|
|
17
|
+
ram: number;
|
|
18
|
+
storage: number;
|
|
19
|
+
[extra: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface VulnResult {
|
|
23
|
+
vm_resources: VMResources;
|
|
24
|
+
timing: Record<string, unknown>;
|
|
25
|
+
costs: Record<string, unknown>;
|
|
26
|
+
recommendations: string[];
|
|
27
|
+
has_asm: boolean;
|
|
28
|
+
inputs: VulnInputs;
|
|
29
|
+
timestamp: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Pure infrastructure-sizing calculation — no DOM required.
|
|
34
|
+
*/
|
|
35
|
+
export function calculate(inputs: VulnInputs): VulnResult;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The custom-element class. Importing this module also registers
|
|
39
|
+
* the `<hailbytes-vuln-calculator>` tag via `customElements.define`.
|
|
40
|
+
*
|
|
41
|
+
* Supported attributes:
|
|
42
|
+
* - `theme="dark"|"light"` (default: `"dark"`)
|
|
43
|
+
* - `branding="off"` hides the "by HailBytes" footer + header badge
|
|
44
|
+
*/
|
|
45
|
+
export default class HailbytesVulnCalculator extends HTMLElement {
|
|
46
|
+
static readonly observedAttributes: readonly string[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { HailbytesVulnCalculator };
|
|
50
|
+
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementTagNameMap {
|
|
53
|
+
'hailbytes-vuln-calculator': HailbytesVulnCalculator;
|
|
54
|
+
}
|
|
55
|
+
interface HTMLElementEventMap {
|
|
56
|
+
'vuln-calculated': CustomEvent<VulnResult>;
|
|
57
|
+
}
|
|
58
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hailbytes/vulnerability-calculator",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Zero-dependency web component for sizing vulnerability scanning infrastructure. Estimates VM sizing, cloud costs, and timing across AWS/Azure.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./hailbytes-vuln-calculator.js",
|
|
7
|
+
"module": "./hailbytes-vuln-calculator.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"import": "./hailbytes-vuln-calculator.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"hailbytes-vuln-calculator.js",
|
|
18
|
+
"index.d.ts",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"./hailbytes-vuln-calculator.js"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "node --test test/smoke.test.mjs"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"vulnerability",
|
|
31
|
+
"vulnerability-scanner",
|
|
32
|
+
"vulnerability-calculator",
|
|
33
|
+
"attack-surface-management",
|
|
34
|
+
"infrastructure-calculator",
|
|
35
|
+
"cybersecurity",
|
|
36
|
+
"risk-calculator",
|
|
37
|
+
"web-component",
|
|
38
|
+
"custom-element",
|
|
39
|
+
"es-module",
|
|
40
|
+
"zero-dependency",
|
|
41
|
+
"hailbytes",
|
|
42
|
+
"vanilla-js"
|
|
43
|
+
],
|
|
44
|
+
"author": "HailBytes, LLC (https://hailbytes.com)",
|
|
45
|
+
"license": "MPL-2.0",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/HailBytes/vulnerability-calculator.git"
|
|
49
|
+
},
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/HailBytes/vulnerability-calculator/issues"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://hailbytes.com/asm",
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public",
|
|
59
|
+
"provenance": true
|
|
60
|
+
}
|
|
61
|
+
}
|