Skip to content

Add macOS atomic firing tests (experimental CI leg)#20

Merged
Karib0u merged 3 commits into
mainfrom
feat/macos-atomic-tests
Jun 23, 2026
Merged

Add macOS atomic firing tests (experimental CI leg)#20
Karib0u merged 3 commits into
mainfrom
feat/macos-atomic-tests

Conversation

@Karib0u

@Karib0u Karib0u commented Jun 23, 2026

Copy link
Copy Markdown
Owner

What

Extends the atomic firing-test suite to macOS, mirroring the existing Linux/Windows coverage.

  • 10 macOS atomic actions under tests/atomic/atomics/macos/ — one per macOS rule (8 Sigma + coinminer YARA + shared EICAR IOC).
  • Matching manifest.json entries; test_status flipped none → atomic on the 8 Sigma rules + the YARA rule.
  • A non-gating macOS leg added to .github/workflows/atomic.yml.
  • Docs updated (tests/atomic/README.md, run_atomics.py docstring).

Safe-by-design actions

Each action produces only the telemetry the rule keys on — no destructive branch is exercised:

  • Gatekeeper rule → xattr -d com.apple.quarantine on a throwaway temp file (not spctl --master-disable).
  • Local-admin rule → dscl -create /Users/… against the read-only /Search node, so no account is ever written (even when run as root).
  • Reverse shell / download cradle → closed local port; nothing connects or executes.
  • LaunchAgent persistence → writes then deletes a .plist, never launchctl load-ed.

macOS ships no GNU timeout, so long-running actions are backgrounded-and-killed or bounded with curl --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 a matrix.experimental flag). 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.py exits 2 if the engine never starts — without blocking the build. Flip experimental off once a green run proves it.

Dependency: assumes Karib0u/rustinel's install.sh publishes a signed, ES-entitled macOS release. If macOS artifacts don't exist yet, the install step fails harmlessly (leg is non-gating).

Verification

  • run_atomics.py --list --platform macos → all 10 join keys resolve
  • --check-coverage --strict-essential → exit 0
  • validate.py (44 artifacts), build_packs/build_catalog → clean

Karib0u added 3 commits June 23, 2026 19:20
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).
@Karib0u Karib0u merged commit 46b1f8d into main Jun 23, 2026
5 checks passed
@Karib0u Karib0u deleted the feat/macos-atomic-tests branch June 23, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant