diff --git a/include/tests_ports_packages b/include/tests_ports_packages index f6681df4..7c0a7bdc 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -659,7 +659,12 @@ PACKAGE_AUDIT_TOOL_FOUND=1 PACKAGE_AUDIT_TOOL="pkg audit" if [ -f ${ROOTDIR}var/db/pkg/vuln.xml ]; then - FIND=$(${PKG_BINARY} audit 2> /dev/null) + # Query pkg audit, with optional refresh of vulnerability data (-F) + if [ ${REFRESH_REPOSITORIES} -eq 1 ]; then + FIND=$(${PKG_BINARY} audit -F -q 2> /dev/null) + else + FIND=$(${PKG_BINARY} audit -q 2> /dev/null) + fi if [ $? -eq 0 ]; then LogText "Result: pkg audit results are clean" Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result "${STATUS_NONE}" --color GREEN