Skip to content

test: cover winget/DNS/network-repair services via IPowerShellRunner seam#824

Merged
laurentiu021 merged 1 commit into
mainfrom
test/r4-service-seam-coverage
Jun 8, 2026
Merged

test: cover winget/DNS/network-repair services via IPowerShellRunner seam#824
laurentiu021 merged 1 commit into
mainfrom
test/r4-service-seam-coverage

Conversation

@laurentiu021

Copy link
Copy Markdown
Owner

What

Audit Round 4 / PR3 — uses the IPowerShellRunner seam (PR #823) to add the missing security-guard and invocation coverage (test findings #4, #5, #8, #9). Every test substitutes the runner, so no winget / netsh / ipconfig / DNS command ever runs.

Why

These guards are the only barrier between preset/user input and a shelled-out process; they had zero coverage (TEST-PROTOCOL Phase 2 mandate). Before the seam, tests were forced to new XxxService(new PowerShellRunner()) and avoid the Apply paths entirely.

Notes

  • All literals are synthetic/public: Git.Git, 7zip.7zip, 8.8.8.8, 1.1.1.1, calc.exe, whoami. No real identities, emails, hostnames, or internal references anywhere.
  • test: only — no production change, no version bump, no release.
  • Build: tests project 0 errors / 0 warnings (Release).

…seam

Builds on the IPowerShellRunner seam to add the missing security-guard and
invocation coverage (audit findings #4, #5, #8, #9), all with a substituted
runner so no winget/netsh/DNS command ever runs:

- BulkInstallerServiceTests: rejects injection IDs (&, ;, |, quote/backtick/
  subexpression, newline, over-length, whitespace) before any process launch;
  asserts the exact winget args on the happy path; propagates exit codes.
- DnsServiceTests: SetDnsAsync rejects malformed/injection addresses before any
  script runs; asserts the Set/Reset scripts and interface index via the seam;
  GetCurrentDns result mapping; preset contents.
- NetworkRepairServiceTests: pins ipconfig/netsh invocations and the
  Success/NeedsReboot mapping for flush/winsock/tcpip, incl. non-zero exit and
  streamed-output collection.

All literals are synthetic/public (Git.Git, 8.8.8.8, calc.exe). test: only —
no production change, no release.
@laurentiu021 laurentiu021 merged commit 38dfa4a into main Jun 8, 2026
4 checks passed
@laurentiu021 laurentiu021 deleted the test/r4-service-seam-coverage branch June 8, 2026 14:43
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