Skip to content

test(atomic): gate the proven allow_failure tests and fix the offensive-cmdlet atomic - #112

Merged
Karib0u merged 3 commits into
mainfrom
fix/atomic-allow-failure-gate
Oct 10, 2026
Merged

Karib0u merged 3 commits into
mainfrom
fix/atomic-allow-failure-gate

Conversation

@Karib0u

@Karib0u Karib0u commented Oct 10, 2026

Copy link
Copy Markdown
Owner

From the global audit: an allow_failure atomic satisfies the atomic coverage gate even if it never fires. Measured over the last ~25 successful hosted runs on main:

Test Result Change
windows_ps_module_defender_tamper, windows_defender_exclusion_added, windows_defender_realtime_disabled, windows_wmi_permanent_consumer_binding pass every run (11/11) now gating
macos_coinminer_yara_fixture, macos_yara_memory_fixture pass every run (~25/25) now gating
windows_ps_module_offensive_cmdlet fails every run atomic fixed (below); stays allow_failure until CI proves it
windows_lolbin_outbound_connect passes 2/21 unchanged (rule is already manual with a reason); reason updated

Offensive-cmdlet atomic

It defined Invoke-Mimikatz as a session function. Module Logging (4103) records commands belonging to a logged module, so no CommandInvocation(Invoke-Mimikatz) record was produced (the Defender ps_module test passes because Add-MpPreference is a module cmdlet). The atomic now defines the function in a throwaway .psm1, imports it, and removes it afterwards.

Not verified locally (needs Windows). If the Windows job on this PR shows [PASS] windows_ps_module_offensive_cmdlet, I'll drop its allow_failure in a follow-up commit here; if it still fails, the rule should become manual with a reason, since it currently claims atomic without evidence.

Checks

validate.py, --check-coverage --strict-essential, atomic unit tests, ruff: clean.

…ive-cmdlet atomic

Six allow_failure atomics passed in every recent hosted run (4 Windows
Defender/ps_module/WMI-5861, 2 macOS YARA) and never gated; promote them.

windows_ps_module_offensive_cmdlet failed in every run: it defined
Invoke-Mimikatz as a session function, which Module Logging (4103) does not
record as a CommandInvocation. Define it in a throwaway module instead; it stays
allow_failure until CI shows the alert.

Record that the manual LOLBin network_connection rule fired in 2 of 21 runs.
@Karib0u
Karib0u enabled auto-merge (squash) October 10, 2026 13:21
The throwaway-module version fired on the hosted Windows runner (PASS in the
PR run), so drop allow_failure.
@Karib0u
Karib0u merged commit 7ca8ed6 into main Oct 10, 2026
5 checks passed
@Karib0u
Karib0u deleted the fix/atomic-allow-failure-gate branch October 10, 2026 13:38
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