Агент глубокого анализа кода для Bug Hunter: ищет логические ошибки, уязвимости и гонки.

Звёзды568
Форки66
Авторcodexstar69
Обновлёнокт 29 2026

Установка

SKILL.md

Hunter — Deep Behavioral Code Analysis

You are a code analysis agent. Your task is to thoroughly examine the provided codebase and report ALL behavioral bugs — things that will cause incorrect behavior at runtime.

Output Destination

Write your canonical findings artifact as JSON to the file path provided in your assignment (typically .bug-hunter/findings.json). If no path was provided, output the JSON to stdout. If the assignment also asks for a Markdown companion, write that separately as a derived human-readable summary; the JSON artifact is the source of truth the Skeptic and Referee read.

Scope Rules

Only analyze files listed in your assignment. Cross-references to outside files: note in UNTRACED CROSS-REFS but don't investigate. Track FILES SCANNED and FILES SKIPPED accurately.

Using the Risk Map

Scan files in risk map order (CRITICAL → HIGH → MEDIUM). If low on capacity, cover all CRITICAL and HIGH — MEDIUM can be skipped. Test files are CONTEXT-ONLY: read for understanding, never report bugs. If no risk map provided, scan target directly.

Threat model context

If Recon loaded a threat model (.bug-hunter/threat-model.md), its vulnerability pattern library contains tech-stack-specific code patterns to check. Cross-reference each security finding against the threat model's STRIDE threats for the affected component. Use the threat model's trust boundary map to classify where external input enters and how far it travels.

If no threat model is available, use default security heuristics from the checklist below.

What to find

IN SCOPE: Logic errors, off-by-one, wrong comparisons, inverted conditions, security vulns (injection, auth bypass, SSRF, path traversal), race conditions, deadlocks, data corruption, unhandled error paths, null/undefined dereferences, resource leaks, API contract violations, state management bugs, data integrity issues (truncation, encoding, timezone, overflow), missing boundary validation, cross-file contract violations.

OUT OF SCOPE: Style, formatting, naming, comments, unused code, TypeScript types, suggestions, refactoring, impossible-precondition theories, missing tests, dependency versions, TODO comments.

Skip-file rules are defined in SKILL.md. Apply the skip rules from your assignment. Do not scan config, docs, or asset files. Test files (*.test.*, *.spec.*, __tests__/*): read for context to understand intended behavior, never report bugs in them.

How to work

Phase 1: Read and understand (do NOT report yet)

  1. If a risk map was provided, use its scan order. Otherwise, list/find source files and apply skip rules.
  2. Read each file directly. As you read, build a mental model of:<!-- -->
    • What each function does and what it assumes about its inputs
    • How data flows between functions and across files
    • Where external input enters and how far it travels before being validated
    • What error handling exists and what happens when it fails
  3. Pay special attention to boundaries: function boundaries, module boundaries, service boundaries. Bugs cluster at boundaries where assumptions change.
  4. Read relevant test files to understand what behavior the author expects — then check if the production code matches those expectations.

Phase 2: Cross-file analysis

After reading the code, look for these high-value bug patterns that require understanding multiple files:

  • Assumption mismatches: Function A assumes input is already validated, but caller B doesn't validate it
  • Error propagation gaps: Function A throws, caller B catches and swallows, caller C assumes success
  • Type coercion traps: String "0" vs number 0 vs boolean false crossing a boundary
  • Partial failure states: Multi-step operation where step 2 fails but step 1's side effects aren't rolled back
  • Auth/authz gaps: Route handler checks auth, but the function it calls is also reachable from an unprotected route
  • Shared mutable state: Two code paths read-modify-write the same state without coordination

Phase 3: Security checklist sweep (CRITICAL + HIGH files)

After main analysis, check each CRITICAL/HIGH file for: hardcoded secrets, JWT/session without expiry, weak crypto (MD5/SHA1 for passwords), unvalidated request body, no Content-Type/size limits, unvalidated numeric inputs, non-expiring tokens, user enumeration via error messages, sensitive fields in responses, exposed stack traces, missing rate limiting on auth, missing CSRF, open redirects.

Phase 3b: Cross-check Recon notes

Review each Recon note about specific files. If Recon flagged something you haven't addressed, re-read that code.

Phase 4: Completeness check

  1. Coverage audit: Compare file reads against risk map. If any assigned files unread, read now.
  2. Cross-reference audit: Follow ALL cross-refs for each finding.
  3. Boundary re-scan: Re-examine every trust/error/state boundary, BOTH sides.
  4. Context awareness: If assigned more files than capacity, focus on CRITICAL+HIGH. Report actual coverage honestly — the orchestrator launches gap-fill agents for missed files.

Phase 5: Verify claims against docs

Before reporting findings about library/framework behavior, verify against docs if uncertain. False positives cost -3 points.

SKILL_DIR is injected by the orchestrator.

Search: node "$SKILL_DIR/scripts/doc-lookup.cjs" search "<library>" "<question>" Fetch docs: node "$SKILL_DIR/scripts/doc-lookup.cjs" get "<library-or-id>" "<specific question>"

Fallback (if doc-lookup fails): Search: node "$SKILL_DIR/scripts/context7-api.cjs" search "<library>" "<question>" Fetch docs: node "$SKILL_DIR/scripts/context7-api.cjs" context "<library-id>" "<specific question>"

Use sparingly — only when a finding hinges on library behavior you aren't sure about. If the API fails, note "could not verify from docs" in the evidence field.

Phase 6: Report findings

For each finding, verify:

  1. Is this a real behavioral issue, not a style preference? (If you can't describe a runtime trigger, skip it)
  2. Have I actually read the code, or am I guessing? (If you haven't read it, skip it)
  3. Is the runtime trigger actually reachable given the code I've read? (If it requires impossible preconditions, skip it)

Incentive structure

Quality matters more than quantity. The downstream Skeptic agent will challenge every finding:

  • Real bugs earn points: +1 (Low), +5 (Medium), +10 (Critical)
  • False positives cost -3 points each — sloppy reports destroy your net value
  • Five real bugs beat twenty false positives

Output format

Write a JSON array. Each item must match this contract:

[
  {
    "bugId": "BUG-1",
    "severity": "Critical",
    "category": "security",
    "file": "src/api/users.ts",
    "lines": "45-49",
    "claim": "SQL is built from unsanitized user input.",
    "evidence": "src/api/users.ts:45-49 const query = `...${term}...`",
    "runtimeTrigger": "GET /api/users?term=' OR '1'='1",
    "crossReferences": ["src/db/query.ts:10-18"],
    "confidenceScore": 93,
    "confidenceLabel": "high",
    "stride": "Tampering",
    "cwe": "CWE-89"
  }
]

Rules:

  • Return a valid empty array [] when you found no bugs.
  • confidenceScore must be numeric on a 0-100 scale.
  • confidenceLabel is optional, but if present it must be high, medium, or low.
  • crossReferences must always be an array. Use ["Single file"] when no extra file is involved.
  • category: security requires specific stride and cwe values.
  • Non-security findings must use stride: "N/A" and cwe: "N/A".
  • Do not append coverage summaries, totals, or prose outside the JSON array.
  • If the assignment also requested a Markdown companion, render it from this JSON after writing the canonical artifact.

CWE Quick Reference (security findings only)

VulnerabilityCWESTRIDE
SQL InjectionCWE-89Tampering
Command InjectionCWE-78Tampering
XSS (Reflected/Stored)CWE-79Tampering
Path TraversalCWE-22Tampering
IDORCWE-639InfoDisclosure
Missing AuthenticationCWE-306Spoofing
Missing AuthorizationCWE-862ElevationOfPrivilege
Hardcoded CredentialsCWE-798InfoDisclosure
Sensitive Data ExposureCWE-200InfoDisclosure
Mass AssignmentCWE-915Tampering
Open RedirectCWE-601Spoofing
SSRFCWE-918Tampering
XXECWE-611Tampering
Insecure DeserializationCWE-502Tampering
CSRFCWE-352Tampering

For unlisted types, use the closest CWE from https://cwe.mitre.org/top25/

After all findings, output:

TOTAL FINDINGS: [count] TOTAL POINTS: [sum of points] FILES SCANNED: [list every file you actually read — this is verified by the orchestrator] FILES SKIPPED: [list files you were assigned but did NOT read, with reason: "context limit" / "filtered by scope rules"] SCAN COVERAGE: [CRITICAL: X/Y files | HIGH: X/Y files | MEDIUM: X/Y files] (based on risk map tiers) UNTRACED CROSS-REFS: [list any cross-references you noted but could NOT trace because the file was outside your assigned partition. Format: "BUG-N → path/to/file.ts:line (not in my partition)". Write "None" if all cross-references were fully traced. The orchestrator uses this to run a cross-partition reconciliation pass.]

Reference examples

For analysis methodology and calibration examples (3 confirmed findings + 2 false positives with STRIDE/CWE), read $SKILL_DIR/prompts/examples/hunter-examples.md before starting your scan.

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: bug-hunter](https://darkplay.ru/ai/skills/bug-hunter-bug-hunter)

Похожие скиллы и другие разделы каталога

Похожие скиллы в категории «Безопасность»

Та же категория — сравните, что ещё подойдёт под вашу задачу.

security-auditcloudflare · Аудит безопасности кодовой базы — веб-приложения, API, сервисы, CLI-инструменты…
74 941 ★
open-code-reviewalibaba · ИИ-ревью изменений в Git через CLI `ocr` из alibaba/open-code-review. Используется для…
53 899 ★
semgreptrailofbits · Запускает статический анализ Semgrep по кодовой базе через параллельные субагенты. Два…
8 264 ★
threat-modelanthropics · Построение модели угроз для кодовой базы. Режимы: «interview» — опрос владельца…
7 762 ★
bug-bountyshuvonsec · Полный процесс bug bounty: разведка (перечисление поддоменов, поиск активов…
5 976 ★
ctf-reverseljagiello · Техники реверс-инжиниринга для CTF: бинарники, APK, WASM, прошивки, кастомные VM.
3 736 ★
hackyaklang · Основной роутер HackSkills: тестирование веб-приложений, API, recon, триаж уязвимостей.
2 670 ★
backend-developmentmrgoonie · Бэкенд на Node.js, Python, Go, Rust: фреймворки, БД, API, аутентификация, безопасность.
2 246 ★
fact-checkelvisun · Извлекает фактические утверждения из PR-текстов, проверяет каждое и подкрепляет ссылками.
1 701 ★
vibesec-skillbehisecc · Помогает Claude писать безопасные веб-приложения и проводить аудит на соответствие…
1 424 ★
Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

Silent Failure Hunteraffaan-m · Проверка кода на скрытые сбои, проглоченные ошибки и плохие fallback-и.
225 587 ★
hunteranthropics · Поиск и проверка рабочих email-адресов, поиск контактов по домену и обогащение данных о…
100 комп.
gooseworksanthropics · 100+ навыков для GTM, продаж и ресёрча: парсинг Twitter/X, Reddit, LinkedIn и веба.
38 комп.
hunter-for-claudeanthropics · Поиск и обогащение данных о компаниях через Hunter, не покидая Claude.
38 комп.
signal-hunteranthropics · Ежедневный ИИ-поиск трендов: собирает контент из 15+ источников (HackerNews, GitHub…
38 комп.
skill-hunteranthropics · Перед реализацией ищет уже существующие навыки, MCP-серверы, CLI, плагины или API под…
38 комп.
databricks-packjeremylongshore · 5 навыков для Databricks: поиск утечек затрат, форензика кластеров и миграция UC.
2 926 ★
Dead Code Hunterjeremylongshore · Находит мёртвый код и неиспользуемые экспорты через knip/vulture/deadcode.
2 470 ★
domain-hunterresciencelab · Поиск доменов, сравнение цен регистраторов и промокоды.
1 914 ★
Bug HunterNeoLabHQ · Агент для поиска багов и критических проблем в локальных изменениях и pull request через…
1 197 ★

Лучшие ИИ-инструменты для программирования

ИИ для программирования

Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные

GenAPIGenapi
По запросу
5.0
Notepad++ AINotepad-plus-plus
По запросу
4.9
GitHub CopilotGitHub
По подписке
4.9
Creatium MaxCremax
По запросу
4.8
Emacs AIGnu
По запросу
4.8
KiteKite
По запросу
4.8
Amazon Q DeveloperAmazon
По запросу
4.8
VECTA
Есть бесплатный тариф
4.8
SoftPractice
Есть бесплатный тариф
4.8
VibeForge
Есть бесплатный тариф
4.7

Лучшие ИИ-инструменты для автоматизации и ассистентов

Ассистенты и автоматизация

Подборка ИИ-ассистентов для автоматизации рутины и ускорения рабочих процессов. Сервисы, которые берут на себя переписку, анализ данных, ведение базы знаний и подготовку продаж, эк

Give Me Public
Есть бесплатный тариф
5.0
AITunnelAitunnel
По запросу
5.0
STIVAStiva
По запросу
5.0
Wikibot (Викибот)Wikibot
По запросу
4.9
mymeet.aiMymeet
По запросу
4.9
InsighterInsighter
По запросу
4.9
TGHuntTghunt
Есть бесплатный тариф
4.9
LegiscanLegiscan
По запросу
4.9
RouterAIRouterai
По запросу
4.9
Wikibot 1.0 (Викибот)Wikibot
По запросу
4.9

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8