security-ownership-map
O que ela faz
Esta skill guia o agente na análise do histórico do git para ver quem trabalha em quais arquivos e o quanto o código depende de uma só pessoa. É voltada para líderes de engenharia e equipes de segurança.
Quando usar
- ✓Quando você quer encontrar código sensível que só uma pessoa modificou.
- ✓Quando precisa verificar se o arquivo CODEOWNERS corresponde a quem realmente mantém o código.
- ✓Quando quer exportar dados de propriedade para uma ferramenta de grafos, como Neo4j ou Gephi.
Link da skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/security/security-ownership-map/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Você pode analisar nosso repositório git para encontrar arquivos sensíveis que só uma pessoa alterou?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente lê o histórico do git, monta um grafo de pessoas e arquivos, calcula a propriedade e o bus factor, e exporta os resultados.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Security Ownership Map
Overview
Build a bipartite graph of people and files from git history, then compute ownership risk and export graph artifacts for Neo4j/Gephi. Also build a file co-change graph (Jaccard similarity on shared commits) to cluster files by how they move together while ignoring large, noisy commits.
Requirements
- Python 3
networkx(required; community detection is enabled by default)
Install with:
pip install networkx
Workflow
- Scope the repo and time window (optional
--since/--until). - Decide sensitivity rules (use defaults or provide a CSV config).
- Build the ownership map with
scripts/run_ownership_map.py(co-change graph is on by default; use--cochange-max-filesto ignore supernode commits). - Communities are computed by default; graphml output is optional (
--graphml). - Query the outputs with
scripts/query_ownership.pyfor bounded JSON slices. - Persist and visualize (see
references/neo4j-import.md).
By default, the co-change graph ignores common “glue” files (lockfiles, .github/*, editor config) so clusters reflect actual code movement instead of shared infra edits. Override with --cochange-exclude or --no-default-cochange-excludes. Dependabot commits are excluded by default; override with --no-default-author-excludes or add patterns via --author-exclude-regex.
If you want to exclude Linux build glue like Kbuild from co-change clustering, pass:
python skills/skills/security-ownership-map/scripts/run_ownership_map.py \
--repo /path/to/linux \
--out ownership-map-out \
--cochange-exclude "**/Kbuild"
Quick start
Run from the repo root:
python skills/skills/security-ownership-map/scripts/run_ownership_map.py \
--repo . \
--out ownership-map-out \
--since "12 months ago" \
--emit-commits
Defaults: author identity, author date, and merge commits excluded. Use --identity committer, --date-field committer, or --include-merges if needed.
Example (override co-change excludes):
python skills/skills/security-ownership-map/scripts/run_ownership_map.py \
--repo . \
--out ownership-map-out \
--cochange-exclude "**/Cargo.lock" \
--cochange-exclude "**/.github/**" \
--no-default-cochange-excludes
Communities are computed by default. To disable:
python skills/skills/security-ownership-map/scripts/run_ownership_map.py \
--repo . \
--out ownership-map-out \
--no-communities
Sensitivity rules
By default, the script flags common auth/crypto/secret paths. Override by providing a CSV file:
# pattern,tag,weight
**/auth/**,auth,1.0
**/crypto/**,crypto,1.0
**/*.pem,secrets,1.0
Use it with --sensitive-config path/to/sensitive.csv.
Output artifacts
ownership-map-out/ contains:
people.csv(nodes: people)files.csv(nodes: files)edges.csv(edges: touches)cochange_edges.csv(file-to-file co-change edges with Jaccard weight; omitted with--no-cochange)summary.json(security ownership findings)commits.jsonl(optional, if--emit-commits)communities.json(computed by default from co-change edges when available; includesmaintainersper community; disable with--no-communities)cochange.graph.json(NetworkX node-link JSON withcommunity_id+community_maintainers; falls back toownership.graph.jsonif no co-change edges)ownership.graphml/cochange.graphml(optional, if--graphml)
people.csv includes timezone detection based on author commit offsets: primary_tz_offset, primary_tz_minutes, and timezone_offsets.
LLM query helper
Use scripts/query_ownership.py to return small, JSON-bounded slices without loading the full graph into context.
Examples:
python skills/skills/security-ownership-map/scripts/query_ownership.py --data-dir ownership-map-out people --limit 10
python skills/skills/security-ownership-map/scripts/query_ownership.py --data-dir ownership-map-out files --tag auth --bus-factor-max 1
python skills/skills/security-ownership-map/scripts/query_ownership.py --data-dir ownership-map-out person --person alice@corp --limit 10
python skills/skills/security-ownership-map/scripts/query_ownership.py --data-dir ownership-map-out file --file crypto/tls
python skills/skills/security-ownership-map/scripts/query_ownership.py --data-dir ownership-map-out cochange --file crypto/tls --limit 10
python skills/skills/security-ownership-map/scripts/query_ownership.p
Perguntas frequentes
O que é bus factor?
É o número de pessoas que precisariam sair para que uma parte do código não tivesse mais ninguém que a conheça bem.
Ela precisa de ferramentas especiais?
Precisa do Python 3 e do pacote networkx.
Ela pode excluir arquivos que atrapalham?
Sim. Arquivos de lock e semelhantes são excluídos por padrão, para que os resultados reflitam o trabalho real no código.
Detalhes
Descrição original do autor
Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization. Trigger only when the user explicitly wants a security-oriented ownership or bus-factor analysis grounded in git history (for example: orphaned sensitive code, security maintainers, CODEOWNERS reality checks for risk, sensitive hotspots, or ownership clusters). Do not trigger for general maintainer lists or non-security ownership questions.
Popularidade
- Estrelas no GitHub
- 33 mil
- Posição no ranking
- #9069
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
owasp-security
33 milEnsina seu agente as orientações de segurança da OWASP para apps web, APIs, mobile, contêineres e agentes de IA, identificando fraquezas comuns.
agent-management
33 milPermite que seu agente crie, liste, hiberne, reative, renomeie e apague agentes de IA pela linha de comando do AI Maestro, gerenciando o ciclo de vida de cada um.
agent-messaging
33 milPermite que seu agente envie, receba e responda mensagens assinadas entre agentes de IA pelo Agent Messaging Protocol, na sua própria máquina.
docs-search
33 milPermite que seu agente pesquise a documentação de código gerada automaticamente, conferindo a API real antes de alterar o código.
Skills parecidas
reverse-engineer-anything
422 milAjuda seu agente a analisar apps e pacotes já publicados para explicar recursos, comparar versões ou orientar uma reconstrução, usando a ferramenta REA.
1password
394 milAjuda seu agente a configurar a CLI do 1Password, fazer login e ler ou injetar segredos sem imprimir seus valores no chat.
healthcheck
394 milAjuda seu agente a auditar o computador ou servidor que roda o OpenClaw em busca de riscos como SSH, firewall, atualizações e backups, com correções seguras.