I created this to search BioContainers images for https://github.com/NCSC-NL/OpenSSL-2022 before it turned out that the bug is probably practically unexploitable, but should be useful in the future if we have another such case:
$ $HOME/bin/scan-singularity.sh -d 2021-09-01 -i /singularity -l ./log -s $HOME '/usr/local/conda-meta/openssl-3\..*'
For my own personal notes, I ran this on a manually-created LX-Brand CentOS 7 VM (alias: singularity-scan
) on rochefort with the singularity zfs dataset lofs-mounted in. From there you can install epel-release and singularity-runtime, which can work with sif files (even though it can't run them in LX). tmpfs created with:
# useradd -d /home/scan -m -s /bin/bash scan
# mkdir /ram
# mount -t tmpfs -o rw,nosuid,size=$(printf %.f $(bc -l <<< "$(grep MemTotal: /proc/meminfo | awk '{print $2}') * 0.8 * 1024")),mode=0700,nodevices tmp /ram
# chown scan:scan /ram