Thank you for your interest in RytScan! We're building a fast, zero-config security scanner for Soroban contracts on Stellar and welcome contributors of all skill levels — from first-time open-source contributors to seasoned Rust engineers.
- Code of Conduct
- Getting Started
- Development Workflow
- Code Style & Standards
- Adding a New Rule
- Testing Requirements
- Pull Request Process
- Commit Message Conventions
- Issue Reporting
- Good First Contributions
This project follows the Contributor Covenant Code of Conduct (v2.1). By participating you agree to uphold a welcoming, respectful environment for everyone. Reports of unacceptable behavior go to the maintainers via GitHub — see CODE_OF_CONDUCT.md for details.
| Tool | Version | Notes |
|---|---|---|
| Rust | 1.95+ | Install via rustup |
| Cargo | 1.95+ | Ships with rustup |
git clone https://github.com/<your-username>/RytScan.git
cd RytScancargo build --workspace
cargo test --workspacecargo run -p rytscan-cli -- scan fixtures/vulnerable-vault/src
cargo run -p rytscan-cli -- scan fixtures/vulnerable-vault/src --format sarif
cargo run -p rytscan-cli -- rules- Issues — use the issue tracker for bugs, feature requests, and roadmap discussion. Pick the matching issue template so we can triage faster.
- Security — never file a public issue for a vulnerability. Use GitHub Security Advisories. See SECURITY.md.
- Questions — open a discussion or tag a maintainer on the issue.
Maintainers aim to respond to issues and PRs within 48 hours.
| Branch | Purpose |
|---|---|
main |
Stable, always passing CI |
feature/<topic> |
New features or enhancements |
fix/<topic> |
Bug fixes |
docs/<topic> |
Documentation-only changes |
chore/<topic> |
Tooling, CI, dependency updates |
Always branch off main:
git checkout main
git pull origin main
git checkout -b feature/my-featurePrefer rebasing over merging to keep a clean history:
git fetch origin
git rebase origin/mainCI enforces formatting, linting, and tests. Run these before every commit:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceAdditional guidelines:
- Follow Rust API Guidelines for public APIs.
- Document public items with
///doc comments. - Avoid
unwrap()in production paths — use?or explicit error handling. - No
unsafecode in the scanner itself (our UNSAFE-001 rule must stay clean).
- Add a
struct <Name>Ruleincrates/rytscan-core/src/rules.rsimplementing theRuletrait (id,title,run). - Register it in
all_rules(). - Add a row to
docs/rules.mdwith severity, CWE class, detection strategy, and a fix example. - Add a unit test (happy path + the finding) in the same file, mirroring the
existing
ARITH-001/ASSERT-001/UNSAFE-001tests. - Run
cargo test -p rytscan-coreand confirm the fixture smoke still passes:cargo run -p rytscan-cli -- scan fixtures/vulnerable-vault/src --format sarif. - If the fixture should trigger your rule, extend
fixtures/vulnerable-vault/src/lib.rsaccordingly.
Every code contribution must include appropriate tests.
| Change type | Required tests |
|---|---|
| New rule | Unit test for the finding + negative test on clean code |
| Bug fix | Regression test that would have caught the bug |
| New utility / helper | Unit tests covering happy path and edge cases |
| Refactor | Existing tests must continue to pass |
cargo test --workspace # all crates
cargo test -p rytscan-core # rule engine only
cargo test -p rytscan-cli # CLI only- Your branch is rebased on the latest
main -
cargo fmt --all -- --checkpasses -
cargo clippy --workspace --all-targets -- -D warningspasses -
cargo test --workspacepasses - New or updated tests are included
- No
todo!()/unimplemented!()/ debugprintln!left in production paths
- Push your branch to your fork.
- Open a PR against
BreachDirect/RytScan:main. - Fill in the PR template (summary, motivation / linked issue, testing performed).
- Request a review — maintainers aim to respond within 48 hours.
- Code is correct and handles errors gracefully
- Tests are meaningful and cover edge cases
- Public APIs are documented
- No unnecessary complexity introduced
- CI is green
We follow Conventional Commits:
<type>(<scope>): <short description>
[optional body]
[optional footer: "Closes #<issue>"]
| Type | When to use |
|---|---|
feat |
New feature or rule |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code restructuring, no behaviour change |
test |
Adding or fixing tests |
chore |
Tooling, CI, dependency bumps |
perf |
Performance improvement |
Use the area affected: core, cli, sarif, rules, fixtures, docs, ci.
feat(rules): add ARITH-001 unchecked arithmetic detector
Fires on unchecked_add/sub/mul/div and friends, which wrap silently
on overflow. Maps to CWE-190.
Closes #12
By contributing you certify the work is your own or used under an acceptable license (see the DCO). We do not require signed-off commits, but we do ask that you commit changes you authored and attribute external work. See the GitHub docs on signing commits with GPG/SSH for verified history.
User-visible changes are recorded in CHANGELOG.md following
Keep a Changelog. Add an entry to the [Unreleased]
section for notable changes (new rules, CLI flags, output formats). Releases are
tagged vX.Y.Z from main when CI is green.
Please include:
- Rust version:
rustc --version - Steps to reproduce (minimal source snippet)
- Expected vs actual behaviour (including exit code)
- Relevant output (text, JSON, or SARIF)
Use the Bug Report issue template on GitHub.
- Describe the problem you're solving, not just the solution.
- Link to any related issues or discussions.
- Check docs/ROADMAP.md first — your feature may already be planned.
Do not open a public issue. Contact the maintainers privately via GitHub's Security Advisories feature — see SECURITY.md.
Not sure where to start?
- Issues tagged
good-first-issue - Expand
docs/rules.mdwith real-world examples - Add tests for existing rules (clean-fixture negative cases)
- Harden the SARIF serializer against edge cases
New to Rust? Start with a documentation or testing issue. Maintainers are happy to review Rust code and suggest idiomatic improvements.
New to Soroban? Read the Soroban docs and our docs/architecture.md to get a feel for the domain.
Thank you for contributing to RytScan! Every PR helps make Soroban contracts safer for the Stellar ecosystem. 🚀