feat(scanners): base ABC, registry, and 14 scanner plugins#1
Open
wgordon17 wants to merge 7 commits intogordon-code:mainfrom
Open
feat(scanners): base ABC, registry, and 14 scanner plugins#1wgordon17 wants to merge 7 commits intogordon-code:mainfrom
wgordon17 wants to merge 7 commits intogordon-code:mainfrom
Conversation
Base scanner architecture: - BaseScannerPlugin ABC with @register decorator for auto-registration - Shared _utils.py: run_command (never shell=True), read_plist_safe, hash_file, read_launchd_plists - Scanner names match SystemState fields for CLI wiring 14 concrete scanners: - preferences: plistlib reads from 4 preference directories - applications: /Applications scan + Info.plist + mas cross-reference - homebrew: brew bundle dump + version enrichment via model_copy - dotfiles: known dotfiles + .config/ scan, symlink/stow/git detection - app_config: Application Support + Group Containers, file type classification - fonts: user + system fonts filtered by extension - launch_agents: LaunchAgents/Daemons plists + sfltool login items - shell: fish/zsh/bash rc parsing, sensitive env var filtering - network: batched listallhardwareports + ifconfig (no N+1) - security: FileVault, SIP, Gatekeeper, firewall, TCC.db (read-only) - system: hostname, timezone, locale, pmset, Spotlight - display: system_profiler SPDisplaysDataType JSON parsing - audio: system_profiler SPAudioDataType + osascript alert volume - cron: crontab -l + launchd StartCalendarInterval detection 193 tests (149 scanner + 44 model), ruff clean, pyright clean.
3dccf45 to
f09331c
Compare
- Remove dead except ValueError around is_relative_to() in dotfiles - Remove unused _path param from _detect_manager - Refactor register from bare decorator to register(name) factory, eliminating import-time class instantiation - Extract _classify_device() helper in audio scanner - Tighten shell function regex to column-0 only - Add comments: sfltool JSON limitation, en0 Wi-Fi fallback, heredoc caveat - Add 18 tests: sensitive env filtering (posix+fish), hash_file (6), read_launchd_plists (4), large file skip, unclassified audio device, stow parent-name detection, Group Containers, display resolution fallback, posix function detection
- Catches ValueError/OverflowError in read_plist_safe for corrupt dates - Skips plists with non-dict root values in preferences scanner - Adds /etc/localtime symlink fallback when systemsetup needs admin - Reduces expected PermissionError logs to DEBUG in app_config scanner
- Replaces broken JSON parser with text format parser for sfltool dumpbtm - Filters by current user UID and login item type - Falls back to Bundle Identifier when Name is null - Skips plists with non-dict root values in preferences scanner
- Detects login shell via dscl instead of $SHELL env var - Splits plist error handling by type: PermissionError→DEBUG, ValueError/OverflowError→WARNING, OSError→WARNING - Apple-prefixed app dirs get DEBUG, non-Apple keep WARNING - Captures enabled/disabled disposition from BTM login items - Adds SLF001 per-file-ignore for test private member access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary