Skip to content

Security: ffv2-droid/statusline-secure

Security

SECURITY.md

Security Manifest

What This Script Does

  • Reads current working directory and git branch
  • Displays Claude API context window usage (%)
  • Displays 5-hour and weekly rate limit usage (if Pro/Max subscriber)
  • Shows current task/form if in an active session

Network Activity

  • Only connects to api.anthropic.com (OAuth users only, for usage stats)
  • Uses HTTPS with Bearer token authentication
  • No data exfiltration

Local File Access

  • Reads: .git/HEAD (current branch), ~/.claude/todos/ (current task), ~/.claude/cache/ (usage cache)
  • Writes: ~/.claude/cache/usage-cache.json (cached usage), audit/execution.log (execution audit)
  • Does NOT use system keychain (API key primary)

Credential Handling

API Key (Recommended):

  • Loaded from ANTHROPIC_API_KEY environment variable or .env file
  • NOT stored in system keychain
  • Never logged or exposed in output

OAuth (Fallback):

  • Only used if API key unavailable
  • Reads from macOS keychain (macOS only)
  • Fetches usage from api.anthropic.com/api/oauth/usage

What Changed from Original

  1. Split monolithic code into modular lib/ files (easier to audit)
  2. Added explicit credential flow (API key primary, no silent keychain access)
  3. Added audit logging (all executions timestamped)
  4. Added input validation & sanitization (todo task names)
  5. Changed color palette to Claude brand (orange primary)
  6. Changed execution model: manual only, no auto-hook
  7. Documented all security-sensitive operations with comments

Audit Trail

Every execution is logged to audit/execution.log:

[2026-06-12T14:32:15.123Z] cwd=/path/to/your/project exit=0 api_type=api_key usage=cached

Threat Model

Threat Mitigation
Supply chain attack (GitHub compromise) Not on GitHub; local git repo only
Auto-execution of malicious code Manual invocation only, no auto-hook
Keychain credential theft API key primary (no keychain access)
ANSI injection in output Sanitize task names before rendering
Cache poisoning Validate cache structure before use
Directory traversal in git walk Limited to 50 levels, stops at root

Version History

v1.0.0 (2026-06-12)

  • Initial secure fork
  • API key authentication
  • Manual invocation only
  • Modular architecture
  • Audit logging
  • Claude brand colors

There aren't any published security advisories