@nahisaho/musubix-security 1.8.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 +105 -0
- package/bin/musubix-security-mcp.js +12 -0
- package/bin/musubix-security.js +12 -0
- package/dist/analysis/dependency-auditor.d.ts +30 -0
- package/dist/analysis/dependency-auditor.d.ts.map +1 -0
- package/dist/analysis/dependency-auditor.js +325 -0
- package/dist/analysis/dependency-auditor.js.map +1 -0
- package/dist/analysis/index.d.ts +9 -0
- package/dist/analysis/index.d.ts.map +1 -0
- package/dist/analysis/index.js +9 -0
- package/dist/analysis/index.js.map +1 -0
- package/dist/analysis/secret-detector.d.ts +44 -0
- package/dist/analysis/secret-detector.d.ts.map +1 -0
- package/dist/analysis/secret-detector.js +465 -0
- package/dist/analysis/secret-detector.js.map +1 -0
- package/dist/analysis/taint-analyzer.d.ts +62 -0
- package/dist/analysis/taint-analyzer.d.ts.map +1 -0
- package/dist/analysis/taint-analyzer.js +519 -0
- package/dist/analysis/taint-analyzer.js.map +1 -0
- package/dist/analysis/vulnerability-scanner.d.ts +58 -0
- package/dist/analysis/vulnerability-scanner.d.ts.map +1 -0
- package/dist/analysis/vulnerability-scanner.js +417 -0
- package/dist/analysis/vulnerability-scanner.js.map +1 -0
- package/dist/cli/commands.d.ts +15 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +405 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +6 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/ast-parser.d.ts +87 -0
- package/dist/infrastructure/ast-parser.d.ts.map +1 -0
- package/dist/infrastructure/ast-parser.js +273 -0
- package/dist/infrastructure/ast-parser.js.map +1 -0
- package/dist/infrastructure/cache.d.ts +100 -0
- package/dist/infrastructure/cache.d.ts.map +1 -0
- package/dist/infrastructure/cache.js +288 -0
- package/dist/infrastructure/cache.js.map +1 -0
- package/dist/infrastructure/config-loader.d.ts +35 -0
- package/dist/infrastructure/config-loader.d.ts.map +1 -0
- package/dist/infrastructure/config-loader.js +358 -0
- package/dist/infrastructure/config-loader.js.map +1 -0
- package/dist/infrastructure/file-scanner.d.ts +94 -0
- package/dist/infrastructure/file-scanner.d.ts.map +1 -0
- package/dist/infrastructure/file-scanner.js +189 -0
- package/dist/infrastructure/file-scanner.js.map +1 -0
- package/dist/infrastructure/index.d.ts +9 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +9 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +7 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +34 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +88 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +88 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +443 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/services/fix-generator.d.ts +56 -0
- package/dist/services/fix-generator.d.ts.map +1 -0
- package/dist/services/fix-generator.js +346 -0
- package/dist/services/fix-generator.js.map +1 -0
- package/dist/services/fix-verifier.d.ts +62 -0
- package/dist/services/fix-verifier.d.ts.map +1 -0
- package/dist/services/fix-verifier.js +224 -0
- package/dist/services/fix-verifier.js.map +1 -0
- package/dist/services/index.d.ts +9 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +13 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/report-generator.d.ts +87 -0
- package/dist/services/report-generator.d.ts.map +1 -0
- package/dist/services/report-generator.js +463 -0
- package/dist/services/report-generator.js.map +1 -0
- package/dist/services/security-service.d.ts +151 -0
- package/dist/services/security-service.d.ts.map +1 -0
- package/dist/services/security-service.js +279 -0
- package/dist/services/security-service.js.map +1 -0
- package/dist/types/config.d.ts +188 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +89 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/dependency.d.ts +266 -0
- package/dist/types/dependency.d.ts.map +1 -0
- package/dist/types/dependency.js +7 -0
- package/dist/types/dependency.js.map +1 -0
- package/dist/types/fix.d.ts +213 -0
- package/dist/types/fix.d.ts.map +1 -0
- package/dist/types/fix.js +7 -0
- package/dist/types/fix.js.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/secret.d.ts +151 -0
- package/dist/types/secret.d.ts.map +1 -0
- package/dist/types/secret.js +91 -0
- package/dist/types/secret.js.map +1 -0
- package/dist/types/taint.d.ts +182 -0
- package/dist/types/taint.d.ts.map +1 -0
- package/dist/types/taint.js +24 -0
- package/dist/types/taint.js.map +1 -0
- package/dist/types/vulnerability.d.ts +136 -0
- package/dist/types/vulnerability.d.ts.map +1 -0
- package/dist/types/vulnerability.js +7 -0
- package/dist/types/vulnerability.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Security configuration type definitions
|
|
3
|
+
* @module @nahisaho/musubix-security/types/config
|
|
4
|
+
* @trace REQ-SEC-CONFIG-001, REQ-SEC-CONFIG-002, REQ-SEC-REPORT-001
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Default security configuration
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_CONFIG = {
|
|
10
|
+
version: '1.0',
|
|
11
|
+
scan: {
|
|
12
|
+
severityFilter: ['critical', 'high', 'medium'],
|
|
13
|
+
rulesets: ['owasp-top-10', 'cwe-top-25'],
|
|
14
|
+
incremental: true,
|
|
15
|
+
},
|
|
16
|
+
taint: {
|
|
17
|
+
interprocedural: true,
|
|
18
|
+
trackAsync: true,
|
|
19
|
+
maxPathDepth: 10,
|
|
20
|
+
},
|
|
21
|
+
fix: {
|
|
22
|
+
useAI: false,
|
|
23
|
+
generateAlternatives: true,
|
|
24
|
+
maxAlternatives: 3,
|
|
25
|
+
preserveStyle: true,
|
|
26
|
+
},
|
|
27
|
+
secret: {
|
|
28
|
+
ignoreTestValues: true,
|
|
29
|
+
verify: false,
|
|
30
|
+
},
|
|
31
|
+
audit: {
|
|
32
|
+
includeDevDependencies: false,
|
|
33
|
+
minSeverity: 'medium',
|
|
34
|
+
suggestUpgrades: true,
|
|
35
|
+
checkBreaking: true,
|
|
36
|
+
},
|
|
37
|
+
report: {
|
|
38
|
+
format: 'json',
|
|
39
|
+
includeCodeSnippets: true,
|
|
40
|
+
includeFixes: true,
|
|
41
|
+
includeTaintPaths: true,
|
|
42
|
+
groupBy: 'severity',
|
|
43
|
+
includeSummary: true,
|
|
44
|
+
},
|
|
45
|
+
knowledgeGraph: {
|
|
46
|
+
mode: 'local',
|
|
47
|
+
autoLearn: true,
|
|
48
|
+
namespace: 'security',
|
|
49
|
+
maxCachedPatterns: 1000,
|
|
50
|
+
},
|
|
51
|
+
ai: {
|
|
52
|
+
enabled: false,
|
|
53
|
+
},
|
|
54
|
+
cache: {
|
|
55
|
+
strategy: 'file',
|
|
56
|
+
ttlSeconds: 3600,
|
|
57
|
+
maxSizeMB: 100,
|
|
58
|
+
cacheAST: true,
|
|
59
|
+
cachePatterns: true,
|
|
60
|
+
},
|
|
61
|
+
ci: {
|
|
62
|
+
failOnSeverity: 'high',
|
|
63
|
+
sarifOutput: true,
|
|
64
|
+
},
|
|
65
|
+
severityFilter: ['critical', 'high', 'medium'],
|
|
66
|
+
verbose: false,
|
|
67
|
+
debug: false,
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Configuration file locations (in order of precedence)
|
|
71
|
+
*/
|
|
72
|
+
export const CONFIG_FILE_LOCATIONS = [
|
|
73
|
+
'musubix-security.config.ts',
|
|
74
|
+
'musubix-security.config.js',
|
|
75
|
+
'musubix-security.config.json',
|
|
76
|
+
'.musubix-security.yml',
|
|
77
|
+
'.musubix-security.yaml',
|
|
78
|
+
'.musubix-securityrc',
|
|
79
|
+
'.musubix-securityrc.json',
|
|
80
|
+
];
|
|
81
|
+
/**
|
|
82
|
+
* Environment variable prefix for configuration
|
|
83
|
+
*/
|
|
84
|
+
export const ENV_PREFIX = 'MUSUBIX_SECURITY_';
|
|
85
|
+
/**
|
|
86
|
+
* Configuration schema version
|
|
87
|
+
*/
|
|
88
|
+
export const CONFIG_SCHEMA_VERSION = '1.0';
|
|
89
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkLH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,OAAO,EAAE,KAAK;IACd,IAAI,EAAE;QACJ,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;QAC9C,QAAQ,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC;QACxC,WAAW,EAAE,IAAI;KAClB;IACD,KAAK,EAAE;QACL,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,IAAI;QAChB,YAAY,EAAE,EAAE;KACjB;IACD,GAAG,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,oBAAoB,EAAE,IAAI;QAC1B,eAAe,EAAE,CAAC;QAClB,aAAa,EAAE,IAAI;KACpB;IACD,MAAM,EAAE;QACN,gBAAgB,EAAE,IAAI;QACtB,MAAM,EAAE,KAAK;KACd;IACD,KAAK,EAAE;QACL,sBAAsB,EAAE,KAAK;QAC7B,WAAW,EAAE,QAAQ;QACrB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,IAAI;KACpB;IACD,MAAM,EAAE;QACN,MAAM,EAAE,MAAM;QACd,mBAAmB,EAAE,IAAI;QACzB,YAAY,EAAE,IAAI;QAClB,iBAAiB,EAAE,IAAI;QACvB,OAAO,EAAE,UAAU;QACnB,cAAc,EAAE,IAAI;KACrB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,UAAU;QACrB,iBAAiB,EAAE,IAAI;KACxB;IACD,EAAE,EAAE;QACF,OAAO,EAAE,KAAK;KACf;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,GAAG;QACd,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;KACpB;IACD,EAAE,EAAE;QACF,cAAc,EAAE,MAAM;QACtB,WAAW,EAAE,IAAI;KAClB;IACD,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;IAC9C,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,4BAA4B;IAC5B,4BAA4B;IAC5B,8BAA8B;IAC9B,uBAAuB;IACvB,wBAAwB;IACxB,qBAAqB;IACrB,0BAA0B;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Dependency audit type definitions
|
|
3
|
+
* @module @nahisaho/musubix-security/types/dependency
|
|
4
|
+
* @trace REQ-SEC-DEP-001, REQ-SEC-DEP-002, REQ-SEC-DEP-003
|
|
5
|
+
*/
|
|
6
|
+
import type { Severity } from './vulnerability.js';
|
|
7
|
+
/**
|
|
8
|
+
* Dependency type
|
|
9
|
+
*/
|
|
10
|
+
export type DependencyType = 'production' | 'development' | 'optional' | 'peer';
|
|
11
|
+
/**
|
|
12
|
+
* Vulnerability source database
|
|
13
|
+
*/
|
|
14
|
+
export type VulnerabilitySource = 'npm-audit' | 'github-advisories' | 'osv' | 'snyk' | 'nvd';
|
|
15
|
+
/**
|
|
16
|
+
* Vulnerable dependency
|
|
17
|
+
* @trace REQ-SEC-DEP-001
|
|
18
|
+
*/
|
|
19
|
+
export interface VulnerableDependency {
|
|
20
|
+
/** Package name */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Installed version */
|
|
23
|
+
installedVersion: string;
|
|
24
|
+
/** Dependency type */
|
|
25
|
+
type: DependencyType;
|
|
26
|
+
/** Whether this is a direct dependency */
|
|
27
|
+
isDirect: boolean;
|
|
28
|
+
/** Dependency path (for transitive deps) */
|
|
29
|
+
dependencyPath: string[];
|
|
30
|
+
/** Known vulnerabilities */
|
|
31
|
+
vulnerabilities: DependencyVulnerability[];
|
|
32
|
+
/** Highest severity among vulnerabilities */
|
|
33
|
+
highestSeverity: Severity;
|
|
34
|
+
/** Fix available */
|
|
35
|
+
fixAvailable: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Vulnerability in a dependency
|
|
39
|
+
*/
|
|
40
|
+
export interface DependencyVulnerability {
|
|
41
|
+
/** Vulnerability ID (CVE, GHSA, etc.) */
|
|
42
|
+
id: string;
|
|
43
|
+
/** CVE ID if available */
|
|
44
|
+
cve?: string;
|
|
45
|
+
/** GitHub Security Advisory ID */
|
|
46
|
+
ghsa?: string;
|
|
47
|
+
/** CWE identifiers */
|
|
48
|
+
cwes: string[];
|
|
49
|
+
/** Severity level */
|
|
50
|
+
severity: Severity;
|
|
51
|
+
/** CVSS score (0.0 - 10.0) */
|
|
52
|
+
cvssScore?: number;
|
|
53
|
+
/** CVSS vector string */
|
|
54
|
+
cvssVector?: string;
|
|
55
|
+
/** Title */
|
|
56
|
+
title: string;
|
|
57
|
+
/** Description */
|
|
58
|
+
description: string;
|
|
59
|
+
/** Affected version range */
|
|
60
|
+
affectedVersions: string;
|
|
61
|
+
/** Patched version (if available) */
|
|
62
|
+
patchedVersion?: string;
|
|
63
|
+
/** Vulnerability source */
|
|
64
|
+
source: VulnerabilitySource;
|
|
65
|
+
/** URL to advisory */
|
|
66
|
+
url?: string;
|
|
67
|
+
/** Publication date */
|
|
68
|
+
publishedAt?: Date;
|
|
69
|
+
/** Whether exploit is known */
|
|
70
|
+
exploitAvailable?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Upgrade suggestion
|
|
74
|
+
* @trace REQ-SEC-DEP-002
|
|
75
|
+
*/
|
|
76
|
+
export interface UpgradeSuggestion {
|
|
77
|
+
/** Package name */
|
|
78
|
+
packageName: string;
|
|
79
|
+
/** Current version */
|
|
80
|
+
currentVersion: string;
|
|
81
|
+
/** Suggested version */
|
|
82
|
+
suggestedVersion: string;
|
|
83
|
+
/** Upgrade type */
|
|
84
|
+
upgradeType: 'patch' | 'minor' | 'major';
|
|
85
|
+
/** Whether this is a breaking change */
|
|
86
|
+
breaking: boolean;
|
|
87
|
+
/** Vulnerabilities fixed by this upgrade */
|
|
88
|
+
fixesVulnerabilities: string[];
|
|
89
|
+
/** Required peer dependency updates */
|
|
90
|
+
peerUpdates?: {
|
|
91
|
+
name: string;
|
|
92
|
+
version: string;
|
|
93
|
+
}[];
|
|
94
|
+
/** Changelog URL */
|
|
95
|
+
changelogUrl?: string;
|
|
96
|
+
/** Release notes summary */
|
|
97
|
+
releaseNotes?: string;
|
|
98
|
+
/** Confidence in upgrade safety */
|
|
99
|
+
confidence: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Audit result
|
|
103
|
+
* @trace REQ-SEC-DEP-001
|
|
104
|
+
*/
|
|
105
|
+
export interface AuditResult {
|
|
106
|
+
/** Vulnerable dependencies found */
|
|
107
|
+
vulnerableDependencies: VulnerableDependency[];
|
|
108
|
+
/** Upgrade suggestions */
|
|
109
|
+
upgradeSuggestions: UpgradeSuggestion[];
|
|
110
|
+
/** Total dependencies scanned */
|
|
111
|
+
totalDependencies: number;
|
|
112
|
+
/** Direct dependencies scanned */
|
|
113
|
+
directDependencies: number;
|
|
114
|
+
/** Transitive dependencies scanned */
|
|
115
|
+
transitiveDependencies: number;
|
|
116
|
+
/** Audit duration in milliseconds */
|
|
117
|
+
duration: number;
|
|
118
|
+
/** Audit timestamp */
|
|
119
|
+
timestamp: Date;
|
|
120
|
+
/** Package manager detected */
|
|
121
|
+
packageManager: 'npm' | 'yarn' | 'pnpm';
|
|
122
|
+
/** Lock file path */
|
|
123
|
+
lockFilePath?: string;
|
|
124
|
+
/** Summary */
|
|
125
|
+
summary: {
|
|
126
|
+
critical: number;
|
|
127
|
+
high: number;
|
|
128
|
+
medium: number;
|
|
129
|
+
low: number;
|
|
130
|
+
total: number;
|
|
131
|
+
fixable: number;
|
|
132
|
+
breaking: number;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Audit options
|
|
137
|
+
*/
|
|
138
|
+
export interface AuditOptions {
|
|
139
|
+
/** Include development dependencies */
|
|
140
|
+
includeDevDependencies?: boolean;
|
|
141
|
+
/** Minimum severity to report */
|
|
142
|
+
minSeverity?: Severity;
|
|
143
|
+
/** Vulnerability sources to check */
|
|
144
|
+
sources?: VulnerabilitySource[];
|
|
145
|
+
/** Ignore specific vulnerabilities by ID */
|
|
146
|
+
ignoreVulnerabilities?: string[];
|
|
147
|
+
/** Ignore specific packages */
|
|
148
|
+
ignorePackages?: string[];
|
|
149
|
+
/** Maximum depth for transitive dependencies */
|
|
150
|
+
maxDepth?: number;
|
|
151
|
+
/** Generate upgrade suggestions */
|
|
152
|
+
suggestUpgrades?: boolean;
|
|
153
|
+
/** Check for breaking changes */
|
|
154
|
+
checkBreaking?: boolean;
|
|
155
|
+
/** Custom registry URL */
|
|
156
|
+
registryUrl?: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* SBOM (Software Bill of Materials) entry
|
|
160
|
+
* @trace REQ-SEC-DEP-003
|
|
161
|
+
*/
|
|
162
|
+
export interface SBOMEntry {
|
|
163
|
+
/** Package name */
|
|
164
|
+
name: string;
|
|
165
|
+
/** Package version */
|
|
166
|
+
version: string;
|
|
167
|
+
/** Package description */
|
|
168
|
+
description?: string;
|
|
169
|
+
/** License identifier (SPDX) */
|
|
170
|
+
license?: string;
|
|
171
|
+
/** Package author */
|
|
172
|
+
author?: string;
|
|
173
|
+
/** Package homepage */
|
|
174
|
+
homepage?: string;
|
|
175
|
+
/** Package repository URL */
|
|
176
|
+
repository?: string;
|
|
177
|
+
/** Dependency type */
|
|
178
|
+
type: DependencyType;
|
|
179
|
+
/** Whether this is a direct dependency */
|
|
180
|
+
isDirect: boolean;
|
|
181
|
+
/** Integrity hash (SHA-512) */
|
|
182
|
+
integrity?: string;
|
|
183
|
+
/** PURL (Package URL) */
|
|
184
|
+
purl: string;
|
|
185
|
+
/** CPE (Common Platform Enumeration) if available */
|
|
186
|
+
cpe?: string;
|
|
187
|
+
/** Known vulnerabilities count */
|
|
188
|
+
vulnerabilityCount: number;
|
|
189
|
+
/** Highest vulnerability severity */
|
|
190
|
+
highestSeverity?: Severity;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* SBOM document
|
|
194
|
+
* @trace REQ-SEC-DEP-003
|
|
195
|
+
*/
|
|
196
|
+
export interface SBOM {
|
|
197
|
+
/** SBOM format version */
|
|
198
|
+
formatVersion: string;
|
|
199
|
+
/** SBOM spec (CycloneDX, SPDX) */
|
|
200
|
+
spec: 'cyclonedx' | 'spdx';
|
|
201
|
+
/** Project name */
|
|
202
|
+
projectName: string;
|
|
203
|
+
/** Project version */
|
|
204
|
+
projectVersion: string;
|
|
205
|
+
/** Generation timestamp */
|
|
206
|
+
generatedAt: Date;
|
|
207
|
+
/** Generator tool info */
|
|
208
|
+
generator: {
|
|
209
|
+
name: string;
|
|
210
|
+
version: string;
|
|
211
|
+
};
|
|
212
|
+
/** All components */
|
|
213
|
+
components: SBOMEntry[];
|
|
214
|
+
/** Summary */
|
|
215
|
+
summary: {
|
|
216
|
+
totalComponents: number;
|
|
217
|
+
directDependencies: number;
|
|
218
|
+
transitiveDependencies: number;
|
|
219
|
+
uniqueLicenses: string[];
|
|
220
|
+
vulnerableComponents: number;
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* SBOM generation options
|
|
225
|
+
*/
|
|
226
|
+
export interface SBOMOptions {
|
|
227
|
+
/** Output format */
|
|
228
|
+
format: 'cyclonedx' | 'spdx';
|
|
229
|
+
/** Include development dependencies */
|
|
230
|
+
includeDevDependencies?: boolean;
|
|
231
|
+
/** Include vulnerability data */
|
|
232
|
+
includeVulnerabilities?: boolean;
|
|
233
|
+
/** Include license data */
|
|
234
|
+
includeLicenses?: boolean;
|
|
235
|
+
/** Output file path */
|
|
236
|
+
outputPath?: string;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* License compliance check result
|
|
240
|
+
*/
|
|
241
|
+
export interface LicenseCheckResult {
|
|
242
|
+
/** Package name */
|
|
243
|
+
packageName: string;
|
|
244
|
+
/** Package version */
|
|
245
|
+
version: string;
|
|
246
|
+
/** Detected license */
|
|
247
|
+
license: string;
|
|
248
|
+
/** License category */
|
|
249
|
+
category: 'permissive' | 'copyleft' | 'proprietary' | 'unknown';
|
|
250
|
+
/** Whether license is approved */
|
|
251
|
+
approved: boolean;
|
|
252
|
+
/** Compliance issues */
|
|
253
|
+
issues: string[];
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* License policy
|
|
257
|
+
*/
|
|
258
|
+
export interface LicensePolicy {
|
|
259
|
+
/** Allowed licenses */
|
|
260
|
+
allowed: string[];
|
|
261
|
+
/** Denied licenses */
|
|
262
|
+
denied: string[];
|
|
263
|
+
/** Require explicit approval for */
|
|
264
|
+
requireApproval: string[];
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=dependency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency.d.ts","sourceRoot":"","sources":["../../src/types/dependency.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GACX,mBAAmB,GACnB,KAAK,GACL,MAAM,GACN,KAAK,CAAC;AAEV;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB;IACtB,IAAI,EAAE,cAAc,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,4BAA4B;IAC5B,eAAe,EAAE,uBAAuB,EAAE,CAAC;IAC3C,6CAA6C;IAC7C,eAAe,EAAE,QAAQ,CAAC;IAC1B,oBAAoB;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,0BAA0B;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,qBAAqB;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,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BAAoB;IACpB,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,uCAAuC;IACvC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,iCAAiC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,2BAA2B;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,QAAQ,EAAE,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;IAChE,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,wBAAwB;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sBAAsB;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,oCAAoC;IACpC,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency.js","sourceRoot":"","sources":["../../src/types/dependency.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Fix suggestion and verification type definitions
|
|
3
|
+
* @module @nahisaho/musubix-security/types/fix
|
|
4
|
+
* @trace REQ-SEC-FIX-001, REQ-SEC-FIX-002, REQ-SEC-FIX-003
|
|
5
|
+
*/
|
|
6
|
+
import type { SourceLocation, Severity } from './vulnerability.js';
|
|
7
|
+
/**
|
|
8
|
+
* Fix strategy type
|
|
9
|
+
* @trace REQ-SEC-FIX-001
|
|
10
|
+
*/
|
|
11
|
+
export type FixStrategy = 'parameterized-query' | 'html-escape' | 'command-escape' | 'path-validation' | 'url-validation' | 'input-validation' | 'authentication' | 'authorization' | 'encryption' | 'sanitization' | 'configuration' | 'dependency-update';
|
|
12
|
+
/**
|
|
13
|
+
* Code edit to apply
|
|
14
|
+
* @trace DES-SEC-FIX-001
|
|
15
|
+
*/
|
|
16
|
+
export interface CodeEdit {
|
|
17
|
+
/** Source code location to edit */
|
|
18
|
+
location: SourceLocation;
|
|
19
|
+
/** Original code to replace */
|
|
20
|
+
originalCode: string;
|
|
21
|
+
/** New code to insert */
|
|
22
|
+
newCode: string;
|
|
23
|
+
/** Description of the change */
|
|
24
|
+
description: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Import statement to add
|
|
28
|
+
*/
|
|
29
|
+
export interface ImportEdit {
|
|
30
|
+
/** Module to import from */
|
|
31
|
+
module: string;
|
|
32
|
+
/** Named imports */
|
|
33
|
+
namedImports?: string[];
|
|
34
|
+
/** Default import name */
|
|
35
|
+
defaultImport?: string;
|
|
36
|
+
/** Namespace import name */
|
|
37
|
+
namespaceImport?: string;
|
|
38
|
+
/** Insert at line (0 for top of file) */
|
|
39
|
+
insertLine: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Fix suggestion for a vulnerability
|
|
43
|
+
* @trace REQ-SEC-FIX-001
|
|
44
|
+
*/
|
|
45
|
+
export interface Fix {
|
|
46
|
+
/** Unique fix ID (e.g., "FIX-2026-001") */
|
|
47
|
+
id: string;
|
|
48
|
+
/** Reference to the vulnerability being fixed */
|
|
49
|
+
vulnerabilityId: string;
|
|
50
|
+
/** Reference to the taint path if applicable */
|
|
51
|
+
taintPathId?: string;
|
|
52
|
+
/** Fix strategy used */
|
|
53
|
+
strategy: FixStrategy;
|
|
54
|
+
/** Human-readable title */
|
|
55
|
+
title: string;
|
|
56
|
+
/** Detailed description of the fix */
|
|
57
|
+
description: string;
|
|
58
|
+
/** Code edits to apply */
|
|
59
|
+
edits: CodeEdit[];
|
|
60
|
+
/** Import statements to add */
|
|
61
|
+
imports: ImportEdit[];
|
|
62
|
+
/** Confidence in fix correctness (0.0 - 1.0) */
|
|
63
|
+
confidence: number;
|
|
64
|
+
/** Whether this fix may change behavior */
|
|
65
|
+
breakingChange: boolean;
|
|
66
|
+
/** Required new dependencies */
|
|
67
|
+
newDependencies?: {
|
|
68
|
+
name: string;
|
|
69
|
+
version: string;
|
|
70
|
+
dev?: boolean;
|
|
71
|
+
}[];
|
|
72
|
+
/** Explanation of why this fix works */
|
|
73
|
+
rationale: string;
|
|
74
|
+
/** Alternative fix approaches */
|
|
75
|
+
alternatives?: string[];
|
|
76
|
+
/** Generated timestamp */
|
|
77
|
+
generatedAt: Date;
|
|
78
|
+
/** LLM model used if AI-generated */
|
|
79
|
+
generatedBy?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Fix generation options
|
|
83
|
+
*/
|
|
84
|
+
export interface FixGenerationOptions {
|
|
85
|
+
/** Preferred fix strategies */
|
|
86
|
+
preferredStrategies?: FixStrategy[];
|
|
87
|
+
/** Use AI-assisted fix generation */
|
|
88
|
+
useAI?: boolean;
|
|
89
|
+
/** AI model to use */
|
|
90
|
+
aiModel?: string;
|
|
91
|
+
/** Generate multiple alternatives */
|
|
92
|
+
generateAlternatives?: boolean;
|
|
93
|
+
/** Maximum alternatives per vulnerability */
|
|
94
|
+
maxAlternatives?: number;
|
|
95
|
+
/** Preserve code style */
|
|
96
|
+
preserveStyle?: boolean;
|
|
97
|
+
/** Target language/framework */
|
|
98
|
+
targetFramework?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Verification status
|
|
102
|
+
* @trace REQ-SEC-FIX-002
|
|
103
|
+
*/
|
|
104
|
+
export type VerificationStatus = 'verified' | 'unverified' | 'failed' | 'timeout' | 'unsupported';
|
|
105
|
+
/**
|
|
106
|
+
* Formal verification result
|
|
107
|
+
* @trace REQ-SEC-FIX-002
|
|
108
|
+
*/
|
|
109
|
+
export interface VerificationResult {
|
|
110
|
+
/** Fix ID being verified */
|
|
111
|
+
fixId: string;
|
|
112
|
+
/** Verification status */
|
|
113
|
+
status: VerificationStatus;
|
|
114
|
+
/** Whether the fix eliminates the vulnerability */
|
|
115
|
+
eliminatesVulnerability: boolean;
|
|
116
|
+
/** Whether the fix preserves program semantics */
|
|
117
|
+
preservesSemantics: boolean;
|
|
118
|
+
/** Whether any regressions were detected */
|
|
119
|
+
noRegressions: boolean;
|
|
120
|
+
/** Verification method used */
|
|
121
|
+
method: 'z3-smt' | 'hoare-logic' | 'type-checking' | 'static-analysis';
|
|
122
|
+
/** Detailed verification output */
|
|
123
|
+
details?: string;
|
|
124
|
+
/** Verification duration in milliseconds */
|
|
125
|
+
duration: number;
|
|
126
|
+
/** Verification timestamp */
|
|
127
|
+
timestamp: Date;
|
|
128
|
+
/** Error message if verification failed */
|
|
129
|
+
error?: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Fix application status
|
|
133
|
+
* @trace REQ-SEC-FIX-003
|
|
134
|
+
*/
|
|
135
|
+
export type ApplyStatus = 'success' | 'partial' | 'failed' | 'conflict' | 'rejected';
|
|
136
|
+
/**
|
|
137
|
+
* Result of applying a fix
|
|
138
|
+
* @trace REQ-SEC-FIX-003
|
|
139
|
+
*/
|
|
140
|
+
export interface ApplyResult {
|
|
141
|
+
/** Fix ID that was applied */
|
|
142
|
+
fixId: string;
|
|
143
|
+
/** Application status */
|
|
144
|
+
status: ApplyStatus;
|
|
145
|
+
/** Files modified */
|
|
146
|
+
modifiedFiles: string[];
|
|
147
|
+
/** Edits that were applied */
|
|
148
|
+
appliedEdits: CodeEdit[];
|
|
149
|
+
/** Edits that failed to apply */
|
|
150
|
+
failedEdits?: {
|
|
151
|
+
edit: CodeEdit;
|
|
152
|
+
reason: string;
|
|
153
|
+
}[];
|
|
154
|
+
/** Backup file paths */
|
|
155
|
+
backupPaths?: string[];
|
|
156
|
+
/** Whether backup was created */
|
|
157
|
+
backupCreated: boolean;
|
|
158
|
+
/** Error message if failed */
|
|
159
|
+
error?: string;
|
|
160
|
+
/** Application timestamp */
|
|
161
|
+
timestamp: Date;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Fix batch for multiple vulnerabilities
|
|
165
|
+
*/
|
|
166
|
+
export interface FixBatch {
|
|
167
|
+
/** Batch ID */
|
|
168
|
+
id: string;
|
|
169
|
+
/** Fixes in this batch */
|
|
170
|
+
fixes: Fix[];
|
|
171
|
+
/** Combined verification result */
|
|
172
|
+
verification?: VerificationResult;
|
|
173
|
+
/** Whether batch can be applied atomically */
|
|
174
|
+
atomic: boolean;
|
|
175
|
+
/** Files affected by this batch */
|
|
176
|
+
affectedFiles: string[];
|
|
177
|
+
/** Estimated impact level */
|
|
178
|
+
impactLevel: Severity;
|
|
179
|
+
/** Creation timestamp */
|
|
180
|
+
createdAt: Date;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Fix template for common patterns
|
|
184
|
+
*/
|
|
185
|
+
export interface FixTemplate {
|
|
186
|
+
/** Template ID */
|
|
187
|
+
id: string;
|
|
188
|
+
/** Template name */
|
|
189
|
+
name: string;
|
|
190
|
+
/** Vulnerability type this template addresses */
|
|
191
|
+
vulnerabilityType: string;
|
|
192
|
+
/** Fix strategy */
|
|
193
|
+
strategy: FixStrategy;
|
|
194
|
+
/** Template code with placeholders */
|
|
195
|
+
template: string;
|
|
196
|
+
/** Placeholder definitions */
|
|
197
|
+
placeholders: {
|
|
198
|
+
name: string;
|
|
199
|
+
description: string;
|
|
200
|
+
required: boolean;
|
|
201
|
+
defaultValue?: string;
|
|
202
|
+
}[];
|
|
203
|
+
/** Required imports */
|
|
204
|
+
imports: ImportEdit[];
|
|
205
|
+
/** When to use this template */
|
|
206
|
+
applicableWhen: string;
|
|
207
|
+
/** Example usage */
|
|
208
|
+
example?: {
|
|
209
|
+
before: string;
|
|
210
|
+
after: string;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=fix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix.d.ts","sourceRoot":"","sources":["../../src/types/fix.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,qBAAqB,GACrB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,cAAc,GACd,eAAe,GACf,mBAAmB,CAAC;AAExB;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,mCAAmC;IACnC,QAAQ,EAAE,cAAc,CAAC;IACzB,+BAA+B;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,0BAA0B;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,QAAQ,EAAE,WAAW,CAAC;IACtB,2BAA2B;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G,EAAE,CAAC;IACb,mCAAmC;IACnC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,mCAAmC;IACnC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,6BAA6B;IAC7B,WAAW,EAAE,QAAQ,CAAC;IACtB,yBAAyB;IACzB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,kBAAkB;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB;IACnB,QAAQ,EAAE,WAAW,CAAC;IACtB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,EAAE,CAAC;IACJ,uBAAuB;IACvB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,gCAAgC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB;IACpB,OAAO,CAAC,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix.js","sourceRoot":"","sources":["../../src/types/fix.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions entry point
|
|
3
|
+
* @module @nahisaho/musubix-security/types
|
|
4
|
+
*/
|
|
5
|
+
export type { OWASPCategory, VulnerabilityType, Severity, SourceLocation, Vulnerability, ScanOptions, ScanResult, SecurityRule, } from './vulnerability.js';
|
|
6
|
+
export type { TaintSourceCategory, TaintSource, TaintSinkCategory, TaintSink, TaintFlowStep, TaintPath, TaintResult, TaintAnalysisOptions, SanitizerDefinition, } from './taint.js';
|
|
7
|
+
export { BUILTIN_SANITIZERS } from './taint.js';
|
|
8
|
+
export type { FixStrategy, CodeEdit, ImportEdit, Fix, FixGenerationOptions, VerificationStatus, VerificationResult, ApplyStatus, ApplyResult, FixBatch, FixTemplate, } from './fix.js';
|
|
9
|
+
export type { SecretType, SecretContext, Secret, SecretPattern, SecretScanOptions, SecretScanResult, SecretVerification, } from './secret.js';
|
|
10
|
+
export { BUILTIN_SECRET_PATTERNS } from './secret.js';
|
|
11
|
+
export type { DependencyType, VulnerabilitySource, VulnerableDependency, DependencyVulnerability, UpgradeSuggestion, AuditResult, AuditOptions, SBOMEntry, SBOM, SBOMOptions, LicenseCheckResult, LicensePolicy, } from './dependency.js';
|
|
12
|
+
export type { ReportFormat, KnowledgeGraphMode, CacheStrategy, ReportConfig, KnowledgeGraphConfig, AIConfig, CacheConfig, CIConfig, SecurityConfig, } from './config.js';
|
|
13
|
+
export { DEFAULT_CONFIG, CONFIG_FILE_LOCATIONS, ENV_PREFIX, CONFIG_SCHEMA_VERSION, } from './config.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,WAAW,EACX,UAAU,EACV,YAAY,GACb,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGhD,YAAY,EACV,WAAW,EACX,QAAQ,EACR,UAAU,EACV,GAAG,EACH,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAAW,GACZ,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,UAAU,EACV,aAAa,EACb,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGtD,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,kBAAkB,EAClB,aAAa,GACd,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,UAAU,EACV,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions entry point
|
|
3
|
+
* @module @nahisaho/musubix-security/types
|
|
4
|
+
*/
|
|
5
|
+
export { BUILTIN_SANITIZERS } from './taint.js';
|
|
6
|
+
export { BUILTIN_SECRET_PATTERNS } from './secret.js';
|
|
7
|
+
export { DEFAULT_CONFIG, CONFIG_FILE_LOCATIONS, ENV_PREFIX, CONFIG_SCHEMA_VERSION, } from './config.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA4BhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AA+BtD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,UAAU,EACV,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
|