From 054db0153f723819dcda648cc4eac3b7c9b254fc Mon Sep 17 00:00:00 2001 From: arch_agent Date: Tue, 4 Aug 2026 11:42:55 +0200 Subject: [PATCH] fix: /api/scan returns scan_only flag + -S flag handling in client - server.py: /api/scan now includes scan_only in response - client: -S flag properly stripped (was treated as package name) - client: detects scan_only from scan response to decide local vs repo --- aur_shield/server.py | 1 + install-client.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/aur_shield/server.py b/aur_shield/server.py index 8ee6162..3f07d9c 100644 --- a/aur_shield/server.py +++ b/aur_shield/server.py @@ -103,6 +103,7 @@ async def scan_package(package: str) -> dict[str, Any]: "version": source.package.version, "ioc_matches": result.ioc_matches, "typosquat_matches": result.typosquat_matches, + "scan_only": cfg.server.scan_only, } diff --git a/install-client.sh b/install-client.sh index b5d66fe..f3dbb2c 100644 --- a/install-client.sh +++ b/install-client.sh @@ -298,6 +298,13 @@ for ioc in d.get('ioc_matches',[]): exit 0 fi +# -S : Install mode (same as default, but skip flags) +INSTALL_MODE=false +if [ "$1" = "-S" ]; then + INSTALL_MODE=true + shift +fi + # --noinstall mode (scan only, don't build/install) NOINSTALL=false if [ "$1" = "--noinstall" ] || [ "$1" = "--scan-only" ]; then