Initial commit

This commit is contained in:
Warezpeddler
2026-04-25 23:09:31 +01:00
commit 3325436017
92 changed files with 18397 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
"""Tests for extended_surface checks (cross-platform where possible)."""
from pathlib import Path
from applepy.checks.extended_surface import check_hosts_file, check_shell_startup_files
from applepy.context import RunContext
def test_check_hosts_file_returns_finding(tmp_path: Path) -> None:
ctx = RunContext(home=tmp_path, output_dir=tmp_path, phase="unprivileged")
out = check_hosts_file(ctx)
assert len(out) == 1
assert out[0].id == "ext-102"
assert out[0].worksheet == "Attack surface"
def test_check_shell_startup_lists_paths(tmp_path: Path) -> None:
ctx = RunContext(home=tmp_path, output_dir=tmp_path, phase="unprivileged")
out = check_shell_startup_files(ctx)
assert len(out) == 1
assert out[0].id == "ext-107"
assert ".zshrc" in out[0].evidence or "zshrc" in out[0].evidence