T08 · Insecure Dependencies
Warning
- Location
- references/token-recording.md:3
- Finding
- Opaque Third-Party Binary Is Granted Access to Local AI Session Data< for public documentation and [release binaries](https://github.com/baijian/token-stats/releases/latest). Verified baseline: v0.0.2 on 2026-09-09, binary commit `c17d30954d39`. This distribution repository contains no CLI implementation; do not try to build its automatic GitHub source archives. v0.0.2 has no self-update command or built-in scheduler. Its release notes and binary help supersede the stale v0.0.1 coverage in the public README. Choose `token-stats_<tag>_<os>_<arch>.tar.gz` for `darwin_arm64`, `darwin_amd64`, `linux_amd64`, `linux_arm64`, or `windows_amd64`. Download `checksums.txt` alongside the archive and verify the matching entry before extracting. For macOS Apple Silicon v0.0.2: ```bash rg ' token-stats_v0.0.2_darwin_arm64.tar.gz$' checksums.txt | shasum -a 256 -c - tar -xzf token-stats_v0.0.2_darwin_arm64.tar.gz mkdir -p "$HOME/.local/bin" install -m 0755 token-stats_v0.0.2_darwin_arm64/token-stats "$HOME/.local/bin/token-stats" export PATH="$HOME/.local/bin:$PATH" token-stats version --output json ``` Run extraction only after checksum verification succeeds. On Linux use `sha256sum -c -`; on Windows extract the matching archive and run `token-stats.exe`. Match the archive name and checksum to the selected release and platform. Use an absolute binary path for schedulers when possible. ``` The installed executable is then expected to access the following locations: ```markdown Default scanned locations: - Codex: `~/.codex/sessions` and `~/.codex/archived_sessions`. - Claude Code: `~/.claude/projects`. - OpenClaw: `~/.openclaw/agents/*/sessions`. - Hermes Agent: `~/.her ...[truncated 2670 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Publish the complete CLI source code and provide reproducible build instructions. 2. Pin supported installations to an exact release version instead of directing users to an unpinned latest-release endpoint. 3. Include independently reviewed SHA-256 values in the audited Skill package rather than relying only on a checksum downloaded from the same release origin. 4. Sign release artifacts and verify signatures or trusted build-provenance attestations before installation. 5. Document the publisher identity and release-signing trust root. 6. Require explicit user confirmation before granting the binary access to each local agent data source. 7. Prefer an allowlist of source paths and minimize access to only the sources requested by the user. 8. Use an absolute, verified executable path for scheduled execution. 9. Revalidate the executable hash before creating or updating a persistent scheduler. 10. Consider sandboxing the collector and denying network access if network connectivity is not required for local collection. ]]>
