mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-09 17:19:02 +00:00
Gate browser automation MCP on external adapter (#6472)
* feat(cli): gate browser automation adapter * fix(cli): close browser automation review gaps * test(cli): cover browser automation gates * fix(cli): close browser automation review gaps * fix(cli): close browser automation review gaps
This commit is contained in:
parent
10fa9effbb
commit
fbdaa52c52
19 changed files with 396 additions and 227 deletions
|
|
@ -53,7 +53,7 @@ describe('UrlValidator', () => {
|
|||
it('should allow public URLs', () => {
|
||||
const validator = new UrlValidator([]);
|
||||
expect(validator.isBlocked('https://api.example.com/hook')).toBe(false);
|
||||
expect(validator.isBlocked('https://webhook.site/test')).toBe(false);
|
||||
expect(validator.isBlocked('https://hooks.example.com/test')).toBe(false);
|
||||
});
|
||||
|
||||
it('should block invalid URLs', () => {
|
||||
|
|
@ -85,10 +85,10 @@ describe('UrlValidator', () => {
|
|||
it('should match multiple patterns', () => {
|
||||
const validator = new UrlValidator([
|
||||
'https://api\\.example\\.com/*',
|
||||
'https://webhook\\.site/*',
|
||||
'https://hooks\\.example\\.com/*',
|
||||
]);
|
||||
expect(validator.isAllowed('https://api.example.com/hook')).toBe(true);
|
||||
expect(validator.isAllowed('https://webhook.site/test')).toBe(true);
|
||||
expect(validator.isAllowed('https://hooks.example.com/test')).toBe(true);
|
||||
expect(validator.isAllowed('https://other.com/hook')).toBe(false);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue