Uh oh!
There was an error while loading. Please reload this page.
feat(webfetch): Allow granular URL permissions - #8855
Conversation
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
wolffberg
commented
Jan 19, 2026
Would it make sense to add the rules to the context so the LLM doesn't have to bruteforce fetches? |
robertfall
commented
Jan 19, 2026
Done. Another look? |
wolffberg
commented
Jan 20, 2026
LGTM 🎉 |
0369128 to
1151769Comparewolffberg
commented
Jan 21, 2026
I just did a few more tests. Can you elaborate on how the permissions should work if you want to allow only specific URLs? Say I want to allow |
robertfall
commented
Jan 21, 2026
If I understand the rules engine correctly, this should be: {
"permissions": {
"webfetch": {
"*": "deny",
"github.com": "allow"
}
}
}I've added tests here. I hope I've understood everything. |
wolffberg
commented
Jan 22, 2026
I can't get it to work. I tested the following:
Could it be model specific? I'm only testing with the free models available by default. |
robertfall
commented
Jan 22, 2026
What does not working look like? The tool is completely ignored? I've only been driving it from the tests... I'll figure out how to run it locally. |
wolffberg
commented
Jan 22, 2026
Yes, all the models I try do not list the webfetch tool as available at all. If you have Docker installed you can test by:
|
a497ef5 to
48413adCompare@wolffberg I've fixed this. I had misunderstood the permissions system. This simplifies the feature and uses only the existing globbing from permissions. Worth noting that if {
"permission": {
"webfetch": {
"github.com": "allow",
"*": "deny"
}
}
}I have this working with the following config now: "webfetch": {
"*": "ask",
"*://github.com*": "allow"
},Because of the simplified globbing we need a * for protocol if we want to support all protocols. The I think trying to be too smart here means this gets complex quickly. This approach is backwards compatible and allows users to allow specific URLs using globbing with ask and deny available. |
f1ae801 to
08fa7f7Comparew0rp
commented
Mar 21, 2026
I would love to see a tested and working version of this! I will watch the PR. This is a very useful security feature to have, which has an equivalent in Claude Code. |
robertfall
commented
Mar 21, 2026
@w0rp this PR has tests, but has been pretty much ignored since being opened. I'm not sure how to get attention on it and I stopped trying to get it picket up and over the line because there has genuinely been no movement on it in months. |
Allow granular URL permission rules for webfetch, add URL permission rules to model context, and use host-based always pattern instead of wildcard.
48413ad to
c9f2519ComparePermissionNext was renamed to Permission on dev. Also remove re-introduced buildPermissionPatterns tests that were intentionally deleted.
w0rp
commented
Mar 24, 2026
I don't merge my ALE PRs for months sometimes either. 😆 |
robertfall
commented
Jul 15, 2026
Giving up here and closing this. Got no attention from maintainers so I have to assume it's not wanted. |
Summary
Testing
Issue