Skip to content

Commit f00dcc2

Browse files
committed
Add VDI Test Image for OSV-Scalibr
Related PR: google/osv-scalibr#1348 Related issue: google/osv-scalibr#1216 Signed-off-by: Yuvraj Saxena <ysaxenax@gmail.com>
1 parent 594236f commit f00dcc2

4 files changed

Lines changed: 39 additions & 0 deletions

File tree

vdi/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt-get update
4+
5+
RUN mkdir -p /testdata
6+
7+
# Set working directory
8+
WORKDIR /testdata
9+
10+
# Copy valid .vdi file into the container
11+
COPY valid.vdi /testdata/valid.vdi
12+
13+
CMD ["/bin/bash"]

vdi/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# OSV-Scalibr: VMDK Extractor
2+
3+
This directory contains a test Dockerfile for validating OSV-Scalibr's VMDK Extractor plugin. A VMDK (Virtual Machine Disk) file is a disk image format commonly used by virtual machines to emulate a physical hard drive.
4+
5+
## Setup
6+
7+
### Build the Docker Image
8+
9+
```bash
10+
cd security-testbeds/vmdk
11+
docker build -t vmdk-extractor-testbed .
12+
```
13+
14+
### Run the Container
15+
16+
```bash
17+
docker run -it --rm vmdk-extractor-testbed /bin/bash
18+
```
19+
20+
### Running OSV-Scalibr
21+
22+
Build or copy the `scalibr` binary to the current directory, and inside the container, run `scalibr` with the vmdk extractor:
23+
24+
```bash
25+
./scalibr --extractors=embeddedfs/vmdk --result=output.textproto valid.vmdk
26+
```

vdi/valid.vdi

8 MB
Binary file not shown.

vdi/valid.vmdk

832 KB
Binary file not shown.

0 commit comments

Comments
 (0)