Skip to content

feat: enable firewall on claude and remove hooks" - #4792

Closed
Mossaka wants to merge 11 commits into
mainfrom
firewall-claude
Closed

feat: enable firewall on claude and remove hooks"#4792
Mossaka wants to merge 11 commits into
mainfrom
firewall-claude

Conversation

@Mossaka

@MossakaMossaka commented Nov 26, 2025

Copy link
Copy Markdown
Contributor
  • feat: enable firewall on claude engine ana remove hooks
  • update the awf to v0.4.0


Smoke Test: Copilot Engine (No Firewall)

Timestamp: 2025-11-28 00:31 UTC
Status: PASS ✅
All core functionalities validated: GitHub MCP, file writing, bash tools, and Playwright MCP.

AI generated by Smoke Copilot No Firewall


Changeset

  • Type: patch
  • Description: Enable firewall on the Claude engine, remove obsolete hooks, and update AWF to v0.4.0.

AI generated by Changeset Generator



Smoke Test Summary (Run 19878489061)

Timestamp: 2025-12-03T00:51:48Z
Status: PASS
All core functionality validated: GitHub MCP, file operations, bash execution, and Playwright browser automation.

AI generated by Smoke Copilot No Firewall


Changeset

  • Type: patch
  • Description: Enable firewall on the Claude engine, remove obsolete hooks, and update AWF to v0.4.0.

AI generated by Changeset Generator



Smoke Test Summary

Test Run: 2025-12-03T01:12:23Z
Status: PASS
Summary: All tools validated - GitHub MCP, file operations, bash execution, and Playwright browser automation working correctly.

AI generated by Smoke Copilot No Firewall

CopilotAI review requested due to automatic review settings November 26, 2025 00:28
@github-actions

github-actionsBot commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

✅ Agentic Changeset Generator completed successfully.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enables firewall support for the Claude engine and removes the legacy network permissions hooks system. The changes replace the hook-based approach (which used Python scripts and Claude settings.json) with the AWF (Agentic Workflows Firewall) binary approach that was previously only available for the Copilot engine. Additionally, the AWF version is updated from v0.3.0 to v0.4.0.

Key changes:

  • Claude engine now supports AWF firewall (matching Copilot's capabilities)
  • Removed deprecated hooks-based network permissions system
  • Updated enableFirewallByDefault to use engine interface instead of string-based engine ID
  • Added GetClaudeAllowedDomains helper function for Claude-specific domain handling
  • Updated all tests to reflect Claude's new firewall support

Reviewed changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
pkg/workflow/claude_engine.goEnabled firewall support flag; removed hooks/settings generation; added AWF wrapper logic in GetExecutionSteps; implemented GetSquidLogsSteps
pkg/workflow/firewall.goRefactored enableFirewallByDefault to accept engine interface and check SupportsFirewall() method
pkg/workflow/domains.goAdded GetClaudeAllowedDomains function for Claude-specific domain handling (similar to Copilot's)
pkg/workflow/compiler.goUpdated call to enableFirewallByDefault to pass engine instead of engine ID string
pkg/constants/constants.goUpdated DefaultFirewallVersion from v0.3.0 to v0.4.0
pkg/workflow/engine_firewall_support_test.goUpdated tests to verify Claude now supports firewall
pkg/workflow/firewall_default_enablement_test.goUpdated tests to use engine instances; added Claude firewall tests
pkg/workflow/firewall_workflow_test.goUpdated tests to expect AWF installation instead of hooks for Claude
pkg/workflow/claude_engine_network_test.goUpdated all tests to expect AWF wrapper instead of settings/hooks
pkg/workflow/network_test.goRemoved deprecated test for HasNetworkPermissions
pkg/workflow/agentic_output_test.goRemoved tests for Claude hooks cleanup (no longer needed)
pkg/workflow/claude_settings.goDeleted (hooks-based settings no longer used)
pkg/workflow/claude_settings_test.goDeleted (tests for deleted functionality)
pkg/workflow/claude_settings_tmp_test.goDeleted (tests for deleted functionality)
pkg/workflow/engine_network_hooks.goDeleted (hooks system no longer used)
pkg/workflow/engine_network_test.goDeleted (tests for deleted functionality)
.github/workflows/*.lock.ymlAll compiled workflows updated to use AWF v0.4.0 and remove hooks generation steps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot Claude agentic engine should be updated to reflect that it supports network firewall.

CopilotAI commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

@pelikhan I've opened a new pull request, #4794, to work on those changes. Once the pull request is ready, I'll request review from you.

Comment thread.github/aw/actions-lock.json Outdated
Comment on lines +28 to +32
"actions/github-script@v7": {
"repo": "actions/github-script",
"version": "v7",
"sha": "f28e40c7f34bde8b3046d885e986cb6290c5673b"
},

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove github-script@v7 from this branch

Comment thread.github/aw/actions-lock.json Outdated
Comment on lines +28 to +32
"actions/github-script@v7": {
"repo": "actions/github-script",
"version": "v7",
"sha": "f28e40c7f34bde8b3046d885e986cb6290c5673b"
},

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove github-script@v7 from this pr

CopilotAI commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

@Mossaka I've opened a new pull request, #4795, to work on those changes. Once the pull request is ready, I'll request review from you.

@github-actions

github-actionsBot commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

✅ Agentic Changeset Generator completed successfully.

@Mossaka

Copy link
Copy Markdown
ContributorAuthor

@copilot can you figure out why the integration test is failing and can you fix it? https://github.com/githubnext/gh-aw/actions/runs/19717073693/job/56491771896?pr=4792

@github-actions

github-actionsBot commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

✅ Agentic Changeset Generator completed successfully.

CopilotAI commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

@Mossaka I've opened a new pull request, #4884, to work on those changes. Once the pull request is ready, I'll request review from you.

@github-actions

github-actionsBot commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

❌ Agentic Smoke Copilot failed and wasn't able to produce a result.

@github-actions

Copy link
Copy Markdown
Contributor

Agentic Smoke Codex triggered by this pull request.

@github-actions

Copy link
Copy Markdown
Contributor

Agentic Smoke Copilot No Firewall triggered by this pull request.

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results

Timestamp: 2025-12-03T00:51:48Z

Overall Status: PASS

🤖 DIAGNOSTIC REPORT GENERATED BY Smoke Copilot No Firewall fer issue #4792 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Convert embedded custom agents to prompt file format
refactor: rename to firewall-escape.md, add 80% novelty requirement, and increase timeout
GitHub MCP test ✅
File write test ✅ (/tmp/gh-aw/agent/smoke-test-codex-19878489043.txt)
Bash cat test ✅
Playwright title test ✅
Overall: PASS

🔮 The oracle has spoken through Smoke Codex fer issue #4792 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results: Copilot Engine + Playwright

Playwright Navigation: Successfully navigated to https://github.com
Page Title Verification: Confirmed title contains "GitHub"

Overall Status: ✅ PASS

📰 BREAKING: Report filed by Smoke Copilot Playwright fer issue #4792 🗺️

@pelikhanpelikhan closed this Dec 3, 2025
@pelikhan

Copy link
Copy Markdown
Collaborator

Too old.

@github-actionsgithub-actionsBot mentioned this pull request Dec 3, 2025
24 tasks
Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
@MossakaMossaka added smoke and removed smoke labels Dec 3, 2025
@MossakaMossaka reopened this Dec 3, 2025
@Mossaka

Copy link
Copy Markdown
ContributorAuthor

Oh wait, I am working on this one!

@MossakaMossaka added smoke and removed smoke labels Dec 3, 2025
@github-actions

Copy link
Copy Markdown
Contributor

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions

github-actionsBot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

💫 TO BE CONTINUED...Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions

Copy link
Copy Markdown
Contributor

🤖 SYSTEM_INIT: Smoke Copilot No Firewall ACTIVATED. PROCESSING pull request. ALL SUBSYSTEMS ONLINE.

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot Playwright is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actionsBot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions

github-actionsBot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results (Copilot - No Firewall)

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved recent merged PRs
  • ✅ File Writing: Created test file successfully
  • ✅ Bash Tool: Verified file content
  • ✅ Playwright: Navigated to GitHub, title verified

Overall: PASS

🤖 DIAGNOSTIC REPORT GENERATED BY Smoke Copilot No Firewall fer issue #4792 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Migrate workflow commands (run, status, logs, audit) to RunE
Convert embedded custom agents to prompt file format
✅ GitHub MCP review
✅ File write + cat
✅ Playwright title check
Overall: PASS

🔮 The oracle has spoken through Smoke Codex fer issue #4792 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results

Playwright Navigation: Successfully navigated to https://github.com
Page Title Validation: Title contains "GitHub" ✓

Overall Status: PASS

📰 BREAKING: Report filed by Smoke Copilot Playwright fer issue #4792 🗺️

@Mossaka

Copy link
Copy Markdown
ContributorAuthor

This PR will be blocked by a new release of awf that supports user mode

@pelikhan

Copy link
Copy Markdown
Collaborator

stale, reopen when ready

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Mossaka@pelikhan