Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Security Policy

Supported Versions

hash is developed fix-forward. Only the latest release is supported, and a security fix ships as a new release that includes it; earlier releases are not patched and nothing is backported. To receive security updates, upgrade to the latest release.

VersionSupported
v54 (latest)Yes
Earlier releasesNo

Reporting Vulnerabilities

Do NOT report security vulnerabilities through public issues.

Report via: Settings > Security > Advisories > New draft security advisory

Include:

  • Type of vulnerability
  • Affected source files
  • Steps to reproduce
  • Proof-of-concept (if possible)
  • Impact assessment

Response Timeline

  • Acknowledgment: 48 hours
  • Initial Assessment: 7 days
  • Resolution: 30 days (critical)

Security Best Practices

For Users

  1. Keep hash updated: earlier releases do not receive fixes
  2. Review .hashrc from untrusted sources
  3. Set proper permissions on config files (600)
  4. Use leading space for sensitive commands

For Contributors

  1. Use safe string functions (safe_strcpy, safe_strcat)
  2. Validate all array indices and buffer sizes
  3. Never trust user input
  4. Use reentrant functions (getpwuid_r not getpwuid)
  5. Free all allocated memory
  6. Keep the sanitizer and fuzzing workflows green

Security Features

Hash includes:

  • Safe string utilities (bounds-checked)
  • Input sanitization in parser
  • History privacy (space prefix)
  • No unsafe C functions (gets, strcpy, etc.)
  • Stack protection (-fstack-protector-strong)
  • Fortify source (-D_FORTIFY_SOURCE=2)

Known Limitations

As a shell, hash executes arbitrary commands by design:

  • Commands run with user privileges
  • Aliases can execute arbitrary code
  • Sourced scripts run in current context