Repository navigation
Split CLI-proxy security policy into focused modules - #12006
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 23, 2026 16:19
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The extraction rewires admission controls and enclave security policies across modules and the production container image, requiring human review to confirm security boundaries and module loading.
No open issues 🎉
What changed in this PR
Refactors the CLI-proxy security gate into focused modules, addressing #11999 while preserving policy behavior, existing caller imports, and all 11 public exports.
Changes:
- Extract environment, command-path, enclave, and file-input policies behind the existing facade.
- Add dedicated regression tests for validation results, capability handling, environment scrubbing, and exports.
- Include the new modules in the Docker image and document their ownership.
| File | Description |
|---|---|
docs/gh-cli-proxy-design.md |
Documents module ownership and regression coverage. |
containers/cli-proxy/security/file-inputs.js |
Extracts stdin-only and positional file-input checks. |
containers/cli-proxy/security/env.js |
Extracts child-environment sanitization. |
containers/cli-proxy/security/enclave.js |
Extracts enclave argument and capability validation. |
containers/cli-proxy/security/command-policy.js |
Extracts command discovery, aliases, and denial tables. |
containers/cli-proxy/security.test.js |
Adds dedicated security-policy regression tests. |
containers/cli-proxy/security.js |
Retains top-level dispatch and compatible exports. |
containers/cli-proxy/Dockerfile |
Copies the new security modules into the image. |
Review effort: Max (adaptive)
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
Contributor
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 6ff3041 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI-proxy security gate combines five responsibilities without dedicated unit coverage. This refactor separates review surfaces while preserving policy behavior.