fix: remove Windows secret helper runtime compilation - #185
Conversation
📝 WalkthroughWalkthroughThe Windows secret-provider helper now loads a bounded, precompiled .NET Framework Job Object assembly instead of compiling C# at runtime. The canonical source, embedded payload, source fingerprint, runtime loading path, tests, and Windows CI verification were added or updated. ChangesWindows secret job assembly
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SecretCommand
participant PowerShellHelper
participant EmbeddedAssembly
participant ChildProcess
SecretCommand->>PowerShellHelper: pass encoded assembly through environment
PowerShellHelper->>EmbeddedAssembly: decompress and load assembly bytes
PowerShellHelper->>ChildProcess: initialize Job Object and run executable
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Review fallback evidence: CodeRabbit reported |
Pull request
Summary
Fixes #115.
Windows secret providers compiled the full native Job Object helper with
Add-Typeon every invocation. Failed-run timing isolated that cold compilation as the unstable first-use boundary. This PR moves the unchanged helper to canonical C# source, ships a bounded gzip-compressed AnyCPU .NET Framework assembly, and loads it with[Reflection.Assembly]::Load.It also fixes a reviewed handle-ownership bug: the helper no longer closes the parent standard-input handle after a provider exits.
Security impact
shell: false, exact argument arrays,CreateProcessW, and the explicit inherited handle list.Validation
Exact head:
67e1b50928cd3d084f1e8e6dabbbc946c6781e3729944092843on head6777940reproduced the stdin ownership regression asnative-run-exits=0,1before the fix.npm run lintnpm run typechecknpm test29944815637is the merge gate.npm run buildnode dist/cli/main.js schemanpm run check:packnpm run test:corenpm run test:coverage— 1,247 passed, 23 platform-skipped; 95.39% statements and 91.85% branches.npm run test:package— 18 passed.CHANGELOG.mdare updated when applicable. No user-facing command, configuration, or documented behavior changed.Windows exact-head evidence so far:
CodeRabbit hit its documented review limit. A local Claude Code Opus review found four actionable issues; all were fixed, and its focused re-review reports no remaining actionable findings.