Allow trusted host init scripts to preserve direct-script review
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing the built-in shell tool's approval and direct-script review flow alongside the public per-session shell.initScripts API. Compare how Bash and PowerShell host activation scripts are represented, then determine how exact content or trust metadata could be bound to the reviewed action without weakening review for user-controlled or unreadable scripts; done means preserving safe direct-script review for explicitly trusted, updateable host scripts.
Written by the indexing model from the issue text.
Description
Context
VS Code is adopting the public per-session shell.initScripts API so the SDK built-in shell tool can load the user's shell profile and activate the workspace-selected Python environment:
https://github.com/microsoft/vscode/pull/332593
Observed behavior
With no init scripts configured, a direct script invocation can be reviewed using the script and interpreter content under the normal permission flow.
When the same session has any host-provided shell.initScripts entry, the direct script invocation instead requires explicit approval because the shell environment can alter the script action.
This is secure as a conservative default, but it means an SDK consumer cannot opt into a known, host-generated activation script without changing approval behavior for otherwise identical direct script commands.
Ask
Please consider a public SDK contract for trusted host-provided init scripts that preserves safe direct-script review when possible.
Possible shapes include:
- allowing the SDK/runtime to incorporate the exact init-script content into the reviewed action/fingerprint; or
- adding explicit trust metadata for host-generated init scripts, with a conservative default for existing callers.
The behavior must remain secure when init scripts are user-controlled, mutable, unreadable, or otherwise cannot be bound to the reviewed action.
Consumer requirements
- Per-session and updateable, matching
shell.initScripts. - Applies to the built-in shell tool.
- Does not weaken approval for arbitrary or unbound startup scripts.
- Works for Bash and PowerShell host activation scripts.
- Dominant language
- Java
- Stars
- 10.5k
- Forks
- 1.5k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 130
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/copilot-sdk
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2759 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2709 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
github/copilot-sdk#2673 ·
All issues in github/copilot-sdk
Similar issues
-
certification
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Needs: Triage Type: Feature request
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AntennaPod/AntennaPod#8794 ·
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100