Skip to main content

Apt Inventory

@aaronge/apt-inventoryv2026.11.05.2· 26d agoBEHAVIORSWORKFLOWSREPORTS
01README

Observes APT package inventory and pending upgrades on Debian/apt-based Linux, with security-update classification, versioned delta reporting, debsecan CVE cross-checking, and a safety-gated install/remove for verified security updates. Verified on Raspberry Pi 5 / Debian 13 trixie, arm64.

02Release Notes

Documentation, descriptions and setup brought up to date with running every workflow under a single swamp serve (2026-11-05).

03Behaviors1
@aaronge/apt-inventoryv2026.08.25.5apt.ts

Global Arguments

ArgumentTypeDescription
securityOrigin?stringSubstring matched against the origin field in `Inst` lines to classify
timeout?numberTimeout in milliseconds for apt/dpkg subprocess calls. Apt operations
suite?stringDebian release codename passed to debsecan's --suite flag. Unlike
fn query()
Reads currently installed packages via dpkg-query (read-only, no privileges).
fn listUpgradable()
Simulates a dist-upgrade via apt-get -s (no root, no system change) and classifies pending packages, including security relevance.
fn refresh()
Refreshes apt's package lists via `sudo apt-get update -qq` (root required; apt lists only, no other system changes). Produces no resource — run listUpgradable/query afterward to see updated state.
fn install(package: string, version?: string)
Installs a package via the root-owned `/usr/local/sbin/apt-security-install`
ArgumentTypeDescription
packagestringPackage name to install.
version?stringExact version to install (e.g. `1:2.3.4-1`). If the package is already
fn remove(package: string)
Removes a package via `sudo DEBIAN_FRONTEND=noninteractive apt-get remove -y -qq` (root required; sudoers grants this for any package — no analogous safety gate to install's, since there's no equivalent notion of a 'verified safe' removal). Idempotent: no-ops if already absent. Produces a fresh `installed` snapshot either way.
ArgumentTypeDescription
packagestringPackage name to remove.
fn scanVulnerabilities()
Runs debsecan against installed packages and cross-checks its fix-available claims against dpkg's own version comparison — debsecan's database doesn't understand vendor rebuild suffixes (e.g. Raspberry Pi OS's `+rptN`), which produces false positives (verified on this machine: every current fix-available entry is one). Read-only, no privileges (debsecan itself needs no root).

Resources

installed(infinite)— Snapshot of installed packages, per `dpkg-query`.
upgradable(infinite)— Packages apt would upgrade/install right now, per `apt-get -s -qq dist-upgrade`.
vulnerabilities(infinite)— Known CVEs against installed packages, per `debsecan`, cross-checked against dpkg's own version comparison to filter out vendor-rebuild false positives.
04Workflows1
@aaronge/apt-report2a48804b-3b12-4d4c-8108-fdf2559920a3

Collects apt package/upgrade state, prints a human-readable report with the delta since the last run, and fails the run when security-relevant upgrades are pending.

refreshRefresh apt's package lists (root, apt lists only — no other system changes) so collect reflects current repo state.
1.apt-updateapt-local.refresh
collectObserve current apt state (read-only, no privileges).
1.list-upgradableapt-local.listUpgradable— Simulate a dist-upgrade to see what's pending.
2.query-installedapt-local.query— Snapshot currently installed packages.
reportPrint total upgradable, security-relevant, installed counts, and deltas vs the previous run.
1.print-report— Report values come from the @aaronge/apt-inventory-delta model-scope report, computed automatically after collect's method runs.
alertFail the run when security-relevant upgrades are pending — the notification mechanism for v1.
1.security-gate
05Reports1
@aaronge/apt-inventory-deltamodel
apt_delta.ts

Total upgradable, security-relevant, and installed package counts, with the delta since the previous run.

aptinventory
06Previous Versions2
2026.11.05.1

Ship the workflow in the package so a single ops repo can pull it and run it under swamp serve's own scheduler.

Added 1 workflows

2026.08.25.1
07Stats
A
93 / 100
Downloads
44
Archive size
23.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License1/2partial

    no SPDX license declared

  • Verified public repository2/2earned
08Platforms
09Labels