FileSystemCollector skips Ubuntu directories
See original GitHub issueI tried to collect a baseline in Ubuntu 20.04 but it looks like that it does not collect file system correctly (only shows scanning of /bin and /snap) and skips several directories, see details in screenshot.
I would expect ASA to scan directories listed in the screenshot (ls /). Note that there was a bug fix two years ago where some Ubuntu directories were skipped intentionally, see https://github.com/microsoft/AttackSurfaceAnalyzer/issues/555.
If I add --verbose, it looks like it goes through all directories (except /sys and /proc) as expected. Checking log file gives:
administrator@focal:/tmp/ASA_linux_2.3.284$ cat asa.log.txt | grep "Scanning root" 2022-09-16 17:33:42.698 +03:00 [INF] Scanning root /bin 2022-09-16 17:34:42.862 +03:00 [INF] Scanning root /snap administrator@focal:/tmp/ASA_linux_2.3.284$
So, maybe all expected directories are collected as indicated by verbose output but it does not print “Scanning root” for all directories to the command line?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
That is peculiar. I’ll have to take a look at the logging behavior as it seems from your additional tests that the scanning is being done but the messages just aren’t hitting the console.
The second behavior is I think, expected. If you provide a list of selected directories they are scanned one at a time so you’ll with those arguments only get a message for
/
.Awesome. Glad that resolved it.