Skip to content

Commit a22536c

Browse files
authored
feat: Add cargoaudit extractor to artifacts (#1770)
Enable the cargoaudit extractor in container scanning
1 parent 1ad7012 commit a22536c

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

docs/supported_languages_and_lockfiles.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@ We found that when performing different forms of scanning, you are generally int
3030

3131
When scanning container images (`osv-scanner scan image ...`), OSV-Scanner automatically extracts and analyzes the following artifacts:
3232

33-
| Source | Example files |
34-
| ------------------------------- | ---------------------------------- |
35-
| Alpine APK packages | `/lib/apk/db/installed` |
36-
| Debian/Ubuntu dpkg/apt packages | `/var/lib/dpkg/status` |
37-
| | |
38-
| Go Binaries | `main-go` |
39-
| Java Uber `jars` | `my-java-app.jar` |
40-
| Node Modules | `node-app/node_modules/...` |
41-
| Python wheels | `lib/python3.11/site-packages/...` |
33+
| Source | Example files |
34+
| ------------------------------------ | ---------------------------------- |
35+
| Alpine APK packages | `/lib/apk/db/installed` |
36+
| Debian/Ubuntu dpkg/apt packages | `/var/lib/dpkg/status` |
37+
| | |
38+
| Go Binaries | `main-go` |
39+
| Rust Binaries (with cargo-auditable) | `main-rust-built-with-auditable` |
40+
| Java Uber `jars` | `my-java-app.jar` |
41+
| Node Modules | `node-app/node_modules/...` |
42+
| Python wheels | `lib/python3.11/site-packages/...` |
4243

4344
## Supported lockfiles/manifests
4445

pkg/osvscanner/internal/scanners/extractorbuilder.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/google/osv-scalibr/extractor/filesystem/language/python/wheelegg"
3333
"github.com/google/osv-scalibr/extractor/filesystem/language/r/renvlock"
3434
"github.com/google/osv-scalibr/extractor/filesystem/language/ruby/gemfilelock"
35+
"github.com/google/osv-scalibr/extractor/filesystem/language/rust/cargoauditable"
3536
"github.com/google/osv-scalibr/extractor/filesystem/language/rust/cargolock"
3637
"github.com/google/osv-scalibr/extractor/filesystem/os/apk"
3738
"github.com/google/osv-scalibr/extractor/filesystem/os/dpkg"
@@ -177,6 +178,8 @@ func BuildArtifactExtractors() []filesystem.Extractor {
177178
gobinary.New(gobinary.DefaultConfig()),
178179
// Javascript
179180
nodemodules.Extractor{},
181+
// Rust
182+
cargoauditable.NewDefault(),
180183

181184
// --- OS packages ---
182185
// Alpine

0 commit comments

Comments
 (0)