Логотип Ai Code Review

Ai Code Review

Организация
RedHatProductSecurity
ai-code-review

Security-focused review of AI-generated or AI-assisted code. Use when reviewing code produced by AI coding assistants, auditing AI-generated patches, verifying AI-assisted contributions before merge, or when a review needs to account for failure modes specific to AI code generation.

Обзор

ИздательRedHatProductSecurity
Репозиторийprodsec-skills
Название навыкаai-code-review
Звёзды
56
Форки
9
Файлы в комплекте
Только инструкции
ЛицензияApache-2.0
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Издатель навыка на GitHub — RedHatProductSecurity. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Ai Code Review в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/RedHatProductSecurity/prodsec-skills/tree/main/ge-core/ai-code-review
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/RedHatProductSecurity/prodsec-skills.git /tmp/prodsec-skills
mkdir -p .claude/skills
cp -r /tmp/prodsec-skills/ge-core/ai-code-review .claude/skills/ai-code-review
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Ai Code Review в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Ai Code Review, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Ai Code Review не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

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

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

AI-Generated Code Security Review

Security review checklist and methodology for code produced by AI coding assistants (Claude, Copilot, Cursor, Gemini, or any LLM-based tool). AI-generated code has characteristic failure modes that differ from human-written code and require specific review attention.

When to Use

  • Reviewing PRs or patches marked with Assisted-by: or Generated-by: attribution
  • Auditing code known or suspected to be AI-generated
  • As a supplementary checklist during any code review where AI assistance was used
  • Verifying AI-generated security fixes or test code

When NOT to Use

  • General code review without AI involvement (use module/skills/differential-review/SKILL.md)
  • Reviewing AI model behavior or prompt injection (use module/skills/prompt-injection-mitigation/SKILL.md)
  • Evaluating AI tool security posture (use module/skills/third-party-model-security/SKILL.md or module/skills/file-protection/SKILL.md)

AI-Specific Failure Modes

AI code generation has characteristic error patterns that differ from typical human mistakes. Review for these specifically:

1. Hallucinated APIs and symbols

LLMs confidently generate calls to functions, methods, flags, configuration keys, or library features that do not exist. These compile or parse without errors but fail at runtime, or worse, silently do nothing.

Detection:

  • Verify every imported module, function call, and configuration key against the actual codebase and library documentation
  • Check that method signatures match (argument count, types, return values)
  • Search the project for the symbol: rg "function_name" — if it only appears in the new code, it may be hallucinated
  • Check library version: AI may reference APIs from a different version than what the project uses

Security impact: A hallucinated security function (e.g., a nonexistent sanitize_input() call) provides zero protection while giving the appearance of safety.

2. Plausible-but-wrong logic

AI generates code that reads naturally and appears correct but contains subtle logical errors — inverted conditions, off-by-one errors, wrong comparison operators, or incorrect state transitions. These are harder to catch than obviously broken code because they pass casual reading.

Detection:

  • Trace every conditional branch: does the True branch do what the variable name and context suggest?
  • Check comparison operators: < vs <=, == vs !=, and vs or
  • Verify loop bounds and termination conditions
  • Check that error handling goes to the right branch (reject vs allow)

Security impact: An inverted authorization check (if user.is_admin instead of if not user.is_admin) grants access to everyone. The code reads plausibly either way.

3. Pattern drift from project conventions

AI generates code that follows general best practices but diverges from the specific patterns, idioms, and conventions of the project. This introduces inconsistency that makes the codebase harder to audit and may bypass project-specific security mechanisms.

Detection:

  • Compare the new code against existing code doing similar things in the same project
  • Check that the same base classes, decorators, middleware, and utility functions are used
  • Verify that project-specific security patterns (custom validators, auth decorators, logging wrappers) are used instead of generic alternatives

Security impact: Using a generic auth check instead of the project's custom auth decorator may skip logging, rate limiting, or additional validation that the project relies on.

4. Incomplete error handling

AI often generates a working happy path but handles errors with generic catch-all blocks, swallowed exceptions, or missing cleanup. Error paths are where security vulnerabilities hide.

Detection:

  • Check every try/catch, except, or error return: does it handle the error meaningfully or just log and continue?
  • Verify that partial state is rolled back on failure
  • Check that error responses do not leak internal details (stack traces, file paths, SQL queries, internal IPs)
  • Verify that resources (connections, file handles, locks) are released on all code paths

Security impact: A swallowed authentication error may allow an unauthenticated request to proceed. A missing rollback may leave the system in an inconsistent state exploitable by a subsequent request.

5. Stale or incorrect dependency usage

AI training data has a cutoff. Generated code may use deprecated APIs, insecure defaults from older library versions, or patterns that were correct in a previous version but are now vulnerable.

Detection:

  • Check the project's actual dependency versions against what the AI code assumes
  • Look for deprecated function calls or removed APIs
  • Verify that security-relevant defaults match the current library version (e.g., TLS version, hash algorithm defaults)

Security impact: Using a deprecated crypto API with known weaknesses, or relying on a default that changed from insecure to secure (or vice versa) between versions.

6. Abandoned scaffolding

AI generates unfinished-work comments, placeholder implementations, commented-out code blocks, or "temporary" workarounds that are intended to be replaced but get committed as-is.

Detection:

  • Search (case-insensitively) for todo, fixme, hack, temporary, xxx markers
  • Look for commented-out code blocks
  • Check for placeholder values (e.g., a password assigned changeme, a secret key assigned development)
  • Verify that all functions have real implementations, not pass or return None stubs

Security impact: A placeholder secret, a disabled validation, or a stub authentication function shipped to production.

Review Checklist

For each AI-generated or AI-assisted change:

Verification

  • All function calls, imports, and config keys verified against the actual codebase and dependency versions
  • No hallucinated APIs or symbols
  • Method signatures match (argument count, types, returns)

Logic correctness

  • Every conditional branch traced and verified
  • Comparison operators correct (< vs <=, == vs !=)
  • Authorization checks grant/deny the correct direction
  • Loop termination conditions correct

Project consistency

  • Uses project-specific security patterns (not generic alternatives)
  • Matches existing code style, base classes, and idioms
  • Uses the same error handling patterns as surrounding code

Error handling

  • No swallowed exceptions on security-relevant paths
  • Partial state rolled back on failure
  • Error responses do not leak internal details
  • Resources released on all code paths

Completeness

  • No to-do/fix-me/hack markers left in security-critical code
  • No placeholder secrets or credentials
  • No commented-out code that should be either deleted or uncommented
  • No stub implementations (pass, return None, throw new NotImplementedException())

Security tests

  • Tests actually fail before the fix (not tautologies)
  • Assertions verify the security property, not just "no exception"
  • Test credentials match the real threat model
  • Mock objects do not mask the behavior being tested

Output Format

For each finding:

FieldContent
CategoryHallucinated API / Plausible-but-wrong / Pattern drift / Incomplete error handling / Stale dependency / Abandoned scaffolding
LocationFile and line range
FindingWhat is wrong or risky
EvidenceWhy you believe it (missing symbol, inverted logic, project pattern not followed)
SeverityCritical / High / Medium / Low / Nit
SuggestionConcrete fix

Relationship to Other Skills

  • module/skills/differential-review/SKILL.md — General security-focused code review. This skill adds AI-specific failure modes on top.
  • module/skills/fp-check/SKILL.md — When an AI-generated security finding is itself suspect, use fp-check to verify it.
  • module/skills/inconsistency-detection/SKILL.md — AI-generated code that drifts from project patterns creates exactly the kind of inconsistency this technique detects.

Часто задаваемые вопросы

Что делает навык ИИ Ai Code Review?

Security-focused review of AI-generated or AI-assisted code. Use when reviewing code produced by AI coding assistants, auditing AI-generated patches, verifying AI-assisted contributions before merge, or when a review needs to account for failure modes specific to AI code generation.

Зачем использовать Ai Code Review в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Ai Code Review — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Ai Code Review в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/RedHatProductSecurity/prodsec-skills/tree/main/ge-core/ai-code-review. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Ai Code Review?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Ai Code Review?

С любым количеством. В TypingMind вы можете использовать Ai Code Review с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Ai Code Review?

Да. Навык опубликован на GitHub по лицензии Apache-2.0. Издатель — RedHatProductSecurity. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип openclaw

Autoreview

openclaw
ОрганизацияПопулярный

Проводите структурированный анализ кода по прямому запросу; в первую очередь используйте OpenAI/Codex, а затем Claude.

82.2K
391K
Файлы: 12
Открыть
Логотип openclaw

Claw Score

openclaw
ОрганизацияПопулярный

Проверяйте или обновляйте документацию с оценочной картой зрелости OpenClaw на основе корневой таксономии, оценок зрелости и артефактов QA, не используя данные maintainer discrawl или закоммиченные отчёты об инвентаризации.

82.2K
391K
Файлы: 51
Открыть
Логотип openclaw

Clawsweeper

openclaw
ОрганизацияПопулярный

Для любых задач ClawSweeper: отчёты о проверке issue/PR в OpenClaw, задания на исправление, PR с облачными исправлениями, команды упоминания сопровождающих @clawsweeper, доверенные автоисправления и автомерж после проверки ClawSweeper, мониторинг GitHub Actions…

82.2K
391K
Файлы: 1
Открыть
Логотип openclaw

Control Ui E2e

openclaw
ОрганизацияПопулярный

Используйте при проектировании, тестировании, исправлении или расширении графического интерфейса OpenClaw Control UI, включая галереи стресс-тестов интерфейса с полями для отзывов, сквозные проверки Vitest + Playwright, сценарии Gateway с заглушками…

82.2K
391K
Файлы: 1
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇