Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2003033
feat: add --reset flag to rtk gain command
claude Apr 2, 2026
ee6cdde
fix: address PR review — atomic reset, confirmation prompt, and tests
claude Apr 3, 2026
94b6f59
style: use styled() helper for reset success message
claude Apr 3, 2026
4dec66f
fix: use isolated in-memory DB for reset test to prevent race condition
claude Apr 3, 2026
4db7e86
docs: add --reset/--yes flags to docs/usage/AUDIT_GUIDE.md
claude Apr 8, 2026
514744e
docs: remove old docs/AUDIT_GUIDE.md path
claude Apr 8, 2026
3f15b89
Merge branch 'develop' into develop
vzwjustin Apr 8, 2026
4a22820
feat(cicd): enforce cicd sast & package check
aeppling Apr 10, 2026
bcbf8ed
fix(ci): allow unsafe_code for libc signal handler
aeppling Apr 10, 2026
8857e17
fix(cicd): semgrep use docker (git action archived)
aeppling Apr 10, 2026
9bdf435
fix: grep false negatives, output mangling, and truncation annotations
BadassBison Mar 26, 2026
a724375
docs(contributing): coding practices v1
aeppling Apr 18, 2026
f67ae3b
fix(install): resolve version via redirect to avoid API rate limits
xdm67x Apr 20, 2026
bc31f3f
feat(glab): add GitLab CLI (glab) command support
tnucera Mar 27, 2026
13188a8
fix(git): fix empty output when branch name contains '/' in git diff
binsee Apr 21, 2026
3bbbb49
Merge pull request #1147 from rtk-ai/fix/cicd-security-checks
aeppling Apr 21, 2026
00c5a36
Merge pull request #1384 from rtk-ai/coding-practices-v1
aeppling Apr 21, 2026
e3149cb
Merge pull request #1056 from vzwjustin/develop
aeppling Apr 21, 2026
048f2f9
Merge pull request #314 from tnucera/feat/glab-support
aeppling Apr 21, 2026
e070226
Merge pull request #1437 from binsee/fix/git-diff-branch-slash
pszymkowiak Apr 22, 2026
de41533
Merge pull request #791 from BadassBison/fix/grep-false-negatives-and…
aeppling Apr 22, 2026
5e1a641
Merge pull request #1414 from xdm67x/fix-install-api-rate-limit-fallback
pszymkowiak Apr 23, 2026
88d9f6a
fix(filters): benchmark ci update + fix stream filter quality
aeppling Apr 24, 2026
7681daf
fix(cicd):: no semgrep alert on sh call cicd
aeppling Apr 24, 2026
70b36b4
fix(tracking): test env path
aeppling Apr 24, 2026
5e84e94
fix(npm): regex match end line
aeppling Apr 24, 2026
7e3690a
fix: remove wrong cicd benchmark + npm test regex
aeppling Apr 25, 2026
e7ae6bf
fix(benchmark): extract format_diff_changes + remove wrong diff test
aeppling Apr 25, 2026
137af04
Merge pull request #1501 from rtk-ai/benchmark-cicd-update
aeppling Apr 25, 2026
2c4569c
fix(npx): dispatch unknown tools to npx instead of npm
tmchow Apr 22, 2026
4d5c2fc
refactor(npx): use shared runner::run_passthrough_cmd helper
tmchow Apr 23, 2026
614e562
refactor(npx): consolidate npm/npx execution in npm_cmd
tmchow Apr 25, 2026
2ad1579
refactor(runner): drop unused run_passthrough_cmd helper
tmchow Apr 25, 2026
2d031f3
fix(discover): encode '.' as '-' in project path slug
niklasmarderx Apr 23, 2026
73a05c3
fix(discover): also encode '_', '\', and non-ASCII chars in project p…
niklasmarderx Apr 25, 2026
323cc3d
refactor(discover): extract SANITIZED_CHARS constant in encode_projec…
Apr 26, 2026
81a1be6
fix(stream): route to respective fd
aeppling Apr 28, 2026
e6c2523
fix(benchmark): capture all fd for stream cmd benchmark
aeppling Apr 28, 2026
c590bd6
fix(benchmark): benchmark capture all fd only stream
aeppling Apr 28, 2026
605e335
Merge pull request #1579 from rtk-ai/fix/stream-stderr-routing
aeppling Apr 29, 2026
d327724
fix(stream): add semgrep flag for sh tests
aeppling Apr 29, 2026
7cfcdbe
Merge pull request #1611 from rtk-ai/fix/remove-sh-from-tests
aeppling Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
open-pull-requests-limit: 5

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- "ci"
40 changes: 21 additions & 19 deletions .github/workflows/CICD.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,29 @@ Trigger: pull_request to develop or master
└────────┬─────────┘
┌────────▼─────────┐
│ clippy │
└──┬───┬───┬───┬───┘
│ │ │ │
┌──────────────┘ │ │ └──────────────┐
│ ┌───────┘ └───────┐ │
▼ ▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌───────────┐ ┌──────────┐
│ test │ │Security Scan │ │ benchmark │ │ validate │
│ ubuntu │ │ cargo audit │ │ >=80% │ │ ai agent │
│ windows │ │ (advisory) │ │ savings │ │ doc │
│ macos │ │ │ │ │ │ │
└──────┬───────┘ └──────┬───────┘ └─────┬─────┘ └────┬─────┘
│ │ │ │
└────────────────┴───────┬───────┴─────────────┘
┌──────────▼─────────┐
│ All must pass │
│ to merge │
└────────────────────┘
│ clippy │
│ -D unsafe_code │
└┬───┬───┬───┬───┬─┘
│ │ │ │ │
┌───────────────┘ │ │ │ └───────────────┐
│ ┌───────────┘ │ └──────────┐ │
▼ ▼ ▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌───────────┐ ┌─────────┐ ┌──────────┐
│ test │ │ security │ │ semgrep │ │benchmark│ │ doc │
│ ubuntu │ │ cargo │ │ AST-aware │ │ >=80% │ │ review │
│ windows │ │ audit │ │ diff-only │ │ savings │ │ ai agent │
│ macos │ │ patterns │ │ │ │ │ │ │
└────┬─────┘ └────┬─────┘ └─────┬─────┘ └────┬────┘ └────┬─────┘
│ │ │ │ │
└────────────┴─────────┬───┴─────────────┴────────────┘
┌──────────▼─────────┐
│ All must pass │
│ to merge │
└────────────────────┘

+ DCO check (independent, develop PRs only)
+ Dependabot (weekly: Cargo deps + GitHub Actions)
```

## Merge to develop — pre-release (cd.yml)
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets
- run: cargo clippy --all-targets -- -D unsafe_code

# ─── Parallel gates (all need code to compile) ───

Expand Down Expand Up @@ -185,6 +185,18 @@ jobs:
echo "- Require approval from 2 maintainers" >> $GITHUB_STEP_SUMMARY
echo "- Test in isolated environment before merge" >> $GITHUB_STEP_SUMMARY

semgrep:
name: semgrep security scan
needs: clippy
runs-on: ubuntu-latest
container:
image: semgrep/semgrep
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: semgrep scan --config .semgrep.yml --baseline-commit ${{ github.event.pull_request.base.sha }} --error

benchmark:
name: benchmark
needs: clippy
Expand All @@ -199,8 +211,11 @@ jobs:
- name: Build rtk
run: cargo build --release

- name: Install system tools
run: sudo apt-get install -y tree

- name: Install Python tools
run: pip install ruff pytest
run: pip install ruff pytest mypy

- name: Install Go
uses: actions/setup-go@v5
Expand Down
108 changes: 108 additions & 0 deletions .semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
rules:
- id: dynamic-command-execution
patterns:
- pattern: Command::new($ARG)
- pattern-not: Command::new("...")
message: >
Dynamic shell invocation via Command::new($ARG).
RTK only executes known CLI tools — use string literals, not variables.
languages: [rust]
severity: ERROR

- id: unsafe-block
pattern: unsafe { ... }
message: >
Unsafe block detected. RTK has no legitimate need for unsafe code.
languages: [rust]
severity: ERROR

- id: ld-preload-manipulation
pattern-either:
- pattern: $CMD.env("LD_PRELOAD", ...)
- pattern: $CMD.env("LD_LIBRARY_PATH", ...)
message: >
LD_PRELOAD/LD_LIBRARY_PATH manipulation detected.
This can hijack shared library loading — forbidden in RTK.
languages: [rust]
severity: ERROR

- id: raw-socket-usage
pattern-either:
- pattern: TcpStream::$METHOD(...)
- pattern: UdpSocket::$METHOD(...)
- pattern: TcpListener::$METHOD(...)
message: >
Raw socket usage detected. RTK is a CLI proxy — it should not
open network connections directly. Use ureq in telemetry only.
languages: [rust]
severity: ERROR

- id: reqwest-forbidden
pattern: reqwest::$METHOD(...)
message: >
reqwest is forbidden in RTK. The project uses ureq for HTTP
(telemetry only). Adding reqwest increases binary size and attack surface.
languages: [rust]
severity: ERROR

- id: interpreter-execution
pattern-either:
- pattern: Command::new("curl")
- pattern: Command::new("wget")
- pattern: Command::new("python")
- pattern: Command::new("python3")
- pattern: Command::new("node")
- pattern: Command::new("bash")
- pattern: Command::new("sh")
- pattern: Command::new("perl")
- pattern: Command::new("ruby")
message: >
Direct interpreter/downloader execution detected.
RTK proxies user commands — it should never spawn interpreters
or download tools on its own.
languages: [rust]
severity: ERROR

- id: ureq-outside-telemetry
pattern: ureq::$METHOD(...)
paths:
exclude:
- /src/core/telemetry.rs
message: >
ureq usage outside of src/core/telemetry.rs.
HTTP calls are restricted to the telemetry module to prevent data exfiltration.
languages: [rust]
severity: ERROR

# ── WARNING rules (non-blocking, flag for review) ──

- id: path-env-manipulation
pattern-either:
- pattern: $CMD.env("PATH", ...)
- pattern: std::env::set_var("PATH", ...)
- pattern: env::set_var("PATH", ...)
message: >
PATH environment variable manipulation detected.
Hijacking PATH can redirect command resolution to attacker-controlled binaries.
languages: [rust]
severity: WARNING

- id: sensitive-path-reference
pattern-regex: \.(ssh|bashrc|zshrc|bash_profile|profile)|authorized_keys|/etc/passwd|/etc/shadow
message: >
Reference to sensitive system path detected.
RTK filters should not access dotfiles, SSH keys, or system credential files.
languages: [rust]
severity: WARNING

- id: filesystem-deletion
pattern-either:
- pattern: fs::remove_file(...)
- pattern: fs::remove_dir_all(...)
- pattern: std::fs::remove_file(...)
- pattern: std::fs::remove_dir_all(...)
message: >
File/directory deletion detected. Expected in hooks/init cleanup,
surprising in a filter module. Verify intent.
languages: [rust]
severity: WARNING
Loading
Loading