Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

breach-data

БесплатноБез исполняемых скриптовНе проверен

Checks whether email addresses, domains and passwords appear in known data breaches using the Have I Been Pwned (HIBP) API v3 and the Pwned Passwords range…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

Breach Data

Overview

Breach intelligence shows which accounts and which kinds of data (passwords, phone numbers, payment details) have leaked, so a security team can force resets and brief staff. The reference source is Have I Been Pwned (HIBP), API v3 at https://haveibeenpwned.com/api/v3.

What the API needs, per the HIBP documentation:

  • Breach, paste and domain endpoints need a paid API key (hibp-api-key header, 32 hex characters). There is no free production key. Plans differ in requests per minute; read the limit from the subscription status endpoint instead of assuming one.
  • Every request needs a descriptive User-Agent, otherwise HIBP answers 403.
  • Pwned Passwords needs no key and has no rate limit.
  • Domain search only works for domains you have verified in your HIBP account (DNS TXT record or an e-mail to admin, hostmaster, info, security or webmaster at that domain). It returns aliases and breach names, not full addresses.

Only look up addresses and domains your organization owns or that you are explicitly authorized to assess. Never look up other people. This skill documents the HIBP API only; commercial breach-search services (DeHashed, Intelligence X, LeakCheck, Snusbase) have their own contracts and terms, so follow their current documentation and do not paste their keys or results into shared tools.

Instructions

Step 1: Client setup

Keep the key in the environment, never in code.

export HIBP_API_KEY="..."          # from the HIBP dashboard, 32 hex characters
python3 -m pip install requests
import os
import time
import requests

HIBP_BASE = "https://haveibeenpwned.com/api/v3"
HEADERS = {
    "hibp-api-key": os.environ["HIBP_API_KEY"],
    "User-Agent": "northwind-secops-breach-audit/1.1",
}

def hibp_get(endpoint, params=None, retries=3):
    """GET a v3 endpoint. Returns parsed JSON, or None on 404 (nothing found)."""
    for _ in range(retries):
        r = requests.get(f"{HIBP_BASE}/{endpoint}", headers=HEADERS, params=params, timeout=15)
        if r.status_code == 200:
            return r.json()
        if r.status_code == 404:
            return None
        if r.status_code == 429:
            time.sleep(int(r.headers.get("retry-after", 5)) + 1)  # pad the wait
            continue
        r.raise_for_status()
    raise RuntimeError(f"Still rate limited after {retries} tries: {endpoint}")

Status codes: 401 missing or bad key, 403 missing User-Agent or a resource your account cannot use (for example an unverified domain), 404 nothing found, 429 rate limit (wait retry-after seconds), 503 usually a Cloudflare block after persistent overuse.

Step 2: Check your plan and limits

sub = hibp_get("subscription/status")
print(sub["SubscriptionName"], "-", sub["Rpm"], "requests/minute")

The response also lists DomainSearchMaxBreachedAccounts and feature flags such as IncludesStealerLogs. Use Rpm to set the delay in bulk jobs.

Step 3: Check one address you own

from urllib.parse import quote

def check_email(email):
    # truncateResponse defaults to true (names only); false returns the full breach model
    breaches = hibp_get(f"breachedaccount/{quote(email)}", {"truncateResponse": "false"})
    if not breaches:
        print(f"{email}: not found in any breach")
        return []
    print(f"{email}: {len(breaches)} breach(es)")
    for b in sorted(breaches, key=lambda x: x["BreachDate"], reverse=True):
        flags = "" if b["IsVerified"] else " [unverified]"
        print(f"  {b['BreachDate']}  {b['Name']:<25} {b['PwnCount']:>13,} accounts{flags}")
        print(f"      data: {', '.join(b['DataClasses'][:6])}")
    return breaches

Details from the docs: the address is trimmed and case-insensitive; Domain=adobe.com filters to one breached site; unverified breaches are included by default, so pass IncludeUnverified=false to drop them. Sensitive and retired breaches are never returned by this endpoint. To try the code without a real address, HIBP's documented test addresses on hibp-integration-tests.com (for example [email protected]) work with any well-formed 32-character test key.

Step 4: Pastes

def check_pastes(email):
    pastes = hibp_get(f"pasteaccount/{quote(email)}")
    for p in pastes or []:
        print(f"  {p.get('Date')}  {p['Source']}  id={p['Id']}  {p.get('EmailCount', 0)} addresses")
    return pastes or []

The paste Id is source-specific (a Pastebin key, for instance); do not assume it forms a URL for every source.

Step 5: Breached accounts on a verified domain

import sys

def domain_exposure(domain):
    """Needs a verified domain. Returns {alias: [breach names]}."""
    data = hibp_get(f"breacheddomain/{domain}")
    if not data:
        print(f"No breached addresses on {domain}")
        return {}
    by_breach = {}
    for alias, names in data.items():
        for name in names:
Полный SKILL.md на GitHub

Установить breach-data в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл breach-data?

Checks whether email addresses, domains and passwords appear in known data breaches using the Have I Been Pwned (HIBP) API v3 and the Pwned Passwords range API. Use when auditing your own organization's credential exposure, checking a password against breach corpora, reviewing breached accounts on a verified domain, or scoping an authorized phishing simulation.

Как установить скилл breach-data?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл breach-data запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить breach-data с