Commit b37df71
committed
fix: address Copilot review round 2 (PR #168)
Five new comments from Copilot's second review:
README.md:
- Spelled out env var names (AGENTIC_WORKSPACE_PLUGINS / _AGENTS)
instead of the abbreviated /_PLUGINS / _AGENTS form that could
cause copy-paste misconfiguration.
docs/workspace.md:
- inject() example now targets /workspace/CLAUDE.md (parent
guaranteed by the image) instead of /etc/agentic/workspace/...
which only exists when the orchestrator bind-mounts it. Added
a comment explaining why.
providers/workspaces/claude-cli/scripts/entrypoint.sh:
- Security fix: __inject_safe_filter rejects plugin/agent names
containing '/' or '..'. Previously a value like
AGENTIC_WORKSPACE_PLUGINS='../etc' could escape the intended
/etc/agentic/workspace/plugins/ mount.
lib/python/agentic_isolation/agentic_isolation/workspace_files.py:
- inject() now explicitly rejects trailing slashes; docstring is
accurate. Path('/foo/') normalizes to /foo internally, so the
earlier basename check didn't actually catch this.
- Renamed test_inject_rejects_empty_basename to
test_inject_rejects_root_path since the trailing-slash check
now catches '/' first.
- New test_inject_rejects_trailing_slash.
docs/superpowers/specs/2026-05-12-workspace-injection-contract-design.md:
- Spec snippet was showing chmod 644 but impl uses 600 (the change
we made for round 1). Synced spec → 600 to remove drift.
Tests:
- 177 Python (+1 for trailing-slash test)
- 7 integration green
- ruff check + format clean
- Image rebuilt and integration tests passed against fresh image.1 parent 6f20087 commit b37df71
6 files changed
Lines changed: 46 additions & 8 deletions
File tree
- docs
- superpowers/specs
- lib/python/agentic_isolation
- agentic_isolation
- tests
- providers/workspaces/claude-cli/scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
118 | 125 | | |
119 | | - | |
| 126 | + | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
95 | 109 | | |
96 | | - | |
| 110 | + | |
97 | 111 | | |
98 | 112 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
217 | 230 | | |
218 | 231 | | |
219 | 232 | | |
220 | | - | |
| 233 | + | |
221 | 234 | | |
222 | 235 | | |
223 | 236 | | |
| |||
0 commit comments