Skip to content

Commit 7625953

Browse files
committed
Remove obsolete process audit exception
- remove the Playwright shell:true exception after the hardened launcher landed\n- require repository and CLI audits to report zero exceptions\n- retain exact exception schema and stale-drift coverage\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: f349adcb-b52e-4060-95aa-b0f4e13841ac
1 parent 2de0810 commit 7625953

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

scripts/tests/validate-secure-process-execution.test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ test('audited exception schema requires a review reason', () => {
179179
);
180180
});
181181

182-
test('repository-wide audit is clean apart from the exact reviewed exception', () => {
182+
test('repository-wide audit is clean with no audited exceptions', () => {
183183
const result = auditRepository(REPOSITORY_ROOT);
184184
assert.deepEqual(result.findings, []);
185-
assert.deepEqual(result.audited, AUDITED_EXCEPTIONS);
185+
assert.deepEqual(AUDITED_EXCEPTIONS, []);
186+
assert.deepEqual(result.audited, []);
186187
assert.ok(result.files.length > 100, 'expected a repository-wide production scan');
187188
});
188189

@@ -192,6 +193,6 @@ test('CLI audit emits actionable diagnostics and succeeds for the repository', (
192193
});
193194

194195
assert.equal(result.status, 0, result.stderr);
195-
assert.match(result.stdout, /AUDITED plugins\/power-pages\/scripts\/launch-playwright-mcp\.js/);
196-
assert.match(result.stdout, /validation passed \(\d+ production files, 1 audited exception\)/);
196+
assert.doesNotMatch(result.stdout, /^AUDITED /m);
197+
assert.match(result.stdout, /validation passed \(\d+ production files, 0 audited exceptions\)/);
197198
});

scripts/validate-secure-process-execution.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,9 @@ const EXCLUDED_DIRECTORY_NAMES = new Set([
6363
'node_modules',
6464
]);
6565

66-
// The separate Playwright hardening PR #383 owns this legacy launcher. Matching
67-
// uses the exact path, rule, callee, and whitespace-independent call tokens.
68-
// Any call drift produces both the original finding and a stale-exception error.
69-
const AUDITED_EXCEPTIONS = Object.freeze([
70-
Object.freeze({
71-
path: 'plugins/power-pages/scripts/launch-playwright-mcp.js',
72-
rule: 'shell-true',
73-
callee: 'spawn',
74-
call: "spawnFn ( 'npx' , buildMcpArgs ( browser ) , { stdio : 'inherit' , shell : true , } )",
75-
reason: 'Legacy Playwright launcher is removed by PR #383; delete this exception when that stacked change lands.',
76-
}),
77-
]);
66+
// Exceptions must remain rare, exact, and removable. The current production
67+
// tree needs none; drift behavior stays covered by synthetic tests below.
68+
const AUDITED_EXCEPTIONS = Object.freeze([]);
7869

7970
function decodeStringLiteral(raw) {
8071
if (typeof raw !== 'string' || raw.length < 2) return null;

0 commit comments

Comments
 (0)