Hardcoded salt

From zakirkun/ice-tea · View interactive version

Hardcoded salt is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects hardcoded or static salt values used in password hashing, allowing precomputed rainbow table attacks.

How to use this skill

Skill file

Hardcoded Salt

Overview

A salt's purpose is to make each password hash unique, even when two users have identical passwords. A hardcoded static salt negates this purpose because:

Remediation

Generate a unique random salt for each user:

import os
import hashlib
salt = os.urandom(32)  # Random 32-byte salt per user
hash = hashlib.pbkdf2_hmac('sha256', password.encode(), salt, 600000)
# Store both salt and hash per user
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.