Thank you for your interest in contributing to IronClaw! Security is our top priority, so please read these guidelines carefully.
By participating, you agree to uphold our Code of Conduct.
All contributions must maintain IronClaw's security posture:
- No implicit trust — Every external input must be validated
- Deny by default — New features should require explicit opt-in
- Defense in depth — Security should not rely on a single mechanism
- Minimal dependencies — Every new dependency increases attack surface
- Use GitHub Issues for non-security bugs
- For security vulnerabilities, see SECURITY.md
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Write tests for your changes
- Ensure all tests pass (
cargo test) - Run security checks (
cargo audit) - Submit a pull request
- Rust edition: 2021
- Formatting:
cargo fmt - Linting:
cargo clippy -- -D warnings - Tests: All public functions must have tests
- Documentation: All public types and functions must have doc comments
Before submitting a PR, verify:
- No hardcoded credentials or secrets
- All user input is validated
- All filesystem paths are canonicalized and checked against deny list
- All network requests use TLS
- All cryptographic operations use audited libraries
- Error messages do not leak sensitive information
- New tools have proper risk classification
- New tools declare required RBAC permissions
- Audit log entries are added for security-relevant events
- PII redaction patterns are updated if new data types are handled
- Implement the
Tooltrait insrc/core/tool.rs - Set an appropriate
risk_level() - Declare
required_permissions() - Add argument validation in
validate_args() - Register in the tool registry
- Add configuration options
- Write security tests
- Implement the
Providertrait insrc/providers/mod.rs - Never log API keys (scrub from error messages)
- Validate all responses
- Add to
ProviderFactory - Write integration tests
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.