Hi @danvuong0514 thanks for the post. These are great questions!
That depends. The main difference is that packages that are added in one layer and then later removed, so that they’re not in the final image, will show up in the scan with all-layers but not with squashed.
No. CycloneDX is lossy compared to Syft’s native format. syft -o json > mysbom.json ; grype mysbom.jsondoes result in equivalent scans right now.
It can increase false positives, but may also decrease false negatives.
You should scan a syft -o json SBOM, in which case syft will detect the distro from /etc/os-release and similar. I don’t know off the top of my head why --distro auto does with CycloneDX.
We try to make the defaults be as good as we can.
Syft by default will try top guess what it’s input is and try to fetch it however it can. If you pass --from docker it will only try to use the local docker daemon.
Let me know if you have any questions! I hope that helps!