security-ownership-map

Analyze git history to build security ownership graphs linking people to files.

5.0k|454|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/tech-leads-club/agent-skills --skill security-ownership-map
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-ownership-map
Source: https://github.com/tech-leads-club/agent-skills/tree/main/packages/skills-catalog/skills/%28security%29/security-ownership-map
Command: npx skills add https://github.com/tech-leads-club/agent-skills --skill security-ownership-map

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill analyzes the git history of a codebase to build a security ownership topology that links people to the files they touch, enabling governance visibility, risk assessment, and targeted security ownership.

Core Features & Use Cases

  • Build a bipartite graph of people and files from commit history.
  • Compute ownership risk metrics (bus factor, sensitive-touches) and export CSV/JSON artifacts for graph databases and visualization (Neo4j/Gephi).
  • Identify orphaned sensitive code and CODEOWNERS drift to surface governance gaps and risk hotspots.

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

Frequently Asked Questions about security-ownership-map

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

FAQPage Schema
How do I identify orphaned sensitive code and bus factor risks from git history?

You can identify orphaned sensitive code and bus factor risks by analyzing git history to build a security ownership topology. This maps people to the files they touch, surfacing ownership clusters and governance gaps for targeted risk assessment.

What is CODEOWNERS drift and how do I detect it in my repository?

CODEOWNERS drift occurs when actual file ownership from commit history diverges from defined CODEOWNERS rules. You detect it by analyzing git history to map real file contributions, then comparing these ownership clusters against the declared governance file.

Can I export git commit ownership graphs to Neo4j or Gephi?

Yes, you can export git commit ownership graphs to Neo4j or Gephi. The analysis generates CSV and JSON artifacts containing people-to-file bipartite graphs, which can be imported into graph databases or visualization tools for governance insights.

Do I need Python 3 and networkx to build a security ownership topology?

Yes, you need Python 3 to run the ownership topology analysis. The networkx library is required for community detection and GraphML output, while core graph generation and risk metric summaries function without it.

How do I compute sensitive-touches and ownership risk metrics for a codebase?

You compute sensitive-touches and ownership risk metrics by running an analysis script against your repository root. It evaluates commit history over a specified time window, linking contributors to sensitive files and outputting risk summaries.

What's the best way to map code ownership clusters from commit history?

The best way to map code ownership clusters is to build a bipartite graph from commit history linking developers to touched files. This approach reveals ownership concentration, highlights orphaned code, and exports structured graph data for visualization.