-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtypes.ts
More file actions
174 lines (149 loc) · 4.03 KB
/
Copy pathtypes.ts
File metadata and controls
174 lines (149 loc) · 4.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// @author: Albert C | @yz9yt | github.com/yz9yt
// types.ts
// version 0.1 Beta
export enum View {
URL_ANALYSIS = 'URL_ANALYSIS',
CODE_ANALYSIS = 'CODE_ANALYSIS',
PAYLOAD_TOOLS = 'PAYLOAD_TOOLS',
DISCOVERY_TOOLS = 'DISCOVERY_TOOLS',
JWT_ANALYZER = 'JWT_ANALYZER',
EXPLOIT_TOOLS = 'EXPLOIT_TOOLS',
FILE_UPLOAD_AUDITOR = 'FILE_UPLOAD_AUDITOR',
WEB_SEC_AGENT = 'WEB_SEC_AGENT',
XSS_EXPLOIT_ASSISTANT = 'XSS_EXPLOIT_ASSISTANT', // This is a special view, not in the main navigator
SQL_EXPLOIT_ASSISTANT = 'SQL_EXPLOIT_ASSISTANT', // Special view for SQLi
CLI_FRAMEWORK = 'CLI_FRAMEWORK',
HISTORY = 'HISTORY',
}
export enum Tool {
SAST = 'SAST',
DAST = 'DAST',
SECURITY_HEADERS_ANALYZER = 'SECURITY_HEADERS_ANALYZER',
JS_RECON = 'JS_RECON',
DOM_XSS_PATHFINDER = 'DOM_XSS_PATHFINDER',
PAYLOAD_FORGE = 'PAYLOAD_FORGE',
SSTI_FORGE = 'SSTI_FORGE',
PRIVESC_PATHFINDER = 'PRIVESC_PATHFINDER',
OOB_INTERACTION_HELPER = 'OOB_INTERACTION_HELPER',
URL_LIST_FINDER = 'URL_LIST_FINDER',
SUBDOMAIN_FINDER = 'SUBDOMAIN_FINDER',
API_DISCOVERY = 'API_DISCOVERY',
}
export type AgentType = 'web' | 'kali' | 'recon' | 'bugtrace';
export enum Severity {
CRITICAL = 'Critical',
HIGH = 'High',
MEDIUM = 'Medium',
LOW = 'Low',
INFO = 'Info',
UNKNOWN = 'Unknown'
}
export type DastScanType = 'recon' | 'active' | 'greybox';
export interface InjectionPoint {
type: 'URL_PARAM' | 'POST_PARAM' | 'PATH';
parameter: string; // e.g., 'q', 'name', 'id'
method?: 'GET' | 'POST';
}
export interface Vulnerability {
vulnerability: string;
severity: Severity;
description: string;
impact: string;
recommendation: string;
vulnerableCode: string; // The vulnerable pattern or example payload
injectionPoint?: InjectionPoint; // Where the injection occurs
}
export interface VulnerabilityReport {
id?: string;
analyzedTarget: string;
vulnerabilities: Vulnerability[];
}
export interface XssPayload {
payload: string;
description: string;
mechanism: string;
encoding: string;
}
export interface XssPayloadResult {
payloads: XssPayload[];
explanation: string;
}
export interface SqlmapCommandResult {
command: string;
explanation: string;
}
export interface ForgedPayload {
technique: string;
description: string;
payload: string;
}
export interface ForgedPayloadResult {
payloads: ForgedPayload[];
}
export interface FormInput {
name: string;
type: string;
value?: string;
isVulnerable: boolean;
}
export interface ExploitPath {
exploitUrl: string;
formMethod: 'GET' | 'POST';
formInputs: FormInput[];
reproductionGuide: string;
}
export interface ChatMessage {
role: 'user' | 'model' | 'system';
content: string;
isLoading?: boolean;
}
export interface ExploitContext {
vulnerability: Vulnerability;
targetUrl?: string;
}
export interface HeaderFinding {
name: string;
value: string | null;
status: 'Present - Good' | 'Present - Misconfigured' | 'Missing';
recommendation: string;
severity: 'High' | 'Medium' | 'Low' | 'Info';
}
export interface HeadersReport {
analyzedUrl: string;
overallScore: 'A+' | 'A' | 'B' | 'C' | 'D' | 'F';
summary: string;
findings: HeaderFinding[];
}
// Types for DOM XSS Pathfinder
export interface DomXssConnectedPath {
source: string;
sink: string;
code_snippet: string;
explanation: string;
}
export interface DomXssUnconnectedFinding {
type: 'source' | 'sink';
value: string;
}
export interface DomXssAnalysisResult {
connected_paths: DomXssConnectedPath[];
unconnected_findings: DomXssUnconnectedFinding[];
}
export interface FileUploadAnalysisResult {
found: boolean;
description: string;
manualTestingGuide: string;
}
export interface ApiKeys {
openrouter: string;
[key: string]: string; // Support any provider key (e.g. 'zai')
}
export type ApiOptions = {
apiKey: string;
model: string;
};
// New interface for vulnerability validation result
export interface ValidationResult {
is_valid: boolean;
reasoning: string;
}