Logo de Security

Security

Comunidade
hamr0
security

Security audit — recurring six, injection, auth, trust boundaries

Visão geral

Publicado porhamr0
Repositórioliteagents
Nome da habilidadesecurity
Estrelas
27
Forks
4
Arquivos incluídos
Somente instruções
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por hamr0 no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Security no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/hamr0/liteagents/tree/main/packages/ampcode/skills/security
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hamr0/liteagents.git /tmp/liteagents
mkdir -p .claude/skills
cp -r /tmp/liteagents/packages/ampcode/skills/security .claude/skills/security
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Security em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Security automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Security não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Audit $ARGUMENTS for security vulnerabilities. Reports, never edits — it verifies every claim, then hands the findings to whoever asked.

Runs identically standalone or as stage 2 of /branch-review. The only difference is where the report goes: to the orchestrator when called as a stage, to you when you run it directly. Same checks, same verify pass, same escalation. It does not spawn a worker of its own — run it inline; when /branch-review calls it, it is already inside that command's worker.

Adapt scope to what the target actually is — a library, CLI, web app, and service won't all have every category. Skip what genuinely doesn't apply; never invent findings to fill a section.

The recurring six (check every project, where applicable)

These show up in nearly every quickly-built app regardless of stack:

  1. Secrets in the repo. Tokens / API keys / .env files committed to tracked files or anywhere in git history. Verify .env is gitignored and only a value-less .env.example is tracked. Scan ALL history, every branch — a range or target never narrows this — with: git log --all -p | grep -nE '(sk-[A-Za-z0-9_-]{16,}|AKIA[0-9A-Z]{16}|gh[pousr]_[A-Za-z0-9]{30,}|xox[abprs]-[A-Za-z0-9-]{10,}|AIza[0-9A-Za-z_-]{35}|-----BEGIN [A-Z ]*PRIVATE KEY)' plus any key shape specific to this project's providers. Report each hit as real or a known test fixture. Secrets must load from env / a secret store at runtime — never hardcoded, never logged.
  2. Data-access authorization (tenant isolation). Every record read or written must be scoped to the requesting principal — via DB-level rules (RLS / row policies) and/or application-layer ownership checks. Flag any query that trusts a client-supplied id without an ownership or role gate, and any table/collection with a policy that's too broad or missing.
  3. Rate limiting. Every externally reachable endpoint and abuse-prone inbound path is bounded — including authenticated mutation/write routes, not just the obvious public GETs. Note any unbounded route.
  4. Error handling past the happy path. Third-party / IO / DB failures are caught; nothing fails silently; no internal detail (stack traces, queries, secrets) leaks to the client. Background/async work has its own catch.
  5. Authorization beyond authentication (IDOR / privilege). "Logged in" is not "allowed to do this". Confirm ownership AND role/permission checks on every state-changing or privileged action. Mentally swap an id in a request — does it return 403, or does it leak/modify another user's data?
  6. Inefficient data access (N+1 / unindexed). Queries inside loops, per-render repeated calls, missing indexes on filtered/joined columns. Correct but falls over under load — a real availability risk.

Also scan for

  • Injection: SQL, command, XSS, template, path traversal.
  • Auth/session: weak token handling, CSRF, session fixation, predictable ids.
  • Trust boundaries: spoofable headers (e.g. X-Forwarded-For) trusted without a vetted proxy; unvalidated untrusted input (uploads, inbound mail, webhooks); services bound to 0.0.0.0 that should be loopback-only.
  • Config: debug mode on in prod, default creds, missing security headers, permissive CORS.
  • Dependencies: known CVEs; unmaintained or single-maintainer deps in security-critical paths.

Output

Severity-ranked findings (Critical → High → Medium → Low), each with:

  • Location (file:line)
  • Risk — what an attacker actually gains
  • Remediation — concrete, minimal fix

End with the coverage block — all 11 lines, these keys, this order, each filled with exactly one of ran / N/A / NOT RUN. A missing line counts as NOT RUN. N/A must hold for the whole repo, not the diff.

- secrets · ran: <whole-repo evidence: command run or file:line read; the history command's hit count, `0 hits` included> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- tenant-isolation · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- rate-limiting · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- error-handling · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- authorization · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- data-access · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- injection · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- auth-session · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- trust-boundaries · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- config · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>
- dependencies · ran: <whole-repo evidence: command run or file:line read> | N/A: <why it holds for the whole repo, not just this diff> | NOT RUN: <reason>

After the scan — verify, then escalate

Findings are claims, not facts. Validate every one before reporting it; an unverified finding wastes more time than a missed one.

Verify each claim — adversarially. Re-read the cited file:line in full context and try to break the claim, not to confirm it: is there a gate upstream, a framework default, a caller that already validates? A pass that sets out to confirm reliably misses what an adversarial pass finds. Mark each confirmed, false positive (with reason), or uncertain (with what would settle it).

Never fix. Not even a confirmed, one-line, obvious fix. Describe the minimal remediation and hand it back — applying it is a separate, separately authorized action.

Flag these explicitly — they need a human decision, not a recommendation:

  • the finding is uncertain after grounding (you'd need info you don't have),
  • the fix has multiple reasonable shapes (e.g. reject-vs-sanitize, index-vs-paginate) — present options with tradeoffs, not a chosen path,
  • it affects downstream (function signatures, response shape, DB schema, any caller contract), or
  • it touches auth / crypto / session / token primitives — even an "obvious" fix here warrants confirmation.

Final report: confirmed (with remediation described) · needs a decision (why + the options and their tradeoffs) · false positive (why) · uncertain (what is needed to decide).

Escalate, never assume. Anything you cannot decide, cannot verify, or that this spec does not cover → say so plainly in the report rather than guessing. When running as a stage of /branch-review, that report goes to the orchestrator; standalone, it goes to the user. Never widen scope, never fix a side issue you noticed along the way.

Perguntas frequentes

O que a habilidade de IA Security faz?

Security audit — recurring six, injection, auth, trust boundaries

Por que usar Security no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Security é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Security no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/hamr0/liteagents/tree/main/packages/ampcode/skills/security. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Security?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Security?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Security com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Security é gratuita?

Sim. A habilidade é publicada no GitHub por hamr0 sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇