Skip to content

Latest commit

 

History

History
229 lines (170 loc) · 5.09 KB

File metadata and controls

229 lines (170 loc) · 5.09 KB

Contributing to Simple-Exploit

Thank you for your interest in contributing! This document provides guidelines for contributing to the project.

Code of Conduct

This project adheres to a Code of Conduct that all contributors are expected to follow. Please read CODE_OF_CONDUCT.md before contributing.

How to Contribute

Reporting Bugs

  1. Check existing issues to avoid duplicates
  2. Use the bug report template when creating new issues
  3. Provide detailed information:
    • Steps to reproduce
    • Expected behavior
    • Actual behavior
    • Go version, OS, architecture
    • Relevant logs and error messages

Suggesting Features

  1. Check existing feature requests to avoid duplicates
  2. Use the feature request template
  3. Explain the use case and why it's valuable
  4. Provide examples of how it would work

Contributing Code

Prerequisites

  • Go 1.21 or higher
  • Git
  • Make (optional, but recommended)

Development Setup

# Fork the repository on GitHub
# Clone your fork
git clone https://github.com/YOUR_USERNAME/simple-exploit.git
cd simple-exploit

# Add upstream remote
git remote add upstream https://github.com/htunn/simple-exploit.git

# Install dependencies
go mod download

# Run tests
make test

Making Changes

  1. Create a branch:

    git checkout -b feature/your-feature-name
  2. Make your changes:

    • Write clean, readable code
    • Follow Go conventions
    • Add tests for new functionality
    • Update documentation
  3. Test your changes:

    # Run tests
    make test
    
    # Run linter
    make lint
    
    # Build
    make build
  4. Commit your changes:

    git add .
    git commit -m "Add feature: description of your changes"

    Follow Conventional Commits:

    • feat: New features
    • fix: Bug fixes
    • docs: Documentation changes
    • test: Test changes
    • refactor: Code refactoring
    • chore: Maintenance tasks
  5. Push to your fork:

    git push origin feature/your-feature-name
  6. Open a Pull Request:

    • Go to the repository on GitHub
    • Click "New Pull Request"
    • Select your branch
    • Fill out the PR template
    • Link related issues

Code Style

  • Follow Effective Go
  • Use gofmt for formatting
  • Run golangci-lint before submitting
  • Maximum line length: 120 characters
  • Comment all exported functions, types, and constants
  • Write meaningful commit messages

Testing

  • Write unit tests for all new code
  • Maintain or improve code coverage
  • Use table-driven tests where appropriate
  • Mock external dependencies

Example:

func TestExploit_Execute(t *testing.T) {
    tests := []struct {
        name    string
        target  Target
        want    Result
        wantErr bool
    }{
        // Test cases
    }
    
    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            // Test implementation
        })
    }
}

Documentation

  • Update README.md if adding new features
  • Add package documentation for new packages
  • Include code examples in documentation
  • Update CHANGELOG.md

Contributing Plugins

See Plugin Development Guide for details on creating exploit plugins.

Contributing Documentation

Documentation improvements are always welcome! This includes:

  • Fixing typos and grammatical errors
  • Clarifying existing documentation
  • Adding examples
  • Creating tutorials
  • Translating documentation

Pull Request Process

  1. Ensure tests pass: All tests must pass before merging
  2. Update documentation: Include relevant documentation updates
  3. Follow code style: Code must pass linting
  4. Get reviews: PRs require at least one approval
  5. Keep PRs focused: One feature/fix per PR
  6. Rebase if needed: Keep your branch up to date with main

Review Process

  • Maintainers will review PRs as soon as possible
  • Address feedback and make requested changes
  • Once approved, a maintainer will merge your PR

Development Workflow

Branch Naming

  • feature/ - New features
  • fix/ - Bug fixes
  • docs/ - Documentation updates
  • refactor/ - Code refactoring
  • test/ - Test improvements

Commit Messages

Good commit message:

feat: add WAF bypass strategy for CloudFlare

- Implement header manipulation strategy
- Add TLS fingerprint randomization
- Include tests and documentation

Bad commit message:

fixed stuff

Security Vulnerabilities

DO NOT open public issues for security vulnerabilities.

Instead, email security concerns to: [SECURITY_EMAIL]

Include:

  • Description of the vulnerability
  • Steps to reproduce
  • Potential impact
  • Suggested fix (if any)

Questions?

Recognition

Contributors will be:

  • Listed in CONTRIBUTORS.md
  • Mentioned in release notes
  • Credited in documentation

Thank you for contributing to Simple-Exploit! 🚀