Back to Skills

security-ownership-map

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 n

23,066stars1,564forksUpdated 7/1/2026

Security Assessment

Safe(100/100)
Security Score100/100

About security-ownership-map

Security Ownership Map analyzes git repositories to build a security-oriented ownership topology connecting people to files, computing bus factor and sensitive-code ownership, and exporting CSV/JSON artifacts for graph databases and visualization such as Neo4j and Gephi. It is meant to trigger only for security-oriented ownership or bus-factor analysis grounded in git history—questions about orphaned sensitive code, security maintainers, CODEOWNERS reality checks for risk, sensitive hotspots, or ownership clusters—and explicitly not for general maintainer lists or non-security ownership questions. It requires Python 3 and the networkx library, which enables community detection by default.

The workflow scopes a repository and optional time window, decides sensitivity rules (defaults flag common auth, crypto, and secret paths, or a CSV config of pattern/tag/weight can be supplied), and builds the ownership map with scripts/run_ownership_map.py. Alongside the bipartite people-to-file graph, it builds a file co-change graph using Jaccard similarity on shared commits to cluster files that move together, while ignoring large, noisy "supernode" commits via --cochange-max-files and excluding common glue files (lockfiles, .github/*, editor config) and Dependabot commits by default, with override flags available. Communities are computed by default from co-change edges, and GraphML output is optional. Results are queried with scripts/query_ownership.py, which returns small, JSON-bounded slices without loading the full graph into context.

Output artifacts written to the chosen directory include people.csv, files.csv, edges.csv, cochange_edges.csv, summary.json of security findings, an optional commits.jsonl, communities.json with per-community maintainers, node-link JSON graphs, and optional GraphML files. The people file adds timezone detection based on author commit offsets. A rich set of query recipes answers common security questions—orphaned sensitive code, hidden owners, bus-factor hotspots, auth/crypto files with bus factor at or below one, who touches sensitive code most, and co-change neighbors—plus a community_maintainers.py helper that buckets maintainers monthly or quarterly. Defaults use author identity, author date, and exclude merge commits, with flags to switch to committer attribution, include merges, adjust touch counting, apply recency weighting, and filter bot authors.

FAQ

What are the requirements to run this skill?

Python 3 and the networkx library, installed via pip install networkx. networkx is required because community detection is enabled by default.

When should this skill be triggered?

Only for security-oriented ownership or bus-factor analysis grounded in git history, such as orphaned sensitive code, security maintainers, CODEOWNERS risk checks, sensitive hotspots, or ownership clusters. Not for general maintainer lists or non-security questions.

How does it decide which files are sensitive?

By default it flags common auth, crypto, and secret paths. You can override this with a CSV config of pattern, tag, and weight passed via --sensitive-config.

What is the co-change graph and how does it avoid noise?

It links files by Jaccard similarity on shared commits to cluster files that move together. It ignores large supernode commits (--cochange-max-files) and excludes glue files like lockfiles, .github/*, and editor config, plus Dependabot commits, by default.

How do I query results without loading the whole graph?

Use scripts/query_ownership.py, which returns small, JSON-bounded slices for people, files, persons, files, co-change neighbors, summary sections, and communities.

All Files

8 files
references/neo4j-import.md2.4 KB
View
scripts/query_ownership.py17.6 KB
View
agents/openai.yaml0.2 KB
View
LICENSE.txt10.5 KB
View
scripts/build_ownership_map.py33.5 KB
View
scripts/community_maintainers.py17.7 KB
View
scripts/run_ownership_map.py5.8 KB
View
SKILL.md8.5 KB
View

Install security-ownership-map

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

openai/skills