docs/guide/coverage/language/index.md
Trivy supports programming languages for
The files analyzed vary depending on the target. This is because Trivy primarily categorizes targets into two groups:
If the target is a pre-build project, like a code repository, Trivy will analyze files used for building, such as lock files.
On the other hand, when the target is a post-build artifact, like a container image, Trivy will analyze installed package metadata like .gemspec, binary files, and so on.
| Language | File | Image1 | Rootfs2 | Filesystem3 | Repository4 |
|---|---|---|---|---|---|
| Ruby | Gemfile.lock | - | - | ✅ | ✅ |
| gemspec | ✅ | ✅ | - | - | |
| Python | Pipfile.lock | - | - | ✅ | ✅ |
| poetry.lock | - | - | ✅ | ✅ | |
| uv.lock | - | - | ✅ | ✅ | |
| requirements.txt | - | - | ✅ | ✅ | |
| egg package5 | ✅ | ✅ | - | - | |
| wheel package6 | ✅ | ✅ | - | - | |
| PHP | composer.lock | - | - | ✅ | ✅ |
| installed.json | ✅ | ✅ | - | - | |
| Node.js | package-lock.json | - | - | ✅ | ✅ |
| yarn.lock | - | - | ✅ | ✅ | |
| pnpm-lock.yaml | - | - | ✅ | ✅ | |
| bun.lock | - | - | ✅ | ✅ | |
| package.json | ✅ | ✅ | - | - | |
| .NET | packages.lock.json | ✅ | ✅ | ✅ | ✅ |
| packages.config | ✅ | ✅ | ✅ | ✅ | |
| .deps.json | ✅ | ✅ | ✅ | ✅ | |
| *Packages.props7 | ✅ | ✅ | ✅ | ✅ | |
| Java | JAR/WAR/PAR/EAR8 | ✅ | ✅ | - | - |
| pom.xml | - | - | ✅ | ✅ | |
| *gradle.lockfile | - | - | ✅ | ✅ | |
| *.sbt.lock | - | - | ✅ | ✅ | |
| Go | Binaries built by Go | ✅ | ✅ | - | - |
| go.mod | - | - | ✅ | ✅ | |
| Rust | Cargo.lock | ✅ | ✅ | ✅ | ✅ |
| Binaries built with cargo-auditable | ✅ | ✅ | - | - | |
| C/C++ | conan.lock | - | - | ✅ | ✅ |
| Elixir | mix.lock9 | - | - | ✅ | ✅ |
| Dart | pubspec.lock | - | - | ✅ | ✅ |
| Swift | Podfile.lock | - | - | ✅ | ✅ |
| Package.resolved | - | - | ✅ | ✅ | |
| Julia | Manifest.toml | ✅ | ✅ | ✅ | ✅ |
The path of these files does not matter.
Example: Dockerfile
✅ means "enabled" and - means "disabled" in the image scanning ↩
✅ means "enabled" and - means "disabled" in the rootfs scanning ↩
✅ means "enabled" and - means "disabled" in the filesystem scanning ↩
✅ means "enabled" and - means "disabled" in the git repository scanning ↩
*.egg-info, *.egg-info/PKG-INFO, *.egg and EGG-INFO/PKG-INFO ↩
.dist-info/METADATA ↩
Directory.Packages.props and legacy Packages.props file names are supported ↩
*.jar, *.war, *.par and *.ear ↩
To scan a filename other than the default filename use file-patterns ↩