Vulnerability Discovery and Analysis
A tester has an unpacked application directory, no container image, and wants Grype to list vulnerable dependencies in it. Which command should the tester run?
Show the answer
Correct answerA. grype dir:./app
AWhy this is right: The dir: source makes Grype scan a directory and report vulnerabilities in the packages it finds.
BWhy not this: Nikto scans web servers by host, not files on disk, so it cannot assess dependencies.
CWhy not this: Syft catalogs packages into an SBOM but does not match them against vulnerabilities.
DWhy not this: The trivy image subcommand expects a container image, not a plain directory of files.
Grype accepts a directory source through the dir: scheme, catalogs the packages found there and matches them against its vulnerability database. Syft also reads dir:, but it only generates an SBOM and reports no vulnerabilities.