security-ownership-map

Build a security ownership map from git history with networkx.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Mercurykz/Barretao- --skill security-ownership-map-mercurykz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-ownership-map
Source: https://github.com/Mercurykz/Barretao-/tree/main/.cursor/skills/security-ownership-map
Command: npx skills add https://github.com/Mercurykz/Barretao- --skill security-ownership-map-mercurykz

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Analyze git histories 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. Use cases include identifying orphaned sensitive code, CODEOWNERS reality checks for risk, and sensitive hotspots, grounded in actual commit history.

Core Features & Use Cases

  • Builds a bipartite graph of people and files from git history to compute ownership risk and store artifacts for graph databases.
  • Produces a file co-change graph to cluster files by how they move together, helping detect ownership drift.
  • Exports outputs in CSV/JSON formats compatible with Neo4j, Gephi, and other visualization tools; supports optional graphML and community detection.
  • Use case: security teams assess who touches sensitive code, identify lone maintainers, and surface potential CODEOWNERS gaps or risky hotspots.

Quick Start

Run the one-shot runner to generate the security ownership map for your repository.

Frequently Asked Questions about security-ownership-map

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

FAQPage Schema
How do I map security ownership and sensitive code hotspots from git history?

Mapping security ownership from git history requires building a bipartite people-to-file graph to compute ownership risk. This identifies who touches sensitive code and surfaces lone maintainers or orphaned hotspots grounded in actual commit contributions.

How does a co-change graph help detect code ownership drift?

A co-change graph clusters files by how they move together in commits, helping detect ownership drift. By analyzing historical movements, you visualize file communities and identify when patterns diverge from established CODEOWNERS rules.

Can I export git ownership analytics to Neo4j or Gephi for visualization?

Yes, you can export git ownership analytics to Neo4j or Gephi. The analysis produces CSV and JSON formats compatible with these graph databases and visualization tools, also supporting optional graphML output for external network visualization workflows.

Do I need Python and networkx to compute bus factor and ownership risk?

Yes, you need Python 3 and the networkx library to compute bus factor and ownership risk. The analysis relies on networkx to construct bipartite graphs and execute community detection algorithms required for security topology mapping.

What is the best way to perform a CODEOWNERS reality check for risk assessment?

The best way to perform a CODEOWNERS reality check is analyzing historical commit data to build a security ownership topology. This compares actual contribution patterns against declared CODEOWNERS, surfacing gaps, sensitive hotspots, and risky lone maintainers.

What are the limitations of using git commit history for sensitive code analysis?

Limitations of using git commit history for sensitive code analysis include reliance on commit metadata accuracy and inability to capture uncommitted local changes. Optional exclusion flags filter noise, but historical data alone cannot reflect real-time access controls or undocumented reviews.