10 Commits

Author SHA1 Message Date
aesoft 9cc4937dac fix(security): harden installer checksum, filter-trust, meta-command fallthrough 2026-06-12 14:01:04 +02:00
aesoft e8271848d7 Merge pull request #1368 from ousamabenyounes/fix/issue-1250
fix(install): reject archive with path traversal before extraction (#1250)
2026-05-13 22:08:35 +02:00
xdm67x f67ae3bcd2 fix(install): resolve version via redirect to avoid API rate limits
The installer failed with "Failed to get latest version" when the GitHub
REST API returned 403 due to the anonymous rate limit (60 req/hour, shared
across NAT/CI). Switch the primary lookup to the `/releases/latest` 302
redirect, which doesn't count against the API quota. Keep the API call as
a fallback, and add a RTK_VERSION escape hatch for pinning.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 14:30:06 +02:00
Ousama Ben Younes ac9b22c4d9 fix(install): reject archive with path traversal before extraction (#1250)
The installer previously ran `tar -xzf` on the downloaded archive with no
pre-extraction verification. A malicious mirror could ship a tarball with
`../` components or absolute paths and write files anywhere on the user's
filesystem (CWE-22).

Add a pre-extraction check that lists archive contents with `tar -tzf`
and rejects any entry whose name starts with `/` or contains a `..` path
component. The check is POSIX-compliant and adds negligible overhead for
the single-binary RTK release tarball.

Covered by scripts/test-install.sh, which exercises one safe archive
and four crafted malicious archives (leading `..`, absolute path,
mid-path `..`, trailing `..`) plus a regression guard that ensures the
check remains in install.sh.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-17 15:55:32 +00:00
sveitser bec18c40a2 fix: use /usr/bin/env shebangs for portability across systems 2026-03-26 19:46:28 +01:00
Vincent Vanackere 3b84b33e3c ci: replace x86_64-unknown-linux-gnu with musl target for static binaries (#267)
The current x86_64-unknown-linux-gnu release binary dynamically links against glibc, which causes failures on systems with an older glibc version:

rtk: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by rtk)

Replace the x86_64-unknown-linux-gnu build target with x86_64-unknown-linux-musl, producing a fully statically-linked binary with no libc dependency.

Fixes rtk-ai/rtk#265 - binary fails on systems with old glibc.
2026-02-28 18:38:52 +01:00
Florian BRUNIAUX 0b34772a67 fix: install to ~/.local/bin instead of /usr/local/bin (closes #155) (#161)
Remove sudo requirement by defaulting to $HOME/.local/bin (XDG standard).
Supports RTK_INSTALL_DIR env var for custom install path.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:28:51 +01:00
patrick szymkowiak 55d010ad5e fix: update stale repo URLs from pszymkowiak/rtk to rtk-ai/rtk (#78)
Closes #77

- install.sh: update REPO to rtk-ai/rtk (was using old fork name)
- INSTALL.md: fix curl URL from /blob/ (returns HTML) to raw URL
- Cargo.toml: update repository field
- Formula/rtk.rb: update all download URLs and tap reference

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 12:17:37 +01:00
Livio Gamassia abe024db63 Fix install script URL 2026-02-03 08:19:29 +00:00
Patrick szymkowiak daab79cca4 Initial commit: rtk (Rust Token Killer) v0.1.0
High-performance CLI proxy to minimize LLM token consumption:
- rtk ls: Token-optimized directory tree (filters .git, node_modules, etc.)
- rtk read: Intelligent code filtering (minimal/aggressive modes)
- rtk smart: Local LLM summaries via candle-core (Llama-3.2-1B)
Includes CI/CD (GitHub Actions), Homebrew formula, and install script.
2026-01-22 18:10:30 +01:00