Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/protect/every-phase-reports-the-rule-category.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ const CASES: Array<{ phase: string; category: string; raise: Raise }> = [
phase: 'egress',
category: 'ssrf',
raise: async (onDetect) => {
// Egress screening wraps the global fetch, so the call has to be made through it.
// Egress screening wraps the global fetch, so the call has to be made through it. The hostname rule
// is what this case raises; address screening would resolve the host over the network first.
const original = globalThis.fetch;
globalThis.fetch = (async () => ({ marker: 'stub' })) as any;
const protection: any = await createProtection({
egress: true,
mode: 'dry-run',
screenDns: false,
egressRules: [{
id: 'cat-egress',
phase: 'egress',
Expand Down
Loading