-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathtrident-spec.json
219 lines (219 loc) · 6.44 KB
/
trident-spec.json
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Trident Configuration",
"description": "Configuration schema for Trident fuzzing framework",
"type": "object",
"properties": {
"honggfuzz": {
"type": "object",
"description": "Honggfuzz-specific configuration options",
"properties": {
"timeout": {
"type": "integer",
"description": "Timeout in seconds",
"minimum": 0,
"maximum": 65535,
"default": 10
},
"iterations": {
"type": "integer",
"description": "Number of fuzzing iterations (0 means no limit)",
"minimum": 0,
"default": 0
},
"threads": {
"type": "integer",
"description": "Number of concurrent fuzzing threads",
"minimum": 0,
"maximum": 65535,
"default": null
},
"keep_output": {
"type": "boolean",
"description": "Don't close children's stdin, stdout, stderr; can be noisy",
"default": false
},
"verbose": {
"type": "boolean",
"description": "Disable ANSI console; use simple log output",
"default": false
},
"exit_upon_crash": {
"type": "boolean",
"description": "Exit upon seeing the first crash",
"default": false
},
"mutations_per_run": {
"type": "integer",
"description": "Maximal number of mutations per one run",
"minimum": 0,
"maximum": 65535,
"default": 6
},
"cargo_target_dir": {
"type": "string",
"description": "Target compilation directory",
"default": "trident-tests/fuzzing/hfuzz_target"
},
"hfuzz_workspace": {
"type": "string",
"description": "Honggfuzz working directory",
"default": "trident-tests/fuzzing/hfuzz_workspace"
},
"crashdir": {
"type": "string",
"description": "Directory where crashes are saved to",
"default": null
},
"extension": {
"type": "string",
"description": "Input file extension",
"default": "fuzz"
},
"run_time": {
"type": "integer",
"description": "Number of seconds this fuzzing session will last (0 means no limit)",
"minimum": 0,
"default": 0
},
"max_file_size": {
"type": "integer",
"description": "Maximal size of files processed by the fuzzer in bytes",
"minimum": 0,
"default": 1048576
},
"save_all": {
"type": "boolean",
"description": "Save all test-cases by appending timestamp to filenames",
"default": false
}
}
},
"afl": {
"type": "object",
"description": "AFL-specific configuration options",
"properties": {
"cargo_target_dir": {
"type": "string",
"description": "Target directory for AFL builds",
"default": "target/debug"
},
"afl_workspace_in": {
"type": "string",
"description": "Input directory for AFL test cases",
"default": "trident-tests/fuzzing/afl_in"
},
"afl_workspace_out": {
"type": "string",
"description": "Output directory for AFL findings",
"default": "trident-tests/fuzzing/afl_out"
},
"iterations": {
"type": "integer",
"description": "Number of executions to perform",
"minimum": 0,
"default": 0
},
"run_time": {
"type": "integer",
"description": "Number of seconds to run for",
"minimum": 0,
"default": 0
},
"seeds": {
"type": "array",
"description": "Initial seeds for AFL fuzzing",
"items": {
"type": "object",
"properties": {
"file_name": {
"type": "string",
"description": "Name of the seed file",
"default": "default_seed"
},
"seed": {
"type": "string",
"description": "Seed content",
"default": ""
},
"override_file": {
"type": "boolean",
"description": "Whether to override existing file",
"default": false
},
"bytes_count": {
"type": "integer",
"description": "Number of bytes for the seed",
"minimum": 0
}
},
"required": [
"file_name"
]
},
"default": []
}
}
},
"fuzz": {
"type": "object",
"description": "General fuzzing configuration",
"properties": {
"fuzzing_with_stats": {
"type": "boolean",
"description": "Enable statistics collection during fuzzing",
"default": false
},
"allow_duplicate_txs": {
"type": "boolean",
"description": "Allow duplicate transactions",
"default": false
},
"programs": {
"type": "array",
"description": "List of programs to fuzz",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Program address (as base-58 encoded string)"
},
"program": {
"type": "string",
"description": "Path to program binary"
}
},
"required": [
"address",
"program"
]
},
"default": []
},
"accounts": {
"type": "array",
"description": "List of accounts to use in fuzzing",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Account address (as base-58 encoded string)"
},
"filename": {
"type": "string",
"description": "Path to account data file"
}
},
"required": [
"address",
"filename"
]
},
"default": []
}
}
}
}
}