security-ownership-map

Analyze git history to map security code ownership, bus factor, and co-change clusters.

Updated May 11, 2026
One-click install
npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill security-ownership-map-cloudofgeorge
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-ownership-map
Source: https://github.com/cloudofgeorge/AI-hands-Engineer/tree/main/skills/engineering/security/security-ownership-map
Command: npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill security-ownership-map-cloudofgeorge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires networkx, and includes scripts (resource) and references (resource) components.

What problem does it solve? Security teams often lack visibility into who actually maintains sensitive code (auth, crypto, secrets), which files have dangerously low bus factor, and where CODEOWNERS files have drifted from reality. This Skill mines git history to answer those questions with concrete data. ## Core Features & Use Cases - Ownership Graph Construction: Builds a bipartite people-to-files graph from git log, with recency weighting, timezone detection, and bot exclusion. - Security Risk Summaries: Flags orphaned sensitive code, hidden owners controlling large shares of auth/crypto code, and low bus-factor hotspots. - Co-Change Clustering: Computes file-to-file Jaccard similarity edges and community detection (via networkx) to reveal ownership clusters, ignoring noisy lockfile and CI commits. - Use Case: Run the build script against your repository, then query summary.json for orphaned sensitive code and compare the results against your CODEOWNERS file to find ownership drift before an audit. ## Quick Start Ask the agent to build a security ownership map for this repository and identify bus-factor risks in sensitive code.

Frequently Asked Questions about security-ownership-map

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find bus factor risks in sensitive code from git history?▼

Run the build script against your repository, then query summary.json for the bus_factor_hotspots and orphaned_sensitive_code sections. You can also filter files by tag, such as auth or crypto, with a maximum bus factor threshold using the query script.

How to detect who really owns auth or crypto code in a repository?▼

The tool parses git log to count touches per person per file and applies sensitivity rules matching paths like auth, crypto, and secrets. The hidden_owners summary section reports anyone controlling more than a configurable share of a sensitive category.

What dependencies are required to run git ownership analysis?▼

You need Python 3 and the networkx package, which is required for community detection and GraphML export. Install it with pip install networkx before running the build script.

Can I import the ownership graph into Neo4j or Gephi?▼

Yes, the build outputs people.csv, files.csv, edges.csv, and cochange_edges.csv formatted for Neo4j LOAD CSV import, with Cypher statements provided in the references. For Gephi, import the edge and node CSVs directly or use the optional GraphML output.

Why are lockfiles and bot commits excluded from co-change clustering?▼

Lockfiles, .github config, and Dependabot commits create noisy supernode edges that distort file clusters. The script excludes them by default so communities reflect real code movement, and you can override the exclusions with command-line flags.

What are the limitations of git-based ownership analysis?▼

Analysis only reflects committed history, so it misses code review participation and uncommitted work. Very large repositories may need time-window filters like --since to keep git log processing manageable, and squash-merged history can obscure original authorship.