security-ownership-map

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

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/pchemguy/AISandbox --skill security-ownership-map-pchemguy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-ownership-map
Source: https://github.com/pchemguy/AISandbox/tree/main/docs/AgentSkills/openai/skills/skills/.curated/security-ownership-map
Command: npx skills add https://github.com/pchemguy/AISandbox --skill security-ownership-map-pchemguy

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 paths like auth, crypto, and secrets handling. This Skill analyzes git history to reveal hidden owners, orphaned sensitive code, and bus-factor risks that CODEOWNERS files alone cannot show. ## Core Features & Use Cases - Ownership Topology: Builds a bipartite people-to-file graph from git history with recency weighting, timezone detection, and sensitivity tagging for auth, crypto, and secrets paths. - Risk Detection: Computes bus factor per file, flags orphaned sensitive code (stale plus low bus factor), and identifies hidden owners controlling large shares of sensitive code. - Co-Change Clustering: Builds a file co-change graph using Jaccard similarity, detects communities with networkx, and reports maintainers per community over monthly or quarterly buckets. - Use Case: A security engineer runs the map against a repository, queries summary.json for orphaned_sensitive_code, and finds a TLS module untouched for over a year with a bus factor of one, then exports CSVs to Neo4j for visualization. ## Quick Start Ask the AI 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 ownership map build script against your repository, then query summary.json for bus_factor_hotspots and orphaned_sensitive_code sections. Files with bus factor at or below the threshold and stale last-touch dates are flagged automatically.

How to detect hidden owners of auth or crypto code?▼

The build script aggregates sensitivity-weighted touches per person per tag and reports anyone controlling more than the owner threshold (default 50 percent) of a category like auth or crypto in the hidden_owners section of summary.json.

What dependencies does the ownership map analysis require?▼

The scripts require Python 3 and the networkx package, which is mandatory because community detection is enabled by default. 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 designed for Neo4j LOAD CSV import, with ready-made Cypher statements in the references documentation. For Gephi, import the CSVs directly or use the optional GraphML output.

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

Lockfiles, .github paths, and editor configs are excluded by default because they act as glue files that create noisy clusters unrelated to actual code movement. Dependabot commits are also excluded by default, and both behaviors can be overridden with command-line flags.

How do I track maintainers of a code cluster over time?▼

Use the community_maintainers script with a file path or community id to get monthly or quarterly ranked maintainer lists. It supports recency weighting, rolling windows, minimum share thresholds, and bot filtering via regex.