Thank you for your interest in contributing! This document provides guidelines and instructions for contributing.
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Prioritize security in all contributions
-
Fork the repository
git clone https://github.com/MikeDominic92/iam-immune-system.git cd iam-immune-system -
Create a feature branch
git checkout -b feature/your-feature-name
-
Set up development environment
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
- Follow PEP 8 style guide
- Use type hints for all function signatures
- Maximum line length: 100 characters
- Use descriptive variable names
- Write tests for all new features
- Maintain >90% code coverage
- Run tests before submitting PR:
pytest tests/ --cov=functions
- Update README.md for user-facing changes
- Add docstrings to all functions and classes
- Update CHANGELOG.md following Keep a Changelog format
- Create ADRs for architectural decisions
Follow conventional commits:
type(scope): subject
body
footer
Types:
feat: New featurefix: Bug fixdocs: Documentation changestest: Test additions or changesrefactor: Code refactoringchore: Maintenance tasks
Example:
feat(detector): add privilege escalation detection
Implements detection for common privilege escalation patterns
including:
- CreatePolicyVersion attacks
- AssumeRole chain attacks
- PassRole exploits
Closes #123
-
Update documentation
- README.md if needed
- CHANGELOG.md with your changes
- Inline code comments
-
Run tests and linting
pytest tests/ flake8 functions/ mypy functions/
-
Submit PR
- Use descriptive PR title
- Reference related issues
- Provide context and screenshots if applicable
- Request review from maintainers
-
Address feedback
- Respond to review comments
- Make requested changes
- Re-request review after updates
DO NOT open public issues for security vulnerabilities.
Instead, email security@mikedominic.dev with:
- Description of vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
-
Create detector class in
functions/iam_monitor/detectors/:from typing import Dict, Any from .base import BaseDetector, DetectionResult class MyDetector(BaseDetector): def detect(self, event: Dict[str, Any]) -> DetectionResult: # Implementation pass
-
Add tests in
tests/test_detectors.py -
Update
policies/detection_rules.yaml -
Update README.md with new capability
-
Create remediator class in
functions/iam_monitor/remediators/:from typing import Dict, Any from .base import BaseRemediator, RemediationResult class MyRemediator(BaseRemediator): def remediate(self, detection: DetectionResult) -> RemediationResult: # Implementation pass
-
Add tests in
tests/test_remediators.py -
Update
policies/remediation_playbooks.yaml
Open an issue with:
- Clear description of the feature
- Use case and motivation
- Proposed implementation (optional)
- Examples or mockups
- Open a discussion on GitHub
- Check existing documentation
- Review closed issues and PRs
By contributing, you agree that your contributions will be licensed under the MIT License.
Contributors will be recognized in:
- CHANGELOG.md
- GitHub contributors page
- Annual contributor spotlight posts
Thank you for helping make IAM Immune System better!