Add macOS atomic firing tests (experimental CI leg)#20
Merged
Conversation
Adds 10 macOS atomic actions under tests/atomic/atomics/macos/ — one per macOS rule (8 Sigma + coinminer YARA + shared EICAR IOC) — with matching manifest entries, and flips those rules' test_status to `atomic`. Each action is a safe simulation that produces only the telemetry the rule keys on: destructive branches are avoided (xattr on a temp file rather than `spctl --master-disable`; `dscl -create` against the read-only /Search node so no account is ever written). macOS ships no GNU timeout, so long-running actions are backgrounded-and-killed or bounded with `curl --max-time`. CI: a macOS leg is added to the atomic matrix as non-gating (continue-on-error) — the engine needs an EndpointSecurity entitlement and root, and whether ES initializes on a hosted runner is still unproven.
The atomic firing tests now exist and run in CI, but the docs still framed them as a future "progressive/optional" check. - detection-as-code.md: add a "Firing tests" section (harness, atomic.yml, per-platform gating with macOS non-gating/experimental, coverage gate); mark the progressive-checks bullet as implemented. - README.md: add tests/atomic/ to the repo tree (was missing).
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.
What
Extends the atomic firing-test suite to macOS, mirroring the existing Linux/Windows coverage.
tests/atomic/atomics/macos/— one per macOS rule (8 Sigma + coinminer YARA + shared EICAR IOC).manifest.jsonentries;test_statusflippednone → atomicon the 8 Sigma rules + the YARA rule..github/workflows/atomic.yml.tests/atomic/README.md,run_atomics.pydocstring).Safe-by-design actions
Each action produces only the telemetry the rule keys on — no destructive branch is exercised:
xattr -d com.apple.quarantineon a throwaway temp file (notspctl --master-disable).dscl -create /Users/…against the read-only/Searchnode, so no account is ever written (even when run as root)..plist, neverlaunchctl load-ed.macOS ships no GNU
timeout, so long-running actions are backgrounded-and-killed or bounded withcurl --max-time. All 10 were run locally on macOS: each exits 0, stays bounded, and self-cleans.Why the macOS leg is non-gating
continue-on-error: true(via amatrix.experimentalflag). The engine needs an EndpointSecurity entitlement and root; whether ES initializes on a GitHub-hosted runner is unproven. This run is effectively that first experiment —run_atomics.pyexits 2 if the engine never starts — without blocking the build. Flipexperimentaloff once a green run proves it.Verification
run_atomics.py --list --platform macos→ all 10 join keys resolve--check-coverage --strict-essential→ exit 0validate.py(44 artifacts),build_packs/build_catalog→ clean