@zerothreatai/vulnerability-registry 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.
Files changed (76) hide show
  1. package/dist/categories/authentication.d.ts +8 -0
  2. package/dist/categories/authentication.js +375 -0
  3. package/dist/categories/configuration.d.ts +8 -0
  4. package/dist/categories/configuration.js +903 -0
  5. package/dist/categories/injection.d.ts +8 -0
  6. package/dist/categories/injection.js +747 -0
  7. package/dist/categories/sensitive-paths.d.ts +9 -0
  8. package/dist/categories/sensitive-paths.js +1788 -0
  9. package/dist/categories/ssrf.d.ts +8 -0
  10. package/dist/categories/ssrf.js +247 -0
  11. package/dist/categories/xss.d.ts +7 -0
  12. package/dist/categories/xss.js +325 -0
  13. package/dist/error-codes.d.ts +242 -0
  14. package/dist/error-codes.js +312 -0
  15. package/dist/index.d.ts +60 -0
  16. package/dist/index.js +92 -0
  17. package/dist/types.d.ts +86 -0
  18. package/dist/types.js +6 -0
  19. package/dist-cjs/categories/authentication.js +378 -0
  20. package/dist-cjs/categories/configuration.js +906 -0
  21. package/dist-cjs/categories/injection.js +750 -0
  22. package/dist-cjs/categories/sensitive-paths.js +1791 -0
  23. package/dist-cjs/categories/ssrf.js +250 -0
  24. package/dist-cjs/categories/xss.js +328 -0
  25. package/dist-cjs/error-codes.js +315 -0
  26. package/dist-cjs/index.js +107 -0
  27. package/dist-cjs/types.js +7 -0
  28. package/package.json +35 -0
  29. package/src/categories/authentication.d.ts +8 -0
  30. package/src/categories/authentication.d.ts.map +1 -0
  31. package/src/categories/authentication.js +378 -0
  32. package/src/categories/authentication.js.map +1 -0
  33. package/src/categories/authentication.ts +395 -0
  34. package/src/categories/configuration.d.ts +8 -0
  35. package/src/categories/configuration.d.ts.map +1 -0
  36. package/src/categories/configuration.js +906 -0
  37. package/src/categories/configuration.js.map +1 -0
  38. package/src/categories/configuration.ts +948 -0
  39. package/src/categories/injection.d.ts +8 -0
  40. package/src/categories/injection.d.ts.map +1 -0
  41. package/src/categories/injection.js +750 -0
  42. package/src/categories/injection.js.map +1 -0
  43. package/src/categories/injection.ts +785 -0
  44. package/src/categories/sensitive-paths.d.ts +9 -0
  45. package/src/categories/sensitive-paths.d.ts.map +1 -0
  46. package/src/categories/sensitive-paths.js +1791 -0
  47. package/src/categories/sensitive-paths.js.map +1 -0
  48. package/src/categories/sensitive-paths.ts +1875 -0
  49. package/src/categories/ssrf.d.ts +8 -0
  50. package/src/categories/ssrf.d.ts.map +1 -0
  51. package/src/categories/ssrf.js +250 -0
  52. package/src/categories/ssrf.js.map +1 -0
  53. package/src/categories/ssrf.ts +261 -0
  54. package/src/categories/xss.d.ts +7 -0
  55. package/src/categories/xss.d.ts.map +1 -0
  56. package/src/categories/xss.js +328 -0
  57. package/src/categories/xss.js.map +1 -0
  58. package/src/categories/xss.ts +342 -0
  59. package/src/error-codes.d.ts +242 -0
  60. package/src/error-codes.d.ts.map +1 -0
  61. package/src/error-codes.js +315 -0
  62. package/src/error-codes.js.map +1 -0
  63. package/src/error-codes.ts +334 -0
  64. package/src/index.d.ts +60 -0
  65. package/src/index.d.ts.map +1 -0
  66. package/src/index.js +107 -0
  67. package/src/index.js.map +1 -0
  68. package/src/index.ts +126 -0
  69. package/src/types.d.ts +86 -0
  70. package/src/types.d.ts.map +1 -0
  71. package/src/types.js +7 -0
  72. package/src/types.js.map +1 -0
  73. package/src/types.ts +109 -0
  74. package/tsconfig.cjs.json +8 -0
  75. package/tsconfig.json +21 -0
  76. package/vulnerability-registry.zip +0 -0
package/src/types.d.ts ADDED
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Vulnerability Registry - Core Types
3
+ *
4
+ * Central type definitions for all vulnerability definitions.
5
+ */
6
+ /**
7
+ * Vulnerability severity levels
8
+ */
9
+ export type Severity = 'critical' | 'high' | 'medium' | 'low' | 'info';
10
+ /**
11
+ * CVSS v3.1 severity ratings
12
+ */
13
+ export type CVSSSeverity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';
14
+ /**
15
+ * Vulnerability categories
16
+ */
17
+ export type VulnerabilityCategory = 'injection' | 'xss' | 'authentication' | 'access_control' | 'configuration' | 'information_disclosure' | 'cryptographic' | 'business_logic' | 'ssrf' | 'file_inclusion';
18
+ /**
19
+ * CVSS v3.1 Score data
20
+ */
21
+ export interface CVSSProfile {
22
+ /** Base score (0.0 - 10.0) */
23
+ score: number;
24
+ /** Full CVSS vector string */
25
+ vector: string;
26
+ /** Severity rating derived from score */
27
+ severity: CVSSSeverity;
28
+ }
29
+ /**
30
+ * CWE (Common Weakness Enumeration) reference
31
+ */
32
+ export interface CWEReference {
33
+ /** CWE ID (e.g., "CWE-89") */
34
+ id: string;
35
+ /** CWE name */
36
+ name: string;
37
+ /** URL to CWE definition */
38
+ url: string;
39
+ }
40
+ /**
41
+ * OWASP reference
42
+ */
43
+ export interface OWASPReference {
44
+ /** OWASP ID (e.g., "A03:2021") */
45
+ id: string;
46
+ /** OWASP category name */
47
+ name: string;
48
+ /** URL to OWASP definition */
49
+ url: string;
50
+ }
51
+ /**
52
+ * Complete vulnerability definition
53
+ */
54
+ export interface VulnerabilityDefinition {
55
+ /** Unique numeric identifier */
56
+ id: number;
57
+ /** Unique vulnerability code */
58
+ code: string;
59
+ /** Human-readable title */
60
+ title: string;
61
+ /** Detailed description (100+ characters) */
62
+ description: string;
63
+ /** Severity level */
64
+ severity: Severity;
65
+ /** Vulnerability category */
66
+ category: VulnerabilityCategory;
67
+ /** Scanner that detects this vulnerability */
68
+ scanner: string;
69
+ /** CVSS v3.1 profile */
70
+ cvss: CVSSProfile;
71
+ /** Associated CWE references */
72
+ cwe: CWEReference[];
73
+ /** Associated OWASP references */
74
+ owasp: OWASPReference[];
75
+ /** Remediation guidance */
76
+ remediation: string;
77
+ /** Additional reference URLs */
78
+ references?: string[];
79
+ }
80
+ /**
81
+ * Vulnerability registry lookup result
82
+ */
83
+ export interface VulnerabilityLookup {
84
+ found: boolean;
85
+ definition?: Vulnerability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B,qBAAqB;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BAA6B;IAC7B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAEhB,wBAAwB;IACxB,IAAI,EAAE,WAAW,CAAC;IAElB,gCAAgC;IAChC,GAAG,EAAE,YAAY,EAAE,CAAC;IAEpB,kCAAkC;IAClC,KAAK,EAAE,cAAc,EAAE,CAAC;IAExB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IAEpB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACxC"}
package/src/types.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Vulnerability Registry - Core Types
4
+ *
5
+ * Central type definitions for all vulnerability definitions.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
package/src/types.ts ADDED
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Vulnerability Registry - Core Types
3
+ *
4
+ * Central type definitions for all vulnerability definitions.
5
+ */
6
+
7
+ /**
8
+ * Vulnerability severity levels
9
+ */
10
+ export type Severity = 'critical' | 'high' | 'medium' | 'low' | 'info';
11
+
12
+ /**
13
+ * CVSS v3.1 severity ratings
14
+ */
15
+ export type CVSSSeverity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';
16
+
17
+ /**
18
+ * Vulnerability categories
19
+ */
20
+ export type VulnerabilityCategory =
21
+ | 'injection'
22
+ | 'xss'
23
+ | 'authentication'
24
+ | 'access_control'
25
+ | 'configuration'
26
+ | 'information_disclosure'
27
+ | 'cryptographic'
28
+ | 'business_logic'
29
+ | 'ssrf'
30
+ | 'file_inclusion';
31
+
32
+ /**
33
+ * CVSS v3.1 Score data
34
+ */
35
+ export interface CVSSProfile {
36
+ /** Base score (0.0 - 10.0) */
37
+ score: number;
38
+ /** Full CVSS vector string */
39
+ vector: string;
40
+ /** Severity rating derived from score */
41
+ severity: CVSSSeverity;
42
+ }
43
+
44
+ /**
45
+ * CWE (Common Weakness Enumeration) reference
46
+ */
47
+ export interface CWEReference {
48
+ /** CWE ID (e.g., "CWE-89") */
49
+ id: string;
50
+ /** CWE name */
51
+ name: string;
52
+ /** URL to CWE definition */
53
+ url: string;
54
+ }
55
+
56
+ /**
57
+ * OWASP reference
58
+ */
59
+ export interface OWASPReference {
60
+ /** OWASP ID (e.g., "A03:2021") */
61
+ id: string;
62
+ /** OWASP category name */
63
+ name: string;
64
+ /** URL to OWASP definition */
65
+ url: string;
66
+ }
67
+
68
+ /**
69
+ * Complete vulnerability definition
70
+ */
71
+ export interface VulnerabilityDefinition {
72
+ /** Unique numeric identifier */
73
+ id: number;
74
+ /** Unique vulnerability code */
75
+ code: string;
76
+ /** Human-readable title */
77
+ title: string;
78
+ /** Detailed description (100+ characters) */
79
+ description: string;
80
+ /** Severity level */
81
+ severity: Severity;
82
+ /** Vulnerability category */
83
+ category: VulnerabilityCategory;
84
+ /** Scanner that detects this vulnerability */
85
+ scanner: string;
86
+
87
+ /** CVSS v3.1 profile */
88
+ cvss: CVSSProfile;
89
+
90
+ /** Associated CWE references */
91
+ cwe: CWEReference[];
92
+
93
+ /** Associated OWASP references */
94
+ owasp: OWASPReference[];
95
+
96
+ /** Remediation guidance */
97
+ remediation: string;
98
+
99
+ /** Additional reference URLs */
100
+ references?: string[];
101
+ }
102
+
103
+ /**
104
+ * Vulnerability registry lookup result
105
+ */
106
+ export interface VulnerabilityLookup {
107
+ found: boolean;
108
+ definition?: VulnerabilityDefinition;
109
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "CommonJS",
5
+ "outDir": "./dist-cjs",
6
+ "declaration": false
7
+ }
8
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "node",
6
+ "declaration": true,
7
+ "outDir": "./dist",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "rootDir": "./src"
13
+ },
14
+ "include": [
15
+ "src/**/*"
16
+ ],
17
+ "exclude": [
18
+ "node_modules",
19
+ "dist"
20
+ ]
21
+ }
Binary file