Follow-up to #328882.
The immediate fix reuses the existing workbench SedFileWriteParser to block canonical sed -i / --in-place forms in Agent Host. Broader parsing and destination-aware alignment should be handled separately so the initial fix stays small.
Potential follow-up areas:
- Shell-dialect-aware executable matching, quoting, and backslash handling.
- Quoted, escaped, abbreviated, and runtime-expanded option words.
- GNU versus BSD
sed -i interpretation and PATH-selected implementations.
- Backup suffix destinations, including suffixes containing
*.
- Glob/runtime-expanded targets and
--follow-symlinks behavior.
- Destination-aware Agent Host approval for statically resolvable in-place edits, aligned with workbench behavior.
- Ensure forwarded and full-command allow rules cannot bypass ambiguous or rejected writes.
Add focused cross-platform tests before expanding the parser.
Follow-up to #328882.
The immediate fix reuses the existing workbench
SedFileWriteParserto block canonicalsed -i/--in-placeforms in Agent Host. Broader parsing and destination-aware alignment should be handled separately so the initial fix stays small.Potential follow-up areas:
sed -iinterpretation and PATH-selected implementations.*.--follow-symlinksbehavior.Add focused cross-platform tests before expanding the parser.