Skip to content

Trailing comma in $COPILOT_AGENT_FIREWALL_ALLOW_LIST causes error #41

@jonathanpeppers

Description

@jonathanpeppers

Describe the bug

On accident, I left a trailing comma in $COPILOT_AGENT_FIREWALL_ALLOW_LIST such as:

microsoft.com,visualstudio.com,

And then the next Copilot request errored on the Processing Request step:

----
panic: Invalid rules provided

goroutine 1 [running]:
github.com/github/ebpf-padawan-egress-firewall/pkg/rules.SplitDomainUrlOrIPListByType(0x1, {0xc000037b08, 0x27, 0x10?})
	/home/runner/work/ebpf-padawan-egress-firewall/ebpf-padawan-egress-firewall/pkg/rules/legacy_firewall_items.go:109 +0xca6
github.com/github/ebpf-padawan-egress-firewall/pkg/rules.BuildRules({0xc000037b08, 0x27, 0x47}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x400000008?}, {0x0, ...})
	/home/runner/work/ebpf-padawan-egress-firewall/ebpf-padawan-egress-firewall/pkg/rules/rules.go:116 +0x315
main.main()
	/home/runner/work/ebpf-padawan-egress-firewall/ebpf-padawan-egress-firewall/cmd/main.go:154 +0xda5
Error: Process completed with exit code 2.

Removing the trailing , fixed this.

Expected behavior

It seems like a trailing , should be OK and everything still work.

Additional context

Example here: https://github.com/dotnet/android/actions/runs/15640310139/job/44065837045#step:9:69

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions