Commit b6624ff
committed
fix(skills): address PR 3219 review — case-insensitive deny, CLI policy, runtime warn
- resolve_effective_passthrough lowercases both pattern and name before
glob match, closing a bypass where 'aws_secret_access_key' would slip
past the default 'AWS_*' deny pattern (Windows env vars are
case-insensitive at the OS level). New unit test asserts mixed-case
manifest entries are blocked.
- librefang skill test now loads [skills] from ~/.librefang/config.toml
and applies the same EnvPassthroughPolicy the daemon does, falling
back to SkillsConfig::default() when no config exists. Dev runs see
the same gate prod will apply instead of silently passing every
declared var.
- registry.load_skill emits a tracing::warn when env_passthrough is
non-empty for Builtin / PromptOnly / Wasm runtimes, since the field
only flows to subprocess-spawning runtimes (Python / Node / Shell)
and was previously inert without feedback.
- Drop stale 'Returns None' sentence on EnvPassthroughPolicy::from_skills_config
doc; the Optional-ness lives on KernelHandle::skill_env_passthrough_policy.1 parent 9dcdc1c commit b6624ff
4 files changed
Lines changed: 82 additions & 8 deletions
File tree
- crates
- librefang-cli/src
- librefang-skills/src
- librefang-types/src/config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1895 | 1895 | | |
1896 | 1896 | | |
1897 | 1897 | | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
1898 | 1919 | | |
1899 | 1920 | | |
1900 | 1921 | | |
| |||
6917 | 6938 | | |
6918 | 6939 | | |
6919 | 6940 | | |
| 6941 | + | |
6920 | 6942 | | |
6921 | 6943 | | |
6922 | 6944 | | |
6923 | 6945 | | |
6924 | 6946 | | |
6925 | | - | |
| 6947 | + | |
6926 | 6948 | | |
6927 | 6949 | | |
6928 | 6950 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| |||
703 | 712 | | |
704 | 713 | | |
705 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
706 | 735 | | |
707 | 736 | | |
708 | 737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
289 | 310 | | |
290 | 311 | | |
291 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1269 | 1269 | | |
1270 | 1270 | | |
1271 | 1271 | | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
1276 | 1278 | | |
1277 | 1279 | | |
1278 | 1280 | | |
| |||
0 commit comments