Fix firewall SSL-bump field extraction in frontmatter parser#13920
Fix firewall SSL-bump field extraction in frontmatter parser#13920
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot remove cleanup-script support |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
lgtm |
There was a problem hiding this comment.
Pull request overview
This pull request fixes a bug where firewall configuration fields ssl-bump and allow-urls were defined in the schema and struct but not extracted from workflow frontmatter YAML, preventing users from enabling HTTPS content inspection for network firewalls.
Changes:
- Added extraction logic for
ssl-bump(boolean) andallow-urls(string array) fields in the frontmatter parser - Added 8 comprehensive unit tests covering field extraction, defaults, and error handling
- Added integration test verifying the compiled AWF commands include the SSL bump flags
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/workflow/frontmatter_extraction_security.go | Added extraction logic for ssl-bump and allow-urls fields, following the same pattern as existing fields (args, version, log-level) |
| pkg/workflow/frontmatter_extraction_security_test.go | Added comprehensive unit tests covering various scenarios including field extraction, defaults, type safety, and error handling |
| pkg/workflow/firewall_args_integration_test.go | Added end-to-end integration test verifying that workflows with ssl-bump configuration compile correctly and include the expected flags in the generated AWF command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔍 PR Triage ResultsCategory: bug | Risk: medium | Priority: 73/100 Scores Breakdown
📋 Recommended Action: fast_trackCritical bug fix for documented feature. Well-tested, fixes known issue. Fast-track once CI passes despite medium risk (security-related changes). Triaged by PR Triage Agent on 2026-02-05T18:24:58Z
|
Two firewall configuration fields (
ssl-bump,allow-urls) were defined in the schema and struct but not extracted from workflow frontmatter YAML, preventing users from enabling HTTPS content inspection.Changes
Modified
pkg/workflow/frontmatter_extraction_security.go:ssl-bump(boolean) - enables HTTPS content inspectionallow-urls(string array) - URL patterns to allow when ssl-bump enabledAdded tests:
frontmatter_extraction_security_test.gocovering field extraction, defaults, and error handlingfirewall_args_integration_test.goverifying compiled AWF commands include the flagsResult
Users can now configure SSL bump for HTTPS inspection:
Generates:
awf --ssl-bump --allow-urls 'https://github.com/githubnext/*,https://api.github.com/repos/*' ...Original prompt
💡 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.