Compose safe shell stages with approval grants - #1828
Merged
Conversation
Aaronontheweb
enabled auto-merge (squash)
August 9, 2026 01:56
|
|
||
| public void ReplaceProjectDirectoryWithExternalSymlink(string relativeDirectory) | ||
| { | ||
| var path = Path.Combine(_projectDirectory, relativeDirectory); |
| } | ||
|
|
||
| public void CreateProjectDirectory(string relativeDirectory) | ||
| => Directory.CreateDirectory(Path.Combine(_projectDirectory, relativeDirectory)); |
|
|
||
| public void CreateProjectFileSymlinkToExternalFile(string relativePath) | ||
| { | ||
| var externalFile = Path.Combine(_externalDirectory, "secret.txt"); |
| { | ||
| var externalFile = Path.Combine(_externalDirectory, "secret.txt"); | ||
| File.WriteAllText(externalFile, "synthetic test data"); | ||
| File.CreateSymbolicLink(Path.Combine(_projectDirectory, relativePath), externalFile); |
This was referenced Aug 9, 2026
Merged
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.
Summary
sed -nfrom the Linux safe list because a sed program can still write files or execute commands.Examples:
cat input.json | jq .namenow prompts only forjq. A matchingjqgrant allows the command.grep pattern input.txt | tee output.txtnow prompts only fortee. A matchingteegrant allows the command.Security review
An adversarial review found two one-time retry gaps during development:
The final implementation closes both gaps. A retry must match the original patterns and the exact filtered
(verb, effective directory)set. The reviewer reran both probes and returned PASS with no blocking findings.Verification
dotnet build Netclaw.slnx -c Release --no-restore: 0 warnings, 0 errorsdotnet slopwatch analyze: 0 findingspwsh ./scripts/Add-FileHeaders.ps1 -Verify: passedgit diff --check: passedThe repository does not currently provide the XPlat coverage collector, so the CRAP report could not be generated. No dependency was added to this security fix for that report.