cfg/bin/vuln-report
Knut Ahlers 358d665ff0
Add vuls helpers
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-08-17 11:57:04 +02:00

14 lines
471 B
Bash
Executable file

#!/bin/bash
set -euxo pipefail
RESULTS_DIR=${RESULTS_DIR:-$(pwd)}
# If the binary is not yet there, do an initialization
[ -f ${HOME}/.bin/vuls ] || ${HOME}/bin/vuls-refresh
[ $(( $(date +%s) - $(stat -c %Y ${HOME}/.cache/vuls/oval.sqlite3) )) -gt 86400 ] && ${HOME}/bin/vuls-refresh
# spawn reporter
exec ${HOME}/.bin/vuls report \
--cvedb-path ${HOME}/.cache/vuls/cve.sqlite3 \
--ovaldb-path ${HOME}/.cache/vuls/oval.sqlite3 \
--results-dir "${RESULTS_DIR}" "$@"