security-ownership-map 是什么?
根据 Git 提交历史建立人员与文件关系,分析敏感代码的维护集中度、低 bus factor 和无人维护风险,并用共同修改图寻找文件群组。它输出 CSV/JSON 等关系数据,适合安全职责审查与CODEOWNERS对比。
中文说明由本站依据来源整理;英文原文保留在页面下方。
适合用在
- 要基于 Git 历史检查安全敏感代码维护集中度、低 bus factor、CODEOWNERS 偏差或敏感文件共同修改关系,并导出关系数据。
这些情况不适合
- 只想列出一般维护者或分析非安全类团队归属;来源明确限定为安全相关所有权分析。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
security-ownership-map,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 security-ownership-map
请在 Codex 的当前工作环境中安装并检查 security-ownership-map 这个 Skill。
项目身份:openai/skills / security-ownership-map
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/security-ownership-map/SKILL.md
已定位的源文件:skills/.curated/security-ownership-map/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 security-ownership-map
请在 Claude Code 的当前工作环境中安装并检查 security-ownership-map 这个 Skill。
项目身份:openai/skills / security-ownership-map
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/security-ownership-map/SKILL.md
已定位的源文件:skills/.curated/security-ownership-map/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 security-ownership-map
请在 Cursor Agent 的当前工作环境中安装并检查 security-ownership-map 这个 Skill。
项目身份:openai/skills / security-ownership-map
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/security-ownership-map/SKILL.md
已定位的源文件:skills/.curated/security-ownership-map/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 security-ownership-map
请在 当前 Agent 的当前工作环境中安装并检查 security-ownership-map 这个 Skill。
项目身份:openai/skills / security-ownership-map
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/security-ownership-map/SKILL.md
已定位的源文件:skills/.curated/security-ownership-map/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 完整或足够覆盖目标时间段的Git历史、Python3和networkx;明确仓库、时间窗口及敏感路径规则。
会得到什么
- people/files/edges等CSV、summary.json与共同修改关系;社区和GraphML等输出依实际参数。
实际使用顺序
- 选择仓库与时间范围,确定默认auth/crypto/secret标签是否适合项目,必要时提供敏感规则CSV。
- 运行附带run_ownership_map.py,核对作者/提交者、merge和机器人过滤;共同修改默认忽略锁文件和大型噪声提交。
- 用query_ownership.py读取有界结果,对照CODEOWNERS与真实团队职责解释敏感热点;需要可视化时再导入图数据库。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
教学示例:用 security-ownership-map 分析我指定仓库最近12个月的auth目录维护集中度。先确认历史是否完整,记录作者归属、机器人和merge过滤规则,用附带脚本输出到output/security-ownership;只报告低bus factor的候选和证据,不据提交数断定人员已经离职或不胜任。预期得到敏感文件的历史维护关系和需要团队确认的风险候选;本站未运行。
使用条件与边界
- 提交触及关系是维护职责的代理证据,不能证明当前在岗、实际知识水平或组织正式负责人。
- 源中的skills/skills脚本路径是示例,使用时须解析真实安装位置。
常见问题
bus factor低就代表没人维护吗?
不是。低bus factor表示所选历史和规则下贡献集中;无人维护还需结合最近变更、团队现状和正式责任确认。
为什么要排除锁文件和大提交?
这些文件常与许多功能一起变更,会把不相关代码连接成一个大群组,扭曲共同修改关系。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/.curated/security-ownership-map/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
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 non-security ownership questions.
查看源文件章节 / Source sections
- 原文:Security Ownership Map
- 原文:Overview
- 原文:Requirements
- 工作流程 / Workflow
- 快速开始 / Quick start
- 原文:Sensitivity rules
- 原文:Output artifacts
- 原文:LLM query helper
- 原文:Basic security queries
- 原文:Summary format (default)
- 原文:Graph persistence
- 注意事项 / Notes
原文:Overview
Build a bipartite graph of people and files from git history, then compute ownership risk and export graph artifacts for Neo4j/Gephi. Also build a file co-change graph (Jaccard similarity on shared commits) to cluster files by how they move together while ignoring large, noisy commits.
原文:Requirements
- Python 3 - `networkx` (required; community detection is enabled by default) Install with: ```bash pip install networkx ```
工作流程 / Workflow
1. Scope the repo and time window (optional `--since/--until`). 2. Decide sensitivity rules (use defaults or provide a CSV config). 3. Build the ownership map with `scripts/run_ownership_map.py` (co-change graph is on by default; use `--cochange-max-files` to ignore supernode commits). 4. Communities are computed by default; graphml output is optional (`--graphml`). 5. Query the outputs with `scripts/query_ownership.py` for bounded JSON slices. 6. Persist and visualize (see `references/neo4j-import.md`). By default, the co-change graph ignores common “glue” files (lockfiles, `.github/*`, editor config) so clusters reflect actual code movement instead of shared infra edits. Override with `--cochange-exclude` or `--no-default-cochange-excludes`. Dependabot commits are excluded by default; override with `--no-default-author-excludes` or add patterns via `--author-exclude-regex`. If you want to exclude Linux build glue like `Kbuild` from co-change clustering, pass: ```bash python skills/skills/security-ownership-map/scripts/run_ownership_map.py \ --repo /path/to/linux \ --out ownership-map-out \ --cochange-exclude "**/Kbuild" ```
快速开始 / Quick start
Run from the repo root: ```bash python skills/skills/security-ownership-map/scripts/run_ownership_map.py \ --repo . \ --out ownership-map-out \ --since "12 months ago" \ --emit-commits ``` Defaults: author identity, author date, and merge commits excluded. Use `--identity committer`, `--date-field committer`, or `--include-merges` if needed. Example (override co-change excludes): ```bash python skills/skills/security-ownership-map/scripts/run_ownership_map.py \ --repo . \ --out ownership-map-out \ --cochange-exclude "**/Cargo.lock" \ --cochange-exclude "**/.github/**" \ --no-default-cochange-excludes ``` Communities are computed by default. To disable: ```bash python skills/skills/security-ownership-map/scripts/run_ownership_map.py \ --repo . \ --out ownership-map-out \ --no-communities ```
原文:Sensitivity rules
By default, the script flags common auth/crypto/secret paths. Override by providing a CSV file: ``` # pattern,tag,weight **/auth/**,auth,1.0 **/crypto/**,crypto,1.0 **/*.pem,secrets,1.0 ``` Use it with `--sensitive-config path/to/sensitive.csv`.
原文:Output artifacts
`ownership-map-out/` contains: - `people.csv` (nodes: people) - `files.csv` (nodes: files) - `edges.csv` (edges: touches) - `cochange_edges.csv` (file-to-file co-change edges with Jaccard weight; omitted with `--no-cochange`) - `summary.json` (security ownership findings) - `commits.jsonl` (optional, if `--emit-commits`) - `communities.json` (computed by default from co-change edges when available; includes `maintainers` per community; disable with `--no-communities`) - `cochange.graph.json` (NetworkX node-link JSON with `community_id` + `community_maintainers`; falls back to `ownership.graph.json` if no co-change edges) - `ownership.graphml` / `cochange.graphml` (optional, if `--graphml`) `people.csv` includes timezone detection based on author commit offsets: `primary_tz_offset`, `primary_tz_minutes`, and `timezone_offsets`.
文件 SHA256:f06c1a59247569326702c945f397af163ea96cf2ecfdf2dde280605bf89a3ec8
仓库许可证记录:未提供;not-established,查看来源。
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 non-security ownership questions.
历史收录数据
| 来源仓库 | openai/skills |
|---|---|
| Skill源路径 | skills/.curated/security-ownership-map/SKILL.md |
安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。
