Improve vulnerability notifier

This commit is contained in:
2025-08-08 18:30:12 +01:00
parent cef46c8b1e
commit 7761e3282c
2 changed files with 7 additions and 0 deletions

View File

@@ -106,7 +106,10 @@ if [ $W_MAIN = "flatpak" ]; then
fi fi
if [ $W_MAIN = "vulns" ]; then if [ $W_MAIN = "vulns" ]; then
printf "%b\n" "${CYAN}[I]${NC} Packages that contain known vulnerabilities:"
arch-audit arch-audit
printf "\n%b\n" "${RED}[I]${NC} Packages that can be fixed by updating:"
arch-audit -u
fi fi
if [ $W_MAIN = "paru" ]; then if [ $W_MAIN = "paru" ]; then

View File

@@ -10,6 +10,8 @@ if command -v paru >/dev/null 2>&1; then
sudo pacman -Rsn $(pacman -Qdtq) sudo pacman -Rsn $(pacman -Qdtq)
printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..." printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..."
sudo pacdiff sudo pacdiff
printf "%b\n" "${YELLOW}[+]${NC} Checking for vulnerabilities..."
arch-audit -u
elif command -v pacman >/dev/null 2>&1; then elif command -v pacman >/dev/null 2>&1; then
printf "%b\n" "${YELLOW}[+]${NC} Updating Arch..." printf "%b\n" "${YELLOW}[+]${NC} Updating Arch..."
sudo pacman -Syu sudo pacman -Syu
@@ -17,6 +19,8 @@ elif command -v pacman >/dev/null 2>&1; then
sudo pacman -Rsn $(pacman -Qdtq) sudo pacman -Rsn $(pacman -Qdtq)
printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..." printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..."
sudo pacdiff sudo pacdiff
printf "%b\n" "${YELLOW}[+]${NC} Checking for vulnerabilities..."
arch-audit -u
elif command -v apt >/dev/null 2>&1; then elif command -v apt >/dev/null 2>&1; then
printf "%b\n" "${YELLOW}[+]${NC} Updating repos..." printf "%b\n" "${YELLOW}[+]${NC} Updating repos..."
sudo apt-get update sudo apt-get update