Логотип Security Precheck

Security Precheck

Спільнота
LeeYudok
security-precheck

Self-run security pre-check ahead of an external security-team code audit. Runs the security-audit agent (plus SonarQube security hotspots when configured), grades findings P0/P1/P2, splits them into issues, and fixes them with parallel subagents. Use on "security check", "security audit prep", "code audit" requests.

Огляд

ВидавецьLeeYudok
Репозиторійagents-scaffold
Назва навичкиsecurity-precheck
Зірки
38
Форки
8
Файли в пакеті
Лише інструкції
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

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

  • Відкритий вихідний код

    Видавець на GitHub: LeeYudok. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Security Precheck у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/LeeYudok/agents-scaffold/tree/main/presets/lang/en/base/.claude/skills/security-precheck
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LeeYudok/agents-scaffold.git /tmp/agents-scaffold
mkdir -p .claude/skills
cp -r /tmp/agents-scaffold/presets/lang/en/base/.claude/skills/security-precheck .claude/skills/security-precheck
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Security Precheck в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Security Precheck, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Security Precheck не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Security Pre-check (before an external audit)

Sweep the codebase with the same criteria an external security team would use, and fix findings ahead of time.

1. Scan (parallel)

Run concurrently:

Agent(subagent_type: "security-audit") — grep-based scan of the 12 P0 code items
  (hardcoded secrets, missing auth, PII logging, ...) + 8 agent-config items
  (.claude/ hooks, MCP, permissions, prompt injection)
bash
# SonarQube security hotspots (TO_REVIEW only) — skip this step with a note if the
# project has no sonar-project.properties. Never hardcode the host or token:
# use $SONAR_HOST_URL / $SONAR_TOKEN from the environment.
if [ -f sonar-project.properties ]; then
  key=$(grep 'sonar.projectKey' sonar-project.properties | cut -d= -f2-)
  curl -s -u "${SONAR_TOKEN}:" \
    "${SONAR_HOST_URL}/api/hotspots/search?projectKey=$key&status=TO_REVIEW&ps=500" \
    | python3 -c "import sys,json; d=json.load(sys.stdin); print('TO_REVIEW:', len(d['hotspots'])); [print(h['ruleKey'], h['component'], h.get('line','')) for h in d['hotspots']]"
fi

The security-audit agent produces better results when its prompt names this project's concrete context (auth mechanism, session handling, CORS config, data-access layer, PII fields). Don't describe these from memory — at run time, grep the repo for its auth/session/CORS/data-access entry points and include what you actually find.

2. Grading + report

  • P0 (critical): escalate immediately. Hardcoded secrets, auth bypass, SQL injection, .env leaked into git, etc.
  • P1 (recommended fix): this skill's main target. Missing rate limits, missing cookie attributes, missing constant-time comparison, overly broad permission allows, PII logging, etc.
  • Pass: also list items that were checked and found clean (what was checked is the evidence of coverage).

Report as a table: P0 N / P1 N / pass N.

3. Issue registration (P1 and up, skip trivia)

Group findings by file/topic into one issue each — no issue-per-finding spam. Example: three findings in the same auth controller (rate limit, cookie attributes, constant-time comparison) become one issue.

bash
# forge CLI per rules/forge.md
gh issue create -t "<title>" -b "<pre-check background + concrete findings + files>"   # GitHub
glab issue create -t "<title>" -d "<pre-check background + concrete findings + files>" -y  # GitLab

Local-settings fixes (.claude/settings.local.json allow-list trimming, MCP permission review, ...) are handled directly without an issue — local-scope config, not P1 workflow material.

4. Parallel fixing (model tiers)

Split issues by nature and invoke Agent concurrently. Issues touching the same file go to a single agent — splitting them causes concurrent-edit conflicts on that file.

Work typesubagent_typemodel
Backend changes involving security judgment (auth/crypto/session)sdlc-developeropus
General implementation (logging/validation/config)sdlc-developersonnet
Investigate-only review (keep if justified, fix if not)general-purposehaiku

Every Agent call needs isolation: "worktree" (prevents parallel edit conflicts). Tell each agent to create a branch and commit only — no push, no merge; the parent session gates merges sequentially (multiple worktrees hitting main concurrently is a race).

5. Sequential merge + close (via PR/MR)

As each agent completes:

  1. For security/auth changes, read the diff yourself (constant-time comparison approach, session key choice, rate-limit scope, ... — if these are wrong, the pre-check was pointless)
  2. git push -u origin <branch> → open a PR/MR (body Closes #N). Never merge locally into or push directly to the default branch (P1 — no direct commits on main/develop)
  3. Merge once CI and the project's build/test gates (the stack gates in .claude/hooks/pre-commit.sh are the reference) pass. Merge PRs/MRs one at a time; bring the default branch into the next one (git merge origin/<default>) and re-check its gates first — avoids concurrent-merge races
  4. git worktree remove <path> --force && git branch -d <branch>
  5. Confirm the issue closed per the forge convention (rules/forge.md) — close manually only if it did not auto-close

6. Memory record

Write .claude/memory/project_security-precheck.md with the date, finding counts, issue numbers handled, and accepted risks (e.g. rate-limit keying may be inaccurate behind a proxy; a specific MCP allow kept with rationale) — so the next pre-check does not re-litigate items already reviewed and consciously kept.

Learned warnings

  • Keying a rate limit/lockout on the raw client address alone (request.getRemoteAddr() or equivalent) collapses to the proxy IP behind a reverse proxy, turning it into a global lock — verify whether the deployment topology requires X-Forwarded-For parsing during review.
  • Worktrees start without installed dependencies (node_modules, venv, ...), so frontend/build gates can fail environmentally — for backend-only changes a symlink workaround is fine (never commit it); if the issue touches frontend code, tell the agent to run the package install (lockfile-frozen) in its worktree first.
  • MCP permissions (mcp__*) are granted per tool — "read-only only" granularity is not possible. If a tool is genuinely needed, don't force-remove it; record the rationale in memory and keep it.

Поширені запитання

Що робить навичка ШІ Security Precheck?

Self-run security pre-check ahead of an external security-team code audit. Runs the security-audit agent (plus SonarQube security hotspots when configured), grades findings P0/P1/P2, splits them into issues, and fixes them with parallel subagents. Use on "security check", "security audit prep", "code audit" requests.

Навіщо використовувати Security Precheck у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Security Precheck — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Security Precheck у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/LeeYudok/agents-scaffold/tree/main/presets/lang/en/base/.claude/skills/security-precheck. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Security Precheck?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Security Precheck?

Зі скількома забажаєте. У TypingMind ви можете використовувати Security Precheck із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Security Precheck?

Так. На GitHub цю навичку публікує LeeYudok за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇