Commit 8b77ede
[agent-smith] introduce file detector (#21010)
* feat(agent-smith): implement filesystem signature scanning
- Add filesystem scanning capability to detect suspicious files in workspaces
- Scan workspace directories directly from WorkingArea/{InstanceID} paths
- Support filesystem signatures with filename patterns and regex matching
- Add FilesystemScanning configuration with WorkingArea path
- Integrate filesystem detection with existing signature classifier
- Fix regex pattern matching in signature matching logic
- Add comprehensive filesystem scanning tests
- Update example configuration with filesystem signatures
Co-authored-by: Ona <[email protected]>
* cleanup
* Use a separate func for matching for filesystem signatures
* Fix logging for successful match
* Simplify & no metrics
Co-authored-by: Ona <[email protected]>
* Don't get fooled by the match
* Revert "Don't get fooled by the match"
This reverts commit 124b7ac.
Co-authored-by: Ona <[email protected]>
* Cleanup
Co-authored-by: Ona <[email protected]>
* More cleanup
* Renaming and metric removal
* Fix build
---------
Co-authored-by: Ona <[email protected]>1 parent 0d84199 commit 8b77ede
File tree
13 files changed
+1447
-37
lines changed- components/ee/agent-smith
- pkg
- agent
- classifier
- config
- detector
- dev/preview/workflow/preview
- install/installer/pkg/components/agent-smith
13 files changed
+1447
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 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 | + | |
138 | 166 | | |
139 | 167 | | |
140 | 168 | | |
| |||
150 | 178 | | |
151 | 179 | | |
152 | 180 | | |
153 | | - | |
154 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
155 | 185 | | |
156 | 186 | | |
157 | 187 | | |
| |||
227 | 257 | | |
228 | 258 | | |
229 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
230 | 266 | | |
231 | 267 | | |
232 | 268 | | |
233 | 269 | | |
234 | 270 | | |
235 | 271 | | |
236 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
237 | 282 | | |
238 | 283 | | |
239 | 284 | | |
240 | 285 | | |
| 286 | + | |
| 287 | + | |
241 | 288 | | |
242 | 289 | | |
243 | 290 | | |
| |||
268 | 315 | | |
269 | 316 | | |
270 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
271 | 337 | | |
272 | 338 | | |
273 | 339 | | |
| |||
288 | 354 | | |
289 | 355 | | |
290 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
291 | 366 | | |
292 | 367 | | |
293 | 368 | | |
| |||
319 | 394 | | |
320 | 395 | | |
321 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
322 | 423 | | |
323 | 424 | | |
324 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
173 | 179 | | |
174 | 180 | | |
175 | 181 | | |
| 182 | + | |
176 | 183 | | |
177 | 184 | | |
178 | 185 | | |
| |||
223 | 230 | | |
224 | 231 | | |
225 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
226 | 290 | | |
227 | 291 | | |
228 | 292 | | |
| |||
240 | 304 | | |
241 | 305 | | |
242 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
243 | 318 | | |
244 | 319 | | |
245 | 320 | | |
| |||
0 commit comments