Fix firewall log parsing by relaxing field validation to match JavaScript parser #9227
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Go firewall log parser was rejecting valid log entries due to overly strict field validation, causing the daily firewall report to show 0 blocked requests. The JavaScript parser only validates timestamps; the Go parser was also validating client IP:port, domain, dest IP:port, status, and decision formats.
Changes
pkg/cli/firewall_log.go: Removed regex validation for all fields except timestamp, matching JavaScript parser behavior (lines 115-119 inparse_firewall_logs.cjs)pkg/cli/firewall_log_test.go: Modified 5 test cases to accept non-standard field formats (e.g., "Accepting" for IP, "DNS" for domain, "Waiting" for decision)Before/After
Before (rejected these lines):
After (accepts all with valid timestamps):
This restores firewall log parsing for entries with non-standard field formats, fixing the blocked request counting in daily reports.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/user/usr/bin/gh gh api user --jq .login 568ff642939f9258 refs/tags/v2.2.1 /usr/bin/gh l GO111MODULE 64/bin/go gh api runs/20260107-132231-44639/test-3142533917 --jq /usr/bin/infocmp 3401984/run-1 GO111MODULE 64/bin/go infocmp(http block)/usr/bin/gh gh api user --jq .login /ref/tags/v8 l /usr/bin/git 0576552/run-1002/tmp/gh-aw-compile-integration-2397209944/gh-aw GO111MODULE 64/pkg/tool/linuadd git -C pload-artifact/g--verbose rev-parse(http block)/usr/bin/gh gh api user --jq .login /home/REDACTED/work/gh-aw/gh-aw/.github/workflows rev-parse cecc0dae6db3adb38654cf91de62ae108d7/log.json 3752254/run-1011gh GO111MODULE 64/bin/go infocmp -1 /ref/tags/v8 l /usr/bin/infocmp -json GO111MODULE ache/go/1.25.0/xmoby infocmp(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.