This document describes how to validate Albator safely on macOS 26.3 and what each test covers.
- #7: CLI subcommands now forward script flags (implemented).
- #8:
tests/test_framework.pyno longer hard-fails on missinglib/loggerimport; logging fallback added. - #9:
tests/test_security.shnow checks against configurable minimum macOS version (MIN_MACOS_VERSION, default26.3). - #10: CLI wrapper error diagnostics now include both stderr and stdout.
- #11:
apple_updates.sh --offlinenow degrades gracefully without cache (strict mode optional viaSTRICT_OFFLINE=true). - #12:
privacy.shbackup path now sanitizes domain/key components. - #13:
tests/test_framework.py --include-privilegednow skips privileged checks when non-interactive sudo is unavailable. - #14: FileVault/Safari matcher logic in
tests/test_framework.pynow handles modern macOS output variants. - #15:
tests/test_framework.py --include-mutatingnow runs deterministic script validation (--dry-run/--offline). - #16:
tests/test_security.shno longer exits early due arithmetic +set -einteraction. - #17:
cve_fetch.shparsing/summary paths hardened forset -euo pipefailin dry-run/offline validation.
python3 -m unittest tests/test_core_behaviors.py -vCoverage includes:
- benchmark resolution
- rule path fail-fast behavior
- version-aware rule filtering
- preflight policy checks
- CLI preflight auto-gate behavior
- CLI wrapper diagnostics behavior
- legacy CLI integration with fixture project
python3 albator_cli.py preflight --json
python3 albator_cli.py doctor
python3 albator_cli.py --json-output doctor
python3 albator_cli.py preflight --require-sudo
python3 albator_cli.py preflight --require-rulesChecks include:
- Python/runtime/tools
- macOS minimum version policy
- rules/config presence
- background security improvements settings
- macOS 26.3 output signatures
- config schema validation and script permission checks (
doctor)
python3 albator_cli.py cve_fetch --dry-run
python3 albator_cli.py apple_updates --offline --verboseExpected:
- flags are forwarded to underlying scripts
- wrapper reports stdout/stderr context on failures
bash privacy.sh --dry-run
bash firewall.sh --dry-run
bash encryption.sh --dry-run
bash app_security.sh --dry-run
bash tests/test_security.sh --dry-run --verboseNotes:
- some scripts require sudo even in validation mode
- use preflight output to understand environment gating
python3 tests/test_framework.py --output /tmp/albator_test_report.json --verbose
python3 tests/test_framework.py --include-privileged --output /tmp/albator_privileged_report.json
python3 tests/test_framework.py --include-mutating --output /tmp/albator_mutating_report.json
bash tests/test_scripts_smoke_mocked.shExpected:
- framework starts without
loggerimport failure - report includes preflight summary
- failing checks are reported explicitly
- mutating script execution tests run only when explicitly requested
- mocked smoke harness validates script dry-run behavior without requiring host macOS internals
- privileged checks are marked skipped (not failed) when non-interactive sudo is unavailable
- mutating mode uses deterministic script args to avoid host mutation and flaky network requirements
python3 albator_enhanced.py --help
python3 -c "import web.app as w; print(w.OPTIONAL_BACKEND_AVAILABLE, w.SOCKETIO_AVAILABLE)"Expected:
- enhanced CLI still starts even when optional
lib/*modules are missing - web module imports with fallback backend mode when optional modules are absent
preflight:
min_macos_version: "26.3"
enforce_min_version: trueMIN_MACOS_VERSION: minimum version fortests/test_security.sh(default:26.3)STRICT_OFFLINE: whentrue,apple_updates.sh --offlineexits if cache is missingALBATOR_LOG_FORMAT: set tojsonfor structured script logsALBATOR_API_TOKEN: when set, required asX-Albator-Tokenfor/api/*endpointsALBATOR_COOKIE_SECURE: settrueto enforce secure-only session cookie in web modeALBATOR_TEST_ALLOW_DRYRUN_NO_SUDO: allows dry-run test execution of privileged scripts in validation harness
- A failing mutating command without sudo is expected when preflight enforces privilege checks.
apple_updates.sh --offlinewithout cache now degrades gracefully by default and still produces summary output.tests/test_framework.pymay report operational failures (e.g., sudo-gated checks) even when framework integrity is healthy.