Skip to content

Commit 8f51f79

Browse files
committed
Update test description
1 parent ce6b65d commit 8f51f79

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/__tests__/unit/checks/keywords-urls.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@ describe('urls guardrail', () => {
404404
expect(result.info?.blocked).toEqual([]);
405405
});
406406

407-
it('blocks non-default ports when allow list has no port', async () => {
408-
// URLs with non-default ports should be blocked when allow list doesn't specify a port
407+
it('allows any port when allow list entry has no port specification', async () => {
408+
// When the allow list entry omits a port, URLs with any port (default or non-default) are allowed
409409
const config = {
410410
url_allow_list: ['example.com'],
411411
allowed_schemes: new Set(['https']),
@@ -417,7 +417,6 @@ describe('urls guardrail', () => {
417417
const result = await urls({}, text, config);
418418

419419
// Both should be allowed - when allow list has no port, any port is OK
420-
// (This matches the behavior: no port restriction when not specified)
421420
expect(result.tripwireTriggered).toBe(false);
422421
expect(result.info?.allowed).toContain('https://example.com:8443');
423422
expect(result.info?.allowed).toContain('https://example.com:9000');

0 commit comments

Comments
 (0)