agentleFS
DespensativoDespensativo/OpenWrt-Skills/skills/security-auditor/SKILL.md

security-auditor

Skill1 starsChanged 50 days agoMITView on GitHub

Expert security auditor specialized in embedded systems, OpenWrt, LuCI RPC, and shell security. Use proactively to review command injection in sys.exec, ubus access controls, token security, and sensitive data handling.

62 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use infrastructure-setup, proofreader and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • madeincartelSkill

    infrastructure-setup

    Sets up dev infrastructure for new projects: framework init, folder structure, Docker, pre-commit hooks (gitleaks), testing infrastructure, .gitignore.

    Also in 3 projects that use this

  • xcrrrSkill

    proofreader

    Use this skill when reviewing written content for grammar, spelling, punctuation, style consistency, and tone—before publishing, submitting, or sending. Trigger phrases: 'proofread this', 'check my writing', 'review this for errors', 'edit this email/report/essay'. Do NOT use when structural rewrites or content changes are needed—proofreading fixes surface errors, not substantive problems.

    Also in 3 projects that use this

  • peopleforresterSkill

    refactoring-guide

    Safe refactoring patterns and techniques. Use when the user wants to improve code structure, reduce duplication, or make code more maintainable without changing behavior. Emphasizes incremental changes with test coverage.

    Also in 3 projects that use this

  • madeincartelSkill

    user-spec-planning

    Creates user-spec.md through adaptive interview with codebase scanning and dual validation.

    Also in 3 projects that use this

  • zwjbendnSkill

    habit-builder

    Designs and manages healthy habits for sustainable weight loss through lifestyle change. Uses Atomic Habits / Tiny Habits methodology — small behaviors that compound over time. Use this skill when: the system needs to recommend a new habit after onboarding, a current habit graduates or fails, the user asks about building habits, or Weekly Review identifies a behavioral pattern worth addressing. Also use when evaluating habit progress, deciding when a habit has "graduated," or handling a restart after the user falls off. This skill does not send its own reminders — habit check-ins are woven into meal conversations managed by Notification Composer. This skill owns the check-in logic (when, how often, tone); Notification Composer provides the conversation vehicle.

    Also in 3 projects that use this

  • nilecuiSkill

    documentation-writing

    Writing clear, discoverable software documentation following the Eight Rules and Diataxis framework. Use when creating README files, API docs, tutorials, how-to guides, or any project documentation. Automatically enforces docs/ location, linking requirements, and runnable examples.

    Also in 3 projects that use this

  • +3 more from madeincartel

The file

Files
SKILL.md

Security Auditor for ARK Router & Embedded OpenWrt

Objetivo

Atuar na prevenção, detecção e mitigação de vulnerabilidades de segurança específicas de roteadores embarcados rodando OpenWrt / LuCI (Atheros QCA9558 e MediaTek MT7981).


Áreas de Auditoria Crítica

1. Prevenção de Injeção de Comando (Command Injection)

  • Regra: NUNCA concatenar parâmetros recebidos de formulários LuCI ou RPC diretamente em chamadas de shell (luci.sys.exec, /bin/sh -c, fs.exec).
  • Validação: Todos os inputs (endereços IP, MAC addresses, hostnames, nomes de interface, senhas Wi-Fi) devem ser validados via regex estrita ou sanitizados antes do processamento.
  • Evitar eval: Nunca utilizar eval em scripts ash de shell.

2. Controle de Acesso e LuCI RPC / Ubus

  • Verificar permissões de RPC no ACL do LuCI (/usr/share/rpcd/acl.d/).
  • Assegurar que métodos expostos via ubus exijam autenticação e limitem privilégios de leitura/escrita.
  • Validar se requisições sensíveis possuem verificação de sessão/token anti-CSRF.

3. Gestão de Segredos e Dados Sensíveis

  • Flash Protection: NUNCA armazenar senhas em texto plano, tokens permanentes ou históricos de rede sem expiração na partição permanente de Flash (/etc).
  • RAM Efêmera: Tokens de confirmação, estados de sessão e chaves temporárias devem ser mantidos em /tmp (RAM) com TTL (tempo de vida curto) e permissões chmod 600.
  • Prevenção de Leaks: Mascarar ou censurar senhas e chaves PSK em logs de depuração (dmesg, logread) ou relatórios de auditoria.

4. Trava de Confirmação em Ações Críticas (Safety Interception)

  • Operações de alto risco (Reboot, Factory Reset, Sysupgrade, mudança de perfil de firewall) DEVEM exigir:
    1. Interceptação na fase de captura do DOM (addEventListener('click', fn, true)).
    2. Trava visual de pelo menos 2 segundos com contagem decrescente no botão.
    3. Token efêmero de uso único validado no backend antes da execução.

5. Integridade do Sistema de Arquivos

  • Garantir que permissões de arquivos de configuração em /etc/config/ não sejam world-writable (chmod 600 ou 644).
  • Verificar que binários e scripts em /etc/init.d/ ou /usr/libexec/ pertençam ao root:root com permissão 755.

6. Instalação, Desinstalação e Recuperação

  • Antes de instalar um pacote, compare o espaço livre com o tamanho descompactado, dependências e uma reserva para UCI; confirme o espaço novamente depois. Um .apk ou .ipk instalado no sistema em execução pode ocupar /overlay.
  • Se df ou a identificação do mount falhar, não interprete espaço desconhecido como espaço suficiente em um alvo com flash; investigue o tipo de filesystem antes de liberar a instalação.
  • Backups sob /tmp são voláteis. Se a recuperação precisar sobreviver a um reboot, copie o backup para fora do roteador e confira sua integridade.
  • Ao substituir DNS por um resolvedor local, registre o estado anterior de servidores, noresolv, allservers e opções DHCP. Na desativação, restaure as escolhas do usuário e teste resolução de nomes para clientes. Um fallback público exige decisão explícita de produto.
  • Se uma ação RPC reiniciar rpcd ou uhttpd, evite encerrar a conexão antes da resposta. Após reconectar, consulte o estado real do serviço ou pacote; não trate toda falha XHR como sucesso.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.