feat(guru-scan): fix exit code capture, add GURUSCAN_RESULT_JSON reporting, pre-scan hardening
Exit code fix: add $proc.Handle caching after Start-Process -PassThru to prevent
the handle from being released before ExitCode is readable (known PS5.1 bug).
GuruRMM reporting: launcher now finds results.json after each scan and emits
GURUSCAN_RESULT_JSON:<compressed> to stdout. Agent CommandResult captures it;
server stores it in commands.stdout for retrieval via GET /api/commands/:id.
Pre-scan hardening:
- Pre-flight EXE check: warns about missing scanner binaries before run starts
- Windows Defender exclusions added for scanner/log paths before scan, removed after
AdwCleaner: add /path {LOG_ROOT} arg so logs write directly to scan log root;
update log_src to {LOG_ROOT}\Logs to match.
HitmanPro: add /quiet to scan and clean args to suppress GUI in headless runs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
"service_names": [],
|
||||
"hitmanpro_trial_reset": false,
|
||||
"whitelist_arg": null,
|
||||
"wait_on_process": null
|
||||
"wait_on_process": null,
|
||||
"session0_compatible": true
|
||||
},
|
||||
{
|
||||
"name": "AdwCleaner",
|
||||
@@ -33,18 +34,19 @@
|
||||
"download_url": "https://adwcleaner.malwarebytes.com/adwcleaner?channel=release",
|
||||
"manual_download": true,
|
||||
"manual_download_note": "Malwarebytes blocks automated downloads; download manually from https://www.malwarebytes.com/adwcleaner",
|
||||
"scan_args": ["/eula", "/scan", "/noreboot"],
|
||||
"clean_args": ["/eula", "/clean", "/noreboot"],
|
||||
"log_src": "C:\\AdwCleaner\\Logs",
|
||||
"scan_args": ["/eula", "/scan", "/noreboot", "/path", "{LOG_ROOT}"],
|
||||
"clean_args": ["/eula", "/clean", "/noreboot", "/path", "{LOG_ROOT}"],
|
||||
"log_src": "{LOG_ROOT}\\Logs",
|
||||
"timeout_min": 60,
|
||||
"randomize_exe": false,
|
||||
"pre_close_processes": [],
|
||||
"pre_clean_paths": ["C:\\AdwCleaner"],
|
||||
"post_clean_paths": ["C:\\AdwCleaner"],
|
||||
"post_clean_paths": [],
|
||||
"service_names": ["AdwCleanerSvc"],
|
||||
"hitmanpro_trial_reset": false,
|
||||
"whitelist_arg": null,
|
||||
"wait_on_process": "AdwCleaner"
|
||||
"wait_on_process": "AdwCleaner",
|
||||
"session0_compatible": false
|
||||
},
|
||||
{
|
||||
"name": "Emsisoft",
|
||||
@@ -94,7 +96,8 @@
|
||||
"service_names": [],
|
||||
"hitmanpro_trial_reset": false,
|
||||
"whitelist_arg": "emsisoft",
|
||||
"wait_on_process": "a2cmd"
|
||||
"wait_on_process": "a2cmd",
|
||||
"session0_compatible": true
|
||||
},
|
||||
{
|
||||
"name": "HitmanPro",
|
||||
@@ -109,12 +112,14 @@
|
||||
"scan_args": [
|
||||
"/noinstall",
|
||||
"/scan",
|
||||
"/quiet",
|
||||
"/log=\"{LOG_ROOT}\\HitmanPro_Scan_Log.txt\"",
|
||||
"/excludelist=\"C:\\GuruScan\\whitelist.txt\""
|
||||
],
|
||||
"clean_args": [
|
||||
"/noinstall",
|
||||
"/clean",
|
||||
"/quiet",
|
||||
"/log=\"{LOG_ROOT}\\HitmanPro_Scan_Log.txt\"",
|
||||
"/excludelist=\"C:\\GuruScan\\whitelist.txt\""
|
||||
],
|
||||
@@ -137,7 +142,8 @@
|
||||
"service_names": [],
|
||||
"hitmanpro_trial_reset": true,
|
||||
"whitelist_arg": "hitmanpro",
|
||||
"wait_on_process": "HitmanPro_x64"
|
||||
"wait_on_process": "HitmanPro_x64",
|
||||
"session0_compatible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user