Reporting Vulnerabilities
If you discover a security vulnerability in RTK, please report it privately:- Email: security@rtk-ai.dev (or create a private security advisory on GitHub)
- Response time: We aim to acknowledge reports within 48 hours
- Disclosure: We follow responsible disclosure practices (90-day embargo)
Security Threats
RTK faces several security concerns:- Shell injection: Command execution vulnerabilities
- Supply chain attacks: Malicious dependencies
- Backdoors: Logic bombs, exfiltration code
- Data leaks: tracking.db exposure, telemetry abuse
- Privilege escalation: Container/Docker operations
3-Layer Security Review Process
Layer 1: GitHub Action Security Checks
Every PR triggers automated security scanning via.github/workflows/security-check.yml:
1
Dependency audit
cargo audit - Detects known CVEs in dependenciesFails the build if vulnerabilities are found.
2
Critical files alert
Flags modifications to high-risk files:
src/runner.rs- Shell execution enginesrc/summary.rs- Command output aggregationsrc/tracking.rs- SQLite database operationssrc/pnpm_cmd.rs- Package name validationsrc/container.rs- Docker/container operationsCargo.toml- Dependency manifest.github/workflows/*.yml- CI/CD pipelines
3
Dangerous pattern scan
Regex-based detection of suspicious code:Scans for:
- Shell execution (
Command::new("sh")) - Environment manipulation (
.env("LD_PRELOAD")) - Network operations (
reqwest::,std::net::) - Unsafe code blocks
- Panic-inducing patterns (
.unwrap()in production) - Logic bombs (
SystemTime::now() > ...) - Obfuscation (base64/hex strings)
4
Clippy security lints
cargo clippy enforces Rust best practices:Catches unsafe patterns, performance issues, and code quality problems.
Layer 2: Claude Code Skill (Automated Review)
For maintainers with Claude Code access:- Reviews all changed files for security issues
- Checks for dangerous patterns with context
- Validates dependency changes against crates.io
- Identifies potential logic bombs and backdoors
- Generates detailed security report
- Faster review than manual inspection
- Consistent security standards
- Context-aware pattern detection
- Reduces maintainer burden
Layer 3: Manual Security Review
For PRs modifying critical files or adding dependencies, maintainers perform manual review:1
Review PR description
Verify intent matches implementation:
2
Inspect diff
Download and review the full diff:
3
Run dangerous pattern detection
4
Audit new dependencies
For dependency additions in
Cargo.toml:- Check crates.io page (downloads, maintainer, license)
- Review GitHub repository (activity, issues, PRs)
- Verify no typosquatting (similar names to popular crates)
- Check for recent security advisories
5
Test locally
6
Complete review checklist
- No critical files modified OR changes justified + reviewed by 2 maintainers
- No dangerous patterns OR patterns explained + safe
- No new dependencies OR deps audited on crates.io
- PR description matches actual code changes
- No logic bombs (time-based triggers, conditional backdoors)
- Code quality acceptable (no unexplained complexity spikes)
Critical Files Requiring Enhanced Review
Tier 1: Shell Execution & System Interaction
src/runner.rs- Shell command execution engine (primary injection vector)src/summary.rs- Command output aggregation (data exfiltration risk)src/tracking.rs- SQLite database operations (privacy/telemetry concerns)
Tier 2: Input Validation
src/pnpm_cmd.rs- Package name validation (prevents injection via malicious names)src/container.rs- Docker/container operations (privilege escalation risk)
Tier 3: Supply Chain & CI/CD
Cargo.toml- Dependency manifest (typosquatting, backdoored crates).github/workflows/*.yml- CI/CD pipelines (release tampering, secret exfiltration)
Dangerous Patterns
The security scanner checks for these patterns:Example: Shell Injection
Example: Logic Bomb
Security Best Practices
Error Handling
Input Validation
Avoid Secrets in Code
Exit Code Preservation
Dependency Security
New dependencies added toCargo.toml must meet these criteria:
- Downloads: >10,000 on crates.io (or strong justification if lower)
- Maintainer: Verified GitHub profile + track record of other crates
- License: MIT or Apache-2.0 compatible
- Activity: Recent commits (within 6 months)
- No typosquatting: Manual verification against similar crate names
Red Flags
- Brand new crate (<1 month old) with low downloads
- Anonymous maintainer with no GitHub history
- Crate name suspiciously similar to popular crate (e.g.,
seridvsserde) - License change in recent versions
- Deprecated or unmaintained
Auditing Dependencies
Disclosure Timeline
When vulnerabilities are reported:- Day 0: Acknowledgment sent to reporter
- Day 7: Maintainers assess severity and impact
- Day 14: Patch development begins
- Day 30: Patch released + CVE filed (if applicable)
- Day 90: Public disclosure (or earlier if patch is deployed)
Security Tooling
cargo audit- Automated CVE scanning (runs in CI)cargo deny- License compliance + banned dependenciescargo clippy- Lints for unsafe patterns- GitHub Dependabot - Automated dependency updates
- GitHub Code Scanning - Static analysis via CodeQL (planned)
Contact
- Security issues: security@rtk-ai.dev
- General questions: https://github.com/rtk-ai/rtk/discussions
- Maintainers: @FlorianBruniaux (active fork maintainer)
Last updated: 2026-02-02
