diff --git a/ova/Alpine.ova b/ova/Alpine.ova new file mode 100644 index 00000000..2b0ae6bf Binary files /dev/null and b/ova/Alpine.ova differ diff --git a/ova/Dockerfile b/ova/Dockerfile new file mode 100644 index 00000000..1f6a8e8b --- /dev/null +++ b/ova/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:22.04 + +RUN apt-get update + +RUN mkdir -p /testdata + +# Set working directory +WORKDIR /testdata + +# Copy valid-but-nonbootable .ova file into the container +COPY Alpine.ova /testdata/Alpine.ova + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/ova/README.md b/ova/README.md new file mode 100644 index 00000000..1abdca63 --- /dev/null +++ b/ova/README.md @@ -0,0 +1,26 @@ +# OSV-Scalibr: OVA Extractor + +This directory contains the test Dockerfile for testing OSV-Scalibr's ova Extractor plugin. Open Virtualization Appliance (OVA) package is a tar archive file with the OVF directory inside. Open Virtualization Format (OVF) is an open standard for packaging and distributing virtual appliances. + +## Setup + +### Build the Docker Image + +```bash +cd security-testbeds/ova +docker build -t ova-extractor-testbed . +``` + +### Run the Container + +```bash +docker run -it --rm ova-extractor-testbed /bin/bash +``` + +### Running OSV-Scalibr + +Build or copy the `scalibr` binary to the current directory, and inside the container, run `scalibr` with the ova extractor: + +```bash +./scalibr --extractors=embeddedfs/ova --result=output.textproto . +``` \ No newline at end of file