Skip to content

docs: add common awf usage examples#160

Merged
Mossaka merged 4 commits intomainfrom
copilot/add-common-ways-to-run-awf
Dec 20, 2025
Merged

docs: add common awf usage examples#160
Mossaka merged 4 commits intomainfrom
copilot/add-common-ways-to-run-awf

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

The /examples directory only contained a domains.txt file. Added practical shell script examples demonstrating common awf usage patterns.

Added examples

  • basic-curl.sh - Simple HTTP request through the firewall
  • github-copilot.sh - GitHub Copilot CLI with required domains and env handling
  • docker-in-docker.sh - Spawned containers inheriting firewall restrictions
  • using-domains-file.sh - Using domain allowlist files
  • blocked-domains.sh - Allowlist/blocklist combinations with wildcards
  • debugging.sh - Debug logging and log inspection
  • README.md - Overview with prerequisites and usage

CI workflow

Added .github/workflows/test-examples.yml to verify examples work on main branch and on every PR. The workflow tests all example scripts except github-copilot.sh (which requires a Copilot token).

Example usage

chmod +x examples/*.sh
./examples/basic-curl.sh
Original prompt

add a few common ways of running awf in /examples


💡 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.

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Add common ways of running awf in examples docs(examples): add common awf usage examples Dec 19, 2025
Copilot AI requested a review from Mossaka December 19, 2025 23:59
@Mossaka Mossaka marked this pull request as ready for review December 20, 2025 00:00
@github-actions
Copy link
Contributor

Test Coverage Report

Metric Coverage Covered/Total
Lines 81.02% 1230/1518
Statements 80.98% 1261/1557
Functions 78.16% 136/174
Branches 72.56% 410/565
Coverage Thresholds

The project has the following coverage thresholds configured:

  • Lines: 38%
  • Statements: 38%
  • Functions: 35%
  • Branches: 30%

Coverage report generated by `npm run test:coverage`

@Mossaka
Copy link
Collaborator

Mossaka commented Dec 20, 2025

@copilot create a workflow to check that each of the examples are working in main

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 20, 2025

@copilot create a workflow to check that each of the examples are working in main

Added .github/workflows/test-examples.yml in 791f5b2. The workflow runs on push to main and on PRs that modify examples. It tests all example scripts except github-copilot.sh (which requires a Copilot token).

@Mossaka
Copy link
Collaborator

Mossaka commented Dec 20, 2025

@copilot actually make this CI run against every PR

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 20, 2025

@copilot actually make this CI run against every PR

Updated in cd11e02. Removed the paths filter so the workflow now runs on every PR to main.

@Mossaka Mossaka changed the title docs(examples): add common awf usage examples docs: add common awf usage examples Dec 20, 2025
@Mossaka Mossaka merged commit bf8fafa into main Dec 20, 2025
34 of 37 checks passed
@Mossaka Mossaka deleted the copilot/add-common-ways-to-run-awf branch December 20, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants