2024-04-08 13:01:20 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -x
|
|
|
|
|
|
|
|
IMAGE=$1
|
|
|
|
|
|
|
|
modprobe nbd
|
|
|
|
qemu-nbd -c /dev/nbd0 --read-only $IMAGE
|
2024-06-14 12:58:48 +00:00
|
|
|
mount -o ro /dev/nbd0p2 /mnt/temp/
|
|
|
|
trivy rootfs -d /mnt/temp
|
2024-04-08 13:01:20 +00:00
|
|
|
umount /mnt/temp
|
|
|
|
qemu-nbd -d /dev/nbd0
|