Repository navigation
Support protocol-specific domain filtering (http/https) #9062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ba33498
Initial plan
Copilot 6341deb
Add protocol-specific domain filtering support
Copilot caff6db
Add network domain validation with protocol support
Copilot 0845308
Merge branch 'main' into copilot/support-domain-filtering-http-https
Mossaka 88c3ff2
Add smoke test and documentation for protocol-specific domains
Copilot bb38ea9
Integrate protocol domain testing into existing smoke workflows
Copilot 7f3278f
Merge branch 'main' into copilot/support-domain-filtering-http-https
Mossaka a45e5d0
Add changeset [skip-ci]
github-actions[bot] 077b55b
Fix Go formatting: remove trailing whitespace
Copilot a116d07
Merge branch 'main' into copilot/support-domain-filtering-http-https
Copilot c431d92
Regenerate workflows after main merge
Copilot 07f624a
Merge branch 'main' into copilot/support-domain-filtering-http-https
Copilot bc4e95a
Merge branch 'main' into copilot/support-domain-filtering-http-https
Copilot 381908e
Merge branch 'main' into copilot/support-domain-filtering-http-https
Copilot f29a790
Merge origin/main into copilot/support-domain-filtering-http-https
Mossaka bbc46f8
Add changeset [skip-ci]
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1,085 changes: 1,085 additions & 0 deletions
1,085
.github/workflows/smoke-protocol-domains.lock.yml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| description: Smoke test for protocol-specific domain filtering | ||
| on: | ||
| schedule: every 24h | ||
| workflow_dispatch: | ||
| pull_request: | ||
| types: [labeled] | ||
| names: ["smoke-protocol-domains"] | ||
| reaction: "eyes" | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| name: Smoke Protocol Domains | ||
| engine: copilot | ||
| network: | ||
| allowed: | ||
| - defaults | ||
| - node | ||
| - github | ||
| - "https://api.github.com" # HTTPS-only (should work since api.github.com is in defaults) | ||
| - "http://httpbin.org" # HTTP-only test endpoint | ||
| sandbox: | ||
| agent: awf # Firewall enabled | ||
| tools: | ||
| bash: | ||
| - "*" | ||
| github: | ||
| web-fetch: | ||
| safe-outputs: | ||
| add-comment: | ||
| hide-older-comments: true | ||
| add-labels: | ||
| allowed: [smoke-protocol-domains] | ||
| messages: | ||
| footer: "> 🔒 *Protocol Security Test: Report by [{workflow_name}]({run_url})*" | ||
| run-started: "🔒 Protocol filtering test [{workflow_name}]({run_url}) started..." | ||
| run-success: "✅ Protocol filtering test [{workflow_name}]({run_url}) passed. All protocol restrictions working correctly." | ||
| run-failure: "❌ Protocol filtering test [{workflow_name}]({run_url}) failed with {status}." | ||
| timeout-minutes: 5 | ||
| strict: true | ||
| --- | ||
|
|
||
| # Smoke Test: Protocol-Specific Domain Filtering | ||
|
|
||
| **IMPORTANT: Keep outputs short and concise.** | ||
|
|
||
| ## Test Requirements | ||
|
|
||
| Test protocol-specific domain filtering with the AWF firewall: | ||
|
|
||
| 1. **HTTPS-only Domain Test**: Verify that `https://api.github.com` is accessible (included in defaults with protocol prefix) | ||
| 2. **HTTP-only Domain Test**: Verify that `http://httpbin.org` would be accessible if tested (network allows HTTP-only) | ||
| 3. **Mixed Protocol Test**: Verify that domains without protocol prefixes (from defaults/ecosystems) work with both HTTP and HTTPS | ||
| 4. **Firewall Configuration Verification**: Confirm the AWF `--allow-domains` flag includes protocol prefixes in the workflow logs | ||
|
|
||
| ## Test Actions | ||
|
|
||
| 1. Use web_fetch to access `https://api.github.com/repos/githubnext/gh-aw` (should succeed) | ||
| 2. Check `/tmp/gh-aw/agent-stdio.log` for the AWF command line to verify protocol prefixes are passed correctly | ||
| 3. Look for patterns like `https://api.github.com` and `http://httpbin.org` in the --allow-domains flag | ||
|
|
||
| ## Output | ||
|
|
||
| Add a **brief** comment to the current pull request with: | ||
| - ✅ HTTPS-only domain access test result | ||
| - ✅ Protocol prefix verification in AWF command | ||
| - ✅ Overall protocol filtering status | ||
| - Overall status: PASS or FAIL | ||
|
|
||
| If all tests pass, add the label `smoke-protocol-domains` to the pull request. | ||
|
|
||
| **Expected AWF command should include:** `--allow-domains ...,http://httpbin.org,https://api.github.com,...` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot instead of adding a new smoke workflow, modify existing ones to add test coverage for protocol domains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in commit bb38ea9:
smoke-protocol-domains.mdworkflowsmoke-copilot.md(added HTTPS-only and HTTP-only domain tests)smoke-codex-firewall.md(added HTTPS-only domain test)--allow-domainsflag