Thank you for your interest in contributing to Flowlyt! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- Development Workflow
- Code Style and Guidelines
- Project Structure
- Adding New Features
- Reporting Bugs
- Feature Requests
- Documentation
- License
This project follows our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
To contribute to Flowlyt, you'll need:
- Go 1.16 or higher
- Git
- A GitHub account
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/flowlyt.git cd flowlyt - Add the original repository as an upstream remote:
git remote add upstream https://github.com/harekrishnarai/flowlyt.git
- Install dependencies:
go mod download
- Build the project:
go build -o flowlyt.exe ./cmd/flowlyt
main- Main branch that reflects the production statedevelop- Development branch where features are integrated before release- Feature branches - Create from
developwith formatfeature/feature-name - Bugfix branches - Create from
developwith formatbugfix/bug-description - Hotfix branches - Create from
mainwith formathotfix/fix-description
Follow these guidelines for commit messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests after the first line
- Consider starting the commit message with an applicable emoji:
- ✨
:sparkles:for new features - 🐛
:bug:for bug fixes - 📚
:books:for documentation - ♻️
:recycle:for refactoring - 🧪
:test_tube:for adding tests - 🚀
:rocket:for performance improvements
- ✨
- Create a new branch from
develop(ormainfor hotfixes) - Make your changes
- Add or update tests as necessary
- Update documentation as necessary
- Ensure all tests pass
- Push your branch to your fork
- Submit a pull request to the original repository
- Follow the Go Code Review Comments
- Use
gofmtorgoimportsto format your code - Document all exported functions, types, and constants
- Keep functions small and focused on a single responsibility
- Write tests for all new functionality
- Make sure all tests pass before submitting a PR
- Use the existing test structure for guidance
flowlyt/
├── cmd/ # Command-line applications
│ └── flowlyt/ # Main command-line application
├── pkg/ # Reusable packages
│ ├── common/ # Common types and utilities
│ ├── github/ # GitHub API integration
│ ├── parser/ # Workflow file parsing
│ ├── policies/ # Policy engine
│ ├── report/ # Report generation
│ ├── rules/ # Security rule definitions
│ ├── secrets/ # Secret detection logic
│ └── shell/ # Shell script analysis
└── test/ # Test fixtures and integration tests
├── policies/ # Test policies
└── sample-repo/ # Sample repository for testing
To add a new security rule to Flowlyt:
- Identify the category your rule belongs to
- Add the rule to the appropriate file in the
pkg/rulesdirectory - Write tests for your rule in the corresponding test file
- Update documentation to describe the new rule
To add a new policy type:
- Add the policy logic to the
pkg/policiesdirectory - Create example/template policies in the
test/policiesdirectory - Write tests to validate the policy functionality
- Update documentation to describe the new policy type
When reporting bugs, please include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- System information (OS, Go version, etc.)
- Any additional context that might be helpful
When submitting feature requests:
- Describe the feature you'd like to see
- Explain why this feature would be useful
- Provide examples of how this feature would work
- Consider including mockups or wireframes if it's a UI feature
Good documentation is crucial. When making changes, please:
- Update README.md if necessary
- Update or add documentation in code comments
- Consider adding examples to help users understand your changes
By contributing to Flowlyt, you agree that your contributions will be licensed under the project's license.