Commit 1dfb44e
committed
test(skills): unit tests for resolver + serialize env-mutation test; docs
Test coverage for the env_passthrough resolver (5 unit tests):
- Forbidden vars (LD_PRELOAD, PYTHONPATH) are blocked.
- Kernel-reserved vars (PATH, HOME, …) are blocked.
- Forbidden match is case-insensitive.
- Operator deny patterns (AWS_*, *_KEY) work.
- Per-skill override unblocks denied vars only for the named skill,
and cannot bypass the FORBIDDEN_PASSTHROUGH hard block.
Mark the existing env-mutating integration test
#[serial_test::serial(skill_env_passthrough)] (review #4): it calls
std::env::set_var/remove_var which mutates process-global state and
would race with any other env-touching test under the parallel
default of cargo test. The serial harness is already used by hands/
extensions for the same reason.
Docs (review #5): add an Environment Variable Passthrough section to
docs/src/app/agent/skills/page.mdx covering the two-party opt-in
model (skill author declares; operator gates), the resolution order,
the FORBIDDEN list, and a worked gog example. Calls out the
distinction from skill config variables — credentials should go
through config, not env.1 parent 84ed49d commit 1dfb44e
3 files changed
Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
224 | 291 | | |
225 | 292 | | |
226 | 293 | | |
| |||
0 commit comments