Contributing to Agentic Workflow Firewall
May 10, 2026 ยท View on GitHub
Thank you for your interest in contributing! We welcome contributions from the community and are excited to work with you.
๐ Quick Start for Contributors
-
Fork and clone the repository
git clone https://github.com/yourname/gh-aw-firewall.git cd awf -
Set up the development environment
# Install dependencies npm install # Build the project npm run build -
Submit your contribution
- Create a new branch for your feature or fix
- Make your changes
- Run tests and linter to ensure all checks pass
- Submit a pull request
๐ ๏ธ Development Setup
Prerequisites
- Docker: Must be running for integration tests
- Node.js: v20.19.0+ and npm
- Root/Sudo Access: Required for testing iptables functionality
- Git: For version control
Build Commands
npm install- Install dependenciesnpm run build- Build TypeScript to dist/npm run dev- Watch mode (rebuilds on changes)npm test- Run testsnpm test:watch- Run tests in watch modenpm run lint- Lint TypeScript filesnpm run clean- Clean build artifacts
๐ How to Contribute
Reporting Issues
- Use the GitHub issue tracker to report bugs
- Include detailed steps to reproduce the issue
- Include version information (
awf --version) - Include Docker version (
docker --version) - Include relevant log output (use
--log-level debug)
Suggesting Features
- Open an issue describing your feature request
- Explain the use case and how it would benefit users
- Include examples if applicable
Contributing Code
Code Style
- Follow TypeScript best practices
- Use
npm run lintto check code style - Ensure all tests pass (
npm test) - Write tests for new functionality
- Add JSDoc comments for public APIs
Logging
When adding log output, always use the logger from src/logger.ts:
import { logger } from './logger';
// Use appropriate log levels
logger.info('Starting operation...');
logger.debug('Configuration details:', config);
logger.warn('Potential issue detected');
logger.error('Operation failed:', error);
logger.success('Operation completed successfully');
File Organization
- Prefer creating new files grouped by functionality over adding to existing files
- Place core logic in
src/ - Place container configurations in
containers/ - Place CI/CD scripts in
scripts/ci/ - Add tests alongside your code (e.g.,
feature.tsandfeature.test.ts)
Documentation
- Update documentation for any new features
- Add examples where helpful
- Ensure documentation is clear and concise
Testing
- Write unit tests for new functionality
- Ensure all tests pass (
npm test) - Test manually with Docker containers when possible
- Integration tests require sudo access for iptables
๐ Pull Request Process
-
Before submitting:
- Run
npm run lintto check code style - Run
npm testto ensure all tests pass - Run
npm run buildto verify clean build - Keep
--ignore-scriptson all workflow lock-filenpm install -gsteps for engine CLIs (for example@anthropic-ai/claude-codeand@openai/codex) - Test your changes manually
- Update documentation if needed
- Run
-
Pull request requirements:
- Clear description of what the PR does
- Reference any related issues
- Include tests for new functionality
- Ensure CI passes (including test coverage checks)
- Review the automated coverage report posted as a PR comment
-
Review process:
- Maintainers will review your PR
- The coverage report bot will automatically comment with test coverage metrics
- Address any feedback
- Once approved, your PR will be merged
๐๏ธ Project Structure
/
โโโ src/ # TypeScript source code
โ โโโ cli.ts # CLI entry point
โ โโโ docker-manager.ts # Docker container management
โ โโโ squid-config.ts # Squid proxy configuration
โ โโโ host-iptables.ts # Host-level iptables management
โ โโโ logger.ts # Logging utilities
โ โโโ types.ts # TypeScript type definitions
โโโ containers/ # Docker container definitions
โ โโโ squid/ # Squid proxy container
โ โโโ agent/ # Agent execution container
โโโ scripts/ # Utility scripts
โ โโโ ci/ # CI/CD scripts
โโโ docs/ # Documentation
โโโ .github/workflows/ # GitHub Actions CI/CD
โโโ dist/ # Built JavaScript (generated)
โโโ package.json # npm package configuration
โโโ tsconfig.json # TypeScript configuration
๐ค Community
- Participate in discussions on GitHub issues
- Help other contributors and users
๐ Code of Conduct
This project follows the GitHub Community Guidelines. Please be respectful and inclusive in all interactions.
โ Getting Help
- Check the README.md for usage instructions
- Review the Quick Start Guide for setup
- Explore AGENTS.md for detailed development guidance
- Ask questions in GitHub issues
- Look at existing code and tests for examples
Thank you for contributing to Agentic Workflow Firewall! ๐