Skip to content

Add AUR-Malware detail view: per-finding source, dismiss reviewed false positives - #3

Open
Percius04 wants to merge 3 commits into
elynch303:mainfrom
Percius04:aur-malware-dismiss-detail-view
Open

Add AUR-Malware detail view: per-finding source, dismiss reviewed false positives#3
Percius04 wants to merge 3 commits into
elynch303:mainfrom
Percius04:aur-malware-dismiss-detail-view

Conversation

@Percius04

@Percius04 Percius04 commented Jul 30, 2026

Copy link
Copy Markdown

Hi! This is a follow-up on top of #2 rather than another fix, so I opened it as a separate PR instead of folding it in — happy to do it differently if you'd prefer it as part of #2, or merged after, whatever's easiest for you to review.

Problem

The main popup only has room for a status word and a one-line summary ("2 failures, 1 warning out of 18 checks"). It never says WHICH checks failed or why — finding out means running the scanner by hand in a terminal.

Detail view

A "View detail" button (shown when there are findings, same back-button pattern as the existing Settings view) opens a breakdown:

  • Grouped by source when one can be identified: a known-infected package name (straight from the scanner's own output), an npm/bun malicious-indicator package name, the package owning a flagged file path (pacman -Qo), or the comment sitting above a flagged /etc/hosts entry — e.g. a deliberate CurseForge/Overwolf telemetry block shows up labeled as exactly that, not as an unexplained wall of text. Ungrouped findings fall back to "OTHER", sorted after the named groups.
  • Each finding shows its check name, fail/warn icon+color, and full detail text.

Dismiss / reactivate a reviewed false positive

  • Only for checks that are heuristic and prone to false positives. Checks that are direct evidence of an actual compromise — known-infected package, malicious npm/bun indicator, eBPF artifacts, hidden processes, pacman log hits, ld.so.preload injection, persistence artifacts — have no dismiss button at all, full stop. This is what makes dismiss safe on a malware-detection tool: you can silence noise, never the signal that actually matters.
  • Identified by check name + a hash of the exact detail text — if the detail changes (a new infected package shows up, a date moves), the old dismissal stops matching and the finding is active again on its own.
  • The badge color and summary count only active (non-dismissed) findings — otherwise dismissing a known false positive wouldn't stop the badge going red for the same thing every 6h.
  • qs-security-dismiss.sh recomputes the existing status file directly instead of rerunning the scanner (~13s for the network fetch + all 18 checks) — dismissing is bookkeeping over an already-run scan, it doesn't need a fresh one to show up in the badge.

Tested end-to-end on a real machine, including dismissing/reactivating actual findings and confirming the badge/summary update instantly without a rescan. Thanks for taking a look, and no worries at all if you'd rather take this in a different direction!

Fixes elynch303#1 (partially -- AUR-Malware's dead upstream URL is a separate,
unresolved problem left out of this PR on purpose).

- SecurityWidget.qml: bbInstallProc targeted the bumblebee module root
  (github.com/perplexityai/bumblebee@latest), which go install rejects
  ('found, but does not contain package ...'). The installable binary
  lives at cmd/bumblebee. Verified working end-to-end after the fix.

- qs-security-scan.sh + systemd/qs-security-scan.{service,timer}: the
  README documents this script and timer as what feeds the widget's
  status file, but neither was actually shipped in the repo -- so even
  a correctly installed scanner never produced a result. Adds the
  script (skips AUR-Malware cleanly when it's not installed, runs
  bumblebee scan and summarizes package/finding counts) and the unit
  files, plus wires an opt-in step into install.sh mirroring the
  existing bun-check flow.

Tested on a real machine: bumblebee installs and scans correctly,
qs-security-scan.timer runs on the 6h schedule and writes a status
file the widget reads and displays.
Atomic-Arch/AUR-Malware (what the install button cloned and the README
pointed at) has been deleted -- clone always failed, surfaced as the
generic "maybe git isn't in PATH" error. The fallback destination,
/local/applications/AUR-Malware, also isn't writable by a normal user
(no sudo in this flow), so even a working URL would have failed there.

nightdevil00/AUR-Malware -- already linked in this repo's own GitHub
"About" section as the intended source, just never wired into the
README or the install button -- is a maintained fork shipping the same
check-atomic-arch_new.sh entry point. Repointed the install button,
default path/env-var fallback, and README to it, using
~/.local/share/AUR-Malware instead of the root-owned path.

Also fixes the AUR-Malware branch of qs-security-scan.sh, which never
surfaced findings: the script's exit code is always 0 regardless of
result, and the previous "last output line" heuristic picked up a
disclaimer fragment instead of a verdict. Switched to --json and parse
the trailing JSON object (verdict + pass/warn/fail counts) directly.

Fixes elynch303#1.
The main popup only ever had room for a status word and a one-line
summary ("2 failures, 1 warning out of 18 checks") -- it never said
WHICH checks failed or why, so acting on a finding meant running the
scanner by hand in a terminal.

Detail view (accessed via a "View detail" button, same pattern as the
existing Settings view):
- Findings are grouped by source when one can be identified: a known-
  infected package name (straight from the scanner's own output), an
  npm/bun malicious-indicator package name, the package owning a
  flagged file path (pacman -Qo), or the comment sitting above a
  flagged /etc/hosts entry. Ungrouped findings fall back to "OTHER",
  sorted after the named groups.
- Each finding shows its check name and full detail text, with a
  fail/warn icon and color.

Dismiss/reactivate a reviewed false positive:
- Only for checks that qs-security-scan.sh marks dismissible --
  anything that is direct evidence of an actual compromise (known-
  infected package, malicious npm/bun indicator, eBPF artifacts,
  hidden processes, pacman log hits, ld.so.preload injection,
  persistence artifacts) has no dismiss button at all. This is what
  keeps dismiss safe on a malware-detection tool: you can silence
  heuristic noise (a stale /etc/hosts entry, a shell config edited
  after the incident date), never the finding that actually matters.
- Identified by check name + a hash of the exact detail text, so if
  the detail changes (a new infected package appears, a date moves)
  the old dismissal stops matching and the finding is active again on
  its own.
- The badge color and summary count only active (non-dismissed)
  findings, otherwise dismissing a known false positive would not
  stop the badge going red for the same thing every 6h.
- qs-security-dismiss.sh recomputes the existing status file directly
  instead of rerunning the scanner (~13s for the network fetch + all
  18 checks) -- dismissing is bookkeeping over an already-run scan, it
  doesn't need a fresh one to show up in the badge.
Percius04 added a commit to Percius04/security-scan that referenced this pull request Aug 1, 2026
…are fixes, detail view + dismiss, persistence scanner + history + notifications + native-panel UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant