Host artifacts
Host artifacts are not packages. The inventory engine records a baseline on the first scan and a diff on later scans. A diff with no matching indicator produces a host-change finding.
Artifact types
Four artifact types are tracked:
| Artifact | What is recorded |
|---|---|
~/.ssh/authorized_keys | Each key line and its fingerprint |
| LaunchAgents | Path, hash, and the ProgramArguments value |
.pth files | Path, hash, and a flag when a line contains import, exec, base64, urllib, or socket |
| Shell rc files | Hash only |
SSH keys
The engine reads ~/.ssh/authorized_keys and parses each key line. It records:
- The key line text
- The SHA-256 fingerprint in
SHA256:...format - The comment (if any)
One artifact row is written per key line. The path is ~/.ssh/authorized_keys#<fingerprint>, so each key has its own key.
A diff shows new keys and removed keys. The matcher checks the fingerprint against ssh-key indicators.
LaunchAgents
The engine reads:
~/Library/LaunchAgents/*.plist/Library/LaunchAgents/*.plist/Library/LaunchDaemons/*.plist
For each plist, it records:
- Path
- SHA-256 of the file
ProgramArgumentsvalue (joined by one space when it is an array)
The matcher checks persistence indicators against the ProgramArguments value. A string match there produces a compromised finding.
Python .pth files
The engine reads every *.pth file in every site-packages directory. For each, it records:
- Path
- SHA-256 of the file
- The first suspicious line (if any)
- A
suspiciousflag
A line is suspicious when it contains one of these terms: import, exec, base64, urllib, socket.
The LiteLLM 1.107.0 compromise installed litellm_init.pth with this content:
import sys; exec(__import__('base64').b64decode(...))This line would set the suspicious flag.
The matcher checks file-path and file-string indicators against .pth files. A match produces a compromised finding.
Shell rc files
The engine reads:
~/.zshrc~/.zprofile~/.bashrc~/.bash_profile
For each file, it records only the SHA-256 hash. The engine does not read the content.
A diff shows when the hash changed. The matcher does not run string indicators against shell rc files in v1. The diff is shown in the Findings window, and the user inspects it manually.
Baseline and diff
First scan (baseline)
On the first scan, the engine writes every artifact to the baselines table. No host-change findings appear.
The Findings window shows a message: “Baseline recorded. Future scans will show diffs.”
Later scans (diff)
On every later scan, the engine compares the current state to the baseline. Changes produce host-change findings:
| Change | Finding |
|---|---|
| New SSH key | host-change with evidence ssh-key <fingerprint> |
| Removed SSH key | No finding (removal is not a threat) |
| New LaunchAgent | host-change with evidence launch-agent <path> |
| Changed LaunchAgent hash | host-change with evidence launch-agent <path> |
New .pth file | host-change with evidence pth <path> |
Changed .pth hash | host-change with evidence pth <path> |
| Changed shell rc hash | host-change with evidence shell-rc <path> |
A host-change finding is tier: host-change, between vulnerable and exploited in urgency.
If the diff also matches a known indicator (for example, the SSH key fingerprint matches an ssh-key indicator), the tier rises to compromised.
Accepting a baseline
When a host-change finding is legitimate (for example, you added a key yourself), snooze it or accept it.
To reset the baseline after cleaning up:
buckler baseline resetThis writes the current state as the new baseline. Future scans will diff against this state.
Why baseline and diff
Package managers do not track host artifacts. A compromised package can:
- Add an SSH key for persistence
- Install a LaunchAgent that runs at login
- Drop a
.pthfile that runs at every Python start - Modify shell rc files to run on every terminal session
These artifacts persist after pip uninstall or npm uninstall. The baseline and diff mechanism finds them.
The Claude Code extension 2.1.312 and 2.1.313 compromise added an attacker key to ~/.ssh/authorized_keys and installed persistence. Uninstalling the extension left the key in place. A baseline diff would find it.
Limitations
The baseline and diff mechanism does not:
- Track every file on the system (only the short list above)
- Track file content for shell rc files (only hash)
- Track ownership or permissions
- Track cron jobs or other persistence mechanisms (v2)
Buckler is not a general antivirus. It scans package roots and a short list of host artifacts.