future-architect/vuls

Do you want to work on this issue?
You can request for a bounty in order to promote it!
Absolute symlink for 'current' in 'results' dir is wrong while checking on docker host #1021
jirib posted onGitHub
What did you do? (required. The issue will be closed when not provided.)
I ran vuls scan
and vuls report
inside a container which was run with:
docker run --rm -it --entrypoint=/bin/ash \
-v /data/vuls/data:/vuls \
-v /data/vuls/logs/vuls-log:/var/log/vuls \
-v /data/vuls/config.toml:/root/config.toml:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /data/vuls/ssh:/root/.ssh:ro \
5803c81b028c
The current
symlink in results
dir is broken on docker host because the symlink is absolute (the link was created inside the container with). IMO this is not necessary, relative symlink should be OK and thus the symlink would work on docker host too.
On docker host:
# ls -ltr results/{current,2020-07-15T09:53:15Z}
lrwxrwxrwx 1 root root 34 Jul 15 11:53 results/current -> /vuls/results/2020-07-15T09:53:15Z
results/2020-07-15T09:53:15Z:
total 120
-rw------- 1 root root 122030 Jul 15 11:53 foo.example.com.json
# ls -l /vuls/results/2020-07-15T09:53:15Z
ls: cannot access /vuls/results/2020-07-15T09:53:15Z: No such file or directory
Version:
# docker inspect 5803c81b028c | jq '.[].RepoDigests'
[
"vuls/vuls@sha256:e39edb92833e7d6f6490620e11221f1a456ca2dec4f5f3ab1c15e12c75ecdcbb"
]