Skip to content

Fix shell approval scopes for dotted paths - #1868

Merged
Aaronontheweb merged 4 commits into
devfrom
fix/shell-approval-scope-normalization
Aug 11, 2026
Merged

Fix shell approval scopes for dotted paths#1868
Aaronontheweb merged 4 commits into
devfrom
fix/shell-approval-scope-normalization

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

This PR reduces repeat shell approval prompts.

It makes these changes:

  • Preserve dotted directory scopes for Bash and native PowerShell navigation.
  • Recognize drive-rooted, UNC, relative-rooted, and quoted Windows path roots under the selected shell grammar.
  • Keep Git refs, module-qualified names, URLs, PowerShell provider paths, external paths, and symlink checks strict.
  • Normalize variable git ls-tree operands to the reviewed read-only verb.
  • Keep other Git subcommands exact.
  • Add sanitized approval cases with synthetic paths and branch names.
  • Isolate the static-glob test from shared runner state.

Validation:

  • Release build passed with no warnings.
  • Local Security and focused actor approval suites passed.
  • Native Windows CI proved the dotted directory result is the canonical full path C:/workspace/service.repo.
  • Header verification passed.
  • Slopwatch found no new issues in changed files.
  • The added diff passed the PII scan.
  • The adversarial review passed with no findings.

@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) August 11, 2026 03:28
return;

var target = CreateTempDir("dotted-target");
var link = Path.Combine(_projectDir, "service.repo");
@Aaronontheweb
Aaronontheweb force-pushed the fix/shell-approval-scope-normalization branch from 48d156e to 3acf4c5 Compare August 11, 2026 04:14
@Aaronontheweb
Aaronontheweb merged commit 52c2e07 into dev Aug 11, 2026
23 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/shell-approval-scope-normalization branch August 11, 2026 04:44
@Aaronontheweb Aaronontheweb added the shell Issues related to the shell tool, since it has the largest security perimeter. label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shell Issues related to the shell tool, since it has the largest security perimeter.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant