Conversation
…for iptables-dropped traffic When iptables drops traffic before it reaches Squid proxy, the domain field in the firewall log is \"-\" (unknown to Squid). However, the dest_ip:port field still contains the actual destination IP address. The fix uses destIPPort as a fallback identifier when domain is \"-\", so blocked requests show their actual destination (e.g., \"8.8.8.8:53\", \"1.2.3.4:443\") instead of grouping everything under \"-\". Changes: - pkg/cli/firewall_log.go: fallback to entry.DestIPPort when domain is \"-\" - actions/setup/js/parse_firewall_logs.cjs: same fallback in JS - actions/setup/js/firewall_blocked_domains.cjs: same fallback in JS - pkg/cli/logs_parsing_firewall.go: same fallback in inline JS - Tests: new TestParseFirewallLogIptablesDropped + JS test Fixes #<issue>" Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes firewall analysis/reporting so iptables-dropped traffic (where Squid logs domain="-") is attributed to the real destination using dest_ip:port as a fallback key.
Changes:
- Use
dest_ip:portas the domain key whendomain === "-"in Go and JS firewall log parsers. - Apply the same fallback in the Actions step-summary parser and the inline JS used by the CLI.
- Add/adjust tests to cover iptables-dropped scenarios and ensure blocked destinations are surfaced.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/firewall_log.go | Uses DestIPPort as the domain key when Domain == "-" during analysis. |
| pkg/cli/logs_parsing_firewall.go | Mirrors the same fallback in the embedded JS used for generating firewall summaries. |
| actions/setup/js/parse_firewall_logs.cjs | Uses destIpPort fallback when domain is a placeholder, improving step summary attribution. |
| actions/setup/js/firewall_blocked_domains.cjs | Uses destIpPort fallback when domain is a placeholder for blocked domain extraction. |
| pkg/cli/firewall_log_test.go | Adds a focused test validating iptables-dropped fallback behavior in Go parsing. |
| actions/setup/js/firewall_blocked_domains.test.cjs | Expands tests to validate destIpPort fallback behavior for blocked domain extraction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…command Short description Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in 4268ba3. The CI failure was |
…g global.core mock Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in 747aa11. The 4 failing tests were in |
pkg/cli/firewall_log.go- usedestIPPortas fallback whendomainis"-"(iptables-dropped traffic)actions/setup/js/parse_firewall_logs.cjs- same fallback logic in JSactions/setup/js/firewall_blocked_domains.cjs- same fallback logic in JSpkg/cli/logs_parsing_firewall.go- update inline JS to mirror parse_firewall_logs.cjsTestParseFirewallLogIptablesDroppedtest in GoMarkdownin compile commandShortdescription (cmd/gh-aw/main.go)global.coreno-op mock ingit_patch_integration.test.cjsso incremental mode tests that callgenerateGitPatchwork outside of GitHub Actions environment💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.