diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..ff8222c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,46 @@ +--- +name: Bug Report +about: Report a bug or unexpected behavior +title: '' +labels: bug +assignees: '' +--- + +## Describe the bug + +A clear description of what the bug is. + +## Steps to reproduce + +1. Run `egressor` with config: ... +2. Configure tool to use proxy: ... +3. Trigger action: ... +4. See error + +## Expected behavior + +What you expected to happen. + +## Actual behavior + +What actually happened. Include any error messages or log output. + +## Environment + +- **OS**: (e.g., macOS 15.2, Ubuntu 24.04, Windows 11) +- **Architecture**: (e.g., arm64, amd64) +- **Egressor version**: (e.g., v0.1.0 or commit hash) +- **Go version**: (if building from source) +- **Tool being proxied**: (e.g., Claude Code, Cursor, Kiro) + +## Relevant logs + +Paste any relevant output from `~/.egressor/logs/audit.log` or terminal output. + +``` +(paste logs here) +``` + +## Additional context + +Any other details, screenshots, or config excerpts that might help. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..2bfd0e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature Request +about: Suggest a new feature or improvement +title: '' +labels: enhancement +assignees: '' +--- + +## Problem + +What problem does this feature solve? What's the use case? + +## Proposed solution + +Describe the feature or change you'd like to see. + +## Alternatives considered + +Any alternative approaches you've thought about. + +## Additional context + +Any other details, mockups, or references that might help. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..fc01bf6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +## What does this PR do? + +A brief description of the change and why it's needed. + +## Related issues + +Closes # + +## Changes + +- +- + +## Checklist + +- [ ] Tests added or updated for new functionality +- [ ] `go test ./internal/...` passes +- [ ] `go vet ./...` reports no issues +- [ ] Documentation updated (if behavior changed) +- [ ] Commit messages are clear and descriptive \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..db826d2 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,56 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes +- Focusing on what is best for the community + +Examples of unacceptable behavior: + +- The use of sexualized language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Project maintainers are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and also applies when +an individual is officially representing the project in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the project maintainers via [GitHub Issues](https://github.com/ehsaniara/egressor/issues). + +All complaints will be reviewed and investigated promptly and fairly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), +version 2.1, available at +https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..39fb255 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,101 @@ +# Contributing to Egressor + +Thanks for your interest in contributing to Egressor! This document explains how to get started. + +## Getting Started + +### Prerequisites + +- Go 1.24+ +- Node.js 22+ +- Xcode Command Line Tools (macOS, for desktop UI builds) + +### Setup + +```bash +git clone https://github.com/ehsaniara/egressor.git +cd egressor + +# Build the frontend +cd internal/ui/frontend && npm install && npm run build && cd ../../.. + +# Build the binary (macOS with desktop UI) +CGO_LDFLAGS="-framework UniformTypeIdentifiers" go build -tags production -o egressor ./cmd/egressor + +# Build headless only (any platform, no CGO) +go build -o egressor ./cmd/egressor +``` + +### Running Tests + +```bash +go test ./internal/... +``` + +Run `go vet` before submitting: + +```bash +go vet ./... +``` + +## How to Contribute + +### Reporting Bugs + +- Search [existing issues](https://github.com/ehsaniara/egressor/issues) first to avoid duplicates +- Use the **Bug Report** issue template +- Include your OS, Go version, and steps to reproduce + +### Suggesting Features + +- Open a **Feature Request** issue +- Explain the use case and why it would benefit Egressor users + +### Submitting Code + +1. Fork the repository +2. Create a feature branch from `main`: + ```bash + git checkout -b feature/my-change + ``` +3. Make your changes +4. Add or update tests for any new functionality +5. Ensure all tests pass: `go test ./internal/...` +6. Ensure `go vet ./...` reports no issues +7. Commit with a clear message describing *what* and *why* +8. Push to your fork and open a pull request against `main` + +### Pull Request Guidelines + +- Keep PRs focused on a single change +- Include a clear description of what the PR does and why +- Add tests for new functionality +- Update documentation if behavior changes +- Make sure CI passes before requesting review + +## Project Structure + +``` +cmd/egressor/ Entry point +internal/ + proxy/ TCP/HTTPS interception + policy/ Policy engine (scope, patterns, tags, keywords) + audit/ Session logging and storage + ca/ CA certificate generation + extract/ File reference detection + config/ YAML config loading + tray/ macOS system tray + ui/ Wails desktop UI + React frontend +``` + +## Code Style + +- Follow standard Go conventions (`gofmt`, `go vet`) +- Keep packages focused and well-scoped +- Use `slog` for structured logging +- Write table-driven tests where appropriate +- Handle errors explicitly with context + +## License + +By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE). \ No newline at end of file