协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
git-forensics-scanner【开发与工程】Git diff forensics for surfacing and classifying code changes for trojan detection
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: git-forensics-scanner description: Git diff forensics for surfacing and classifying code changes for trojan detection allowed-tools:
Surfaces and classifies all code changes in a repository using git diff analysis, providing structured change sets for downstream semantic analysis.
The first phase of nation-state trojan detection: identify exactly what changed, how much changed, and classify each change by risk level. Small diffs in critical code paths are flagged as highest-risk since business-logic trojans typically modify 1-5 lines.
git diff)git diff --cached)git diff <base>..<head>)git diff <base>...<head>){
"type": "object",
"required": ["projectRoot"],
"properties": {
"projectRoot": {
"type": "string",
"description": "Absolute path to the git repository"
},
"scanMode": {
"type": "string",
"enum": ["uncommitted", "commit-range", "branch-diff"],
"default": "uncommitted"
},
"baseRef": {
"type": "string",
"description": "Base git reference (for commit-range/branch-diff)"
},
"headRef": {
"type": "string",
"description": "Head git reference (for commit-range/branch-diff)"
},
"targetPaths": {
"type": "array",
"items": { "type": "string" },
"description": "Limit scan to specific paths"
}
}
}
{
"type": "object",
"required": ["totalFiles", "files"],
"properties": {
"totalFiles": { "type": "number" },
"totalInsertions": { "type": "number" },
"totalDeletions": { "type": "number" },
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"insertions": { "type": "number" },
"deletions": { "type": "number" },
"hunks": { "type": "number" },
"classification": { "type": "string" },
"rawDiff": { "type": "string" },
"riskLevel": { "type": "string" }
}
}
}
}
}
skill: {
name: 'git-forensics-scanner',
context: {
projectRoot: '/path/to/project',
scanMode: 'uncommitted'
}
}
nation-state-trojan-detection.js — Phase 1: Git Forensics task