Skip to content

Instantly share code, notes, and snippets.

@wcvessels
wcvessels / security_reminder_hook.py
Created May 9, 2026 21:00
Patched security_reminder_hook.py from anthropics/claude-plugins-official/plugins/security-guidance/hooks/. Scopes pickle_deserialization rule to .py/.pyw, adds regex matching and module-alias detection. Fixes false-positive on natural-language "pickle" in prose. Reference for issue #1329.
#!/usr/bin/env python3
"""
Security Reminder Hook for Claude Code
This hook checks for security patterns in file edits and warns about potential vulnerabilities.
"""
import json
import os
import re
import random