aig-skill-scan 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. aig_skill_scan-0.1.0.dist-info/METADATA +218 -0
  2. aig_skill_scan-0.1.0.dist-info/RECORD +58 -0
  3. aig_skill_scan-0.1.0.dist-info/WHEEL +5 -0
  4. aig_skill_scan-0.1.0.dist-info/entry_points.txt +2 -0
  5. aig_skill_scan-0.1.0.dist-info/licenses/LICENSE +202 -0
  6. aig_skill_scan-0.1.0.dist-info/licenses/NOTICE +13 -0
  7. aig_skill_scan-0.1.0.dist-info/top_level.txt +1 -0
  8. skill_scan/__init__.py +14 -0
  9. skill_scan/__main__.py +6 -0
  10. skill_scan/agent/__init__.py +0 -0
  11. skill_scan/agent/agent.py +495 -0
  12. skill_scan/agent/base_agent.py +425 -0
  13. skill_scan/main.py +200 -0
  14. skill_scan/prompt/agents/code_audit.md +114 -0
  15. skill_scan/prompt/agents/project_summary.md +48 -0
  16. skill_scan/prompt/agents/vuln_review.md +147 -0
  17. skill_scan/prompt/compact.md +69 -0
  18. skill_scan/prompt/format_report.md +13 -0
  19. skill_scan/prompt/next_prompt.md +1 -0
  20. skill_scan/prompt/system_prompt.md +61 -0
  21. skill_scan/py.typed +0 -0
  22. skill_scan/tools/__init__.py +9 -0
  23. skill_scan/tools/base64_decode/__init__.py +0 -0
  24. skill_scan/tools/base64_decode/base64_decode_actions.py +76 -0
  25. skill_scan/tools/base64_decode/base64_decode_actions_schema.xml +22 -0
  26. skill_scan/tools/dir/__init__.py +0 -0
  27. skill_scan/tools/dir/dir_actions.py +86 -0
  28. skill_scan/tools/dir/dir_actions_schema.xml +34 -0
  29. skill_scan/tools/dispatcher.py +80 -0
  30. skill_scan/tools/file/__init__.py +5 -0
  31. skill_scan/tools/file/read_file.py +181 -0
  32. skill_scan/tools/file/read_file_schema.xml +63 -0
  33. skill_scan/tools/file/write_file.py +52 -0
  34. skill_scan/tools/finish/__init__.py +4 -0
  35. skill_scan/tools/finish/finish_actions.py +17 -0
  36. skill_scan/tools/finish/finish_actions_schema.xml +11 -0
  37. skill_scan/tools/grep/__init__.py +0 -0
  38. skill_scan/tools/grep/grep_actions.py +107 -0
  39. skill_scan/tools/grep/grep_actions_schema.xml +56 -0
  40. skill_scan/tools/ls/__init__.py +0 -0
  41. skill_scan/tools/ls/ls_actions.py +78 -0
  42. skill_scan/tools/ls/ls_actions_schema.xml +31 -0
  43. skill_scan/tools/registry.py +160 -0
  44. skill_scan/tools/thinking/__init__.py +4 -0
  45. skill_scan/tools/thinking/thinking_actions.py +55 -0
  46. skill_scan/tools/thinking/thinking_actions_schema.xml +85 -0
  47. skill_scan/utils/__init__.py +0 -0
  48. skill_scan/utils/aig_logger.py +107 -0
  49. skill_scan/utils/config.py +77 -0
  50. skill_scan/utils/extract_vuln.py +104 -0
  51. skill_scan/utils/llm.py +112 -0
  52. skill_scan/utils/llm_manager.py +133 -0
  53. skill_scan/utils/loging.py +31 -0
  54. skill_scan/utils/parse.py +237 -0
  55. skill_scan/utils/pre_scan.py +150 -0
  56. skill_scan/utils/project_analyzer.py +119 -0
  57. skill_scan/utils/prompt_manager.py +61 -0
  58. skill_scan/utils/tool_context.py +77 -0
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.4
2
+ Name: aig-skill-scan
3
+ Version: 0.1.0
4
+ Summary: AI Native Agent Skill 安全审计工具 —— LLM 驱动的多阶段代码审计与漏洞复审流水线
5
+ Author-email: Tencent Zhuque Lab <ai-infra-guard@tencent.com>
6
+ Maintainer: Tencent Zhuque Lab
7
+ License: Apache-2.0
8
+ Project-URL: Homepage, https://github.com/Tencent/AI-Infra-Guard
9
+ Project-URL: Repository, https://github.com/Tencent/AI-Infra-Guard
10
+ Project-URL: Documentation, https://github.com/Tencent/AI-Infra-Guard/tree/main/skill-scan
11
+ Project-URL: Bug Tracker, https://github.com/Tencent/AI-Infra-Guard/issues
12
+ Project-URL: Source Code, https://github.com/Tencent/AI-Infra-Guard/tree/main/skill-scan
13
+ Keywords: ai-security,agent-security,skill-scan,red-team,llm,audit,vulnerability,ai-infra-guard
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Information Technology
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: Implementation :: CPython
24
+ Classifier: Topic :: Security
25
+ Classifier: Topic :: Software Development :: Quality Assurance
26
+ Classifier: Typing :: Typed
27
+ Requires-Python: >=3.12
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ License-File: NOTICE
31
+ Requires-Dist: loguru==0.7.3
32
+ Requires-Dist: openai==2.8.1
33
+ Requires-Dist: pydantic==2.12.4
34
+ Requires-Dist: python-dotenv==1.0.0
35
+ Provides-Extra: dev
36
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
37
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
38
+ Requires-Dist: ruff>=0.11.5; extra == "dev"
39
+ Requires-Dist: build>=1.2; extra == "dev"
40
+ Requires-Dist: twine>=5.0; extra == "dev"
41
+ Dynamic: license-file
42
+
43
+ # Skill-Scan
44
+
45
+ > AI Native Agent Skill 安全审计工具 —— LLM 驱动的多阶段代码审计与漏洞复审流水线。
46
+
47
+ `skill-scan` 是 [Tencent AI-Infra-Guard](https://github.com/Tencent/AI-Infra-Guard) 的子项目,专门用于对 AI Agent Skill 项目(如 WorkBuddy Skill、Coze 插件、Dify 工具等)进行静态安全审计。它通过三阶段流水线对 Skill 代码进行 LLM 驱动的深度分析:
48
+
49
+ 1. **Info Collection** —— 项目结构、语言、入口点识别
50
+ 2. **Code Audit** —— 多技能并行审计(数据泄露、工具滥用、间接注入、越权等)
51
+ 3. **Vulnerability Review** —— 漏洞去重、误报过滤、严重度评分、报告生成
52
+
53
+ 漏洞分类对齐 [SkillTrustBench](https://github.com/Tencent/AI-Infra-Guard) T01–T09 分类法,判定标准:`malicious`(明确攻击意图)/ `suspicious`(有漏洞但无明确攻击意图)/ `normal`(良性)。
54
+
55
+ ---
56
+
57
+ ## 安装
58
+
59
+ ```bash
60
+ # 从 PyPI 安装
61
+ pip install aig-skill-scan
62
+
63
+ # 或从源码安装(开发态)
64
+ git clone https://github.com/Tencent/AI-Infra-Guard.git
65
+ cd AI-Infra-Guard/skill-scan
66
+ pip install -e .
67
+ ```
68
+
69
+ 要求 Python ≥ 3.12。
70
+
71
+ ---
72
+
73
+ ## 快速开始
74
+
75
+ ### 命令行
76
+
77
+ ```bash
78
+ # 扫描一个本地 Skill 项目目录
79
+ skill-scan --repo /path/to/your/skill \
80
+ -m deepseek/deepseek-v3.2-exp \
81
+ -k $OPENROUTER_API_KEY \
82
+ -u https://openrouter.ai/api/v1 \
83
+ --language zh
84
+
85
+ # 也可以用模块方式调用
86
+ python -m skill_scan --repo /path/to/your/skill -k $OPENROUTER_API_KEY
87
+ ```
88
+
89
+ 完整参数:
90
+
91
+ ```
92
+ skill-scan --help
93
+ ```
94
+
95
+ | 参数 | 说明 | 默认值 |
96
+ | --- | --- | --- |
97
+ | `--repo` | 要扫描的 Skill 项目文件夹路径(必填) | — |
98
+ | `-m, --model` | LLM 模型名称 | `deepseek/deepseek-v3.2-exp` |
99
+ | `-k, --api_key` | API Key(不传则从环境变量读取) | — |
100
+ | `-u, --base_url` | API 基础 URL | `https://openrouter.ai/api/v1` |
101
+ | `-p, --prompt` | 自定义扫描提示词(可选) | — |
102
+ | `--language` | 输出语言:`zh` / `en` | `zh` |
103
+ | `--debug` | 启用 debug 模式 | `false` |
104
+
105
+ ### 程序化调用
106
+
107
+ ```python
108
+ import asyncio
109
+ from skill_scan.agent.agent import Agent
110
+ from skill_scan.utils.llm import LLM
111
+ from skill_scan.utils.llm_manager import LLMManager
112
+
113
+ async def run():
114
+ llm = LLM(model="deepseek/deepseek-v3.2-exp",
115
+ api_key="sk-...",
116
+ base_url="https://openrouter.ai/api/v1",
117
+ context_window=128_000)
118
+ mgr = LLMManager(api_key="sk-...", base_url="https://openrouter.ai/api/v1")
119
+ specialized = mgr.get_specialized_llms(["thinking", "coding"])
120
+
121
+ agent = Agent(llm=llm, specialized_llms=specialized,
122
+ debug=False, language="zh")
123
+ result = await agent.scan("/path/to/your/skill", "", "zh")
124
+ print(result)
125
+
126
+ asyncio.run(run())
127
+ ```
128
+
129
+ ---
130
+
131
+ ## 配置
132
+
133
+ 所有配置通过环境变量或 `.env` 文件注入。`skill-scan` 会按以下顺序查找 `.env`:
134
+
135
+ 1. 包根目录(`site-packages/skill_scan/.env`,安装态一般不用)
136
+ 2. 当前工作目录(`./.env`,推荐)
137
+
138
+ 主要环境变量:
139
+
140
+ | 变量 | 说明 | 默认值 |
141
+ | --- | --- | --- |
142
+ | `OPENROUTER_API_KEY` / `LLM_API_KEY` / `OPENAI_API_KEY` | LLM API Key | — |
143
+ | `LLM_MODEL` / `OPENAI_MODEL` | 默认模型 | `deepseek/deepseek-v3.2-exp` |
144
+ | `LLM_BASE_URL` / `OPENAI_BASE_URL` | 默认 Base URL | `https://openrouter.ai/api/v1` |
145
+ | `DEFAULT_MODEL_CONTEXT_WINDOW` | 主模型上下文窗口 | `128000` |
146
+ | `THINKING_MODEL` / `CODING_MODEL` / `FAST_MODEL` | 专用模型 | gemini-2.5-pro / claude-sonnet-4.5 / gemini-2.0-flash-exp |
147
+ | `LOG_LEVEL` | 日志级别 | `INFO` |
148
+
149
+ ---
150
+
151
+ ## 架构
152
+
153
+ ```
154
+ skill_scan/
155
+ ├── agent/ # 三阶段 ScanPipeline 编排
156
+ │ ├── agent.py # Agent 主类,调度 Info→Audit→Review
157
+ │ └── base_agent.py # LLM 循环 + 工具调用基类
158
+ ├── tools/ # XML-schema 工具注册表
159
+ │ ├── registry.py # @register_tool 装饰器
160
+ │ ├── dispatcher.py # ToolDispatcher,工具调用分发
161
+ │ ├── file/ ls/ grep/ dir/ base64_decode/ thinking/ finish/
162
+ │ └── *_schema.xml # 工具的 XML schema(给 LLM 看)
163
+ ├── utils/
164
+ │ ├── llm.py # OpenAI 兼容客户端
165
+ │ ├── llm_manager.py # 多角色 LLM 管理(thinking/coding/fast)
166
+ │ ├── prompt_manager.py# prompt 模板加载(从 skill_scan/prompt/)
167
+ │ ├── extract_vuln.py # <vuln> XML 提取与解析
168
+ │ ├── project_analyzer.py # 语言识别 + calc_skill_score
169
+ │ └── pre_scan.py # 预扫描,生成项目概要
170
+ ├── prompt/ # 打包的 prompt 模板
171
+ │ ├── system_prompt.md
172
+ │ ├── compact.md next_prompt.md format_report.md
173
+ │ └── agents/ # 各阶段专用 prompt
174
+ └── main.py # CLI 入口(cli / main / parse_args)
175
+ ```
176
+
177
+ ---
178
+
179
+ ## 漏洞评分
180
+
181
+ `calc_skill_score` 对齐 mcp-scan 的 `calc_mcp_score`:
182
+
183
+ | 严重度 | 扣分 |
184
+ | --- | --- |
185
+ | Critical | -100 |
186
+ | High | -40 |
187
+ | Medium | -25 |
188
+ | Low / Info | -10 |
189
+
190
+ 最终 skill 分数 = `max(0, 100 - Σ扣分)`。
191
+
192
+ ---
193
+
194
+ ## 开发
195
+
196
+ ```bash
197
+ # 安装开发依赖
198
+ pip install -e ".[dev]"
199
+
200
+ # lint / format
201
+ ruff check skill_scan
202
+ ruff format skill_scan
203
+
204
+ # 本地构建
205
+ python -m build
206
+
207
+ # 本地安装测试
208
+ pip install dist/skill_scan-0.1.0-py3-none-any.whl
209
+ skill-scan --help
210
+ ```
211
+
212
+ ---
213
+
214
+ ## License
215
+
216
+ Apache License 2.0。任何再分发或衍生作品必须在文档或界面中明确标注
217
+ "Based on Tencent Zhuque Lab AI-Infra-Guard" 并附上原仓库链接
218
+ <https://github.com/Tencent/AI-Infra-Guard>,详见 [NOTICE](./NOTICE)。
@@ -0,0 +1,58 @@
1
+ aig_skill_scan-0.1.0.dist-info/licenses/LICENSE,sha256=53s0v3mu3nStI9P-m1S_0k5Cj99w4TWdLoRpZswI8Tg,11362
2
+ aig_skill_scan-0.1.0.dist-info/licenses/NOTICE,sha256=vgx16M-uBhRrk-fed_IecsSlCoucoPVJbYx14v_M1Xc,618
3
+ skill_scan/__init__.py,sha256=pl7q7hNfGE2GRO5zJfbG1JNSWvNi3vUlzJ6GhNfe484,420
4
+ skill_scan/__main__.py,sha256=sY9Fq9Rs6nljWcDUj651aLTrv1yfBlI6bRk-XObInIk,119
5
+ skill_scan/main.py,sha256=MU5v1m9h3IxoRYCVgRVm5J6BlM6gkRMXvALnCYi0ldY,6260
6
+ skill_scan/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ skill_scan/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ skill_scan/agent/agent.py,sha256=qDS6NeU19Dw1Dt7LDY75gKwphsY-O7BISVwqQw8m-tA,20646
9
+ skill_scan/agent/base_agent.py,sha256=Td-PeJWekyXut6rbLm6s9uabgBn2rtsova3DLG5f_kI,17600
10
+ skill_scan/prompt/compact.md,sha256=ywwASqTe9XJsm9ad6s-sCtD6ofDInMr0mW4z0K6But8,1757
11
+ skill_scan/prompt/format_report.md,sha256=tcO6Cg0vDuqm4AewUvLJtXbEuqriOON20ikR5sgtoHE,425
12
+ skill_scan/prompt/next_prompt.md,sha256=ROeqeD9O5vCQV-dZrlkRYDqnTNJFD-KasX2v410u4NE,185
13
+ skill_scan/prompt/system_prompt.md,sha256=YM18BedhIaYGXWEWeskx9wG8Y0zOxtHlu8ZGEVGLqMY,4881
14
+ skill_scan/prompt/agents/code_audit.md,sha256=S_MWAmHSDDy8ecBsXuJLGvgPzSBsFzCfgIXCgTDUvn4,9042
15
+ skill_scan/prompt/agents/project_summary.md,sha256=tV6GN4Hvf0FPH-5dLe7IzX-feWN4y5PiyCg7iz2JZBE,3115
16
+ skill_scan/prompt/agents/vuln_review.md,sha256=hbxbe9CrUNbXV8d6lh3HQGnuP2oWh6QbnT1oXTBI7sQ,6070
17
+ skill_scan/tools/__init__.py,sha256=TJg2Q8cxCy1eKxN1cAiQEA3jd0UxIl1jZMdM-588mxs,483
18
+ skill_scan/tools/dispatcher.py,sha256=vdSph1tUJ-alB9f74LCj1YpRWGkI-EaDwPHDlatXhvU,2657
19
+ skill_scan/tools/registry.py,sha256=sdg3sweAXVCAhgRJL92rpbTeCq75mB4SnIV7f4R_MnA,4833
20
+ skill_scan/tools/base64_decode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ skill_scan/tools/base64_decode/base64_decode_actions.py,sha256=0TYOMy9bKgQ3dtpAZ9K_XPDCyLRKZ5rVdPJjo5DnlKw,2614
22
+ skill_scan/tools/base64_decode/base64_decode_actions_schema.xml,sha256=MghZwZsbTJFkRu_VvfpVe_RVE-_AGPkoztxtELZPm00,873
23
+ skill_scan/tools/dir/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ skill_scan/tools/dir/dir_actions.py,sha256=t5xZqud3mBiUC0xJ9FPURn1PqRtEOIq93S1IU4QcxgI,2902
25
+ skill_scan/tools/dir/dir_actions_schema.xml,sha256=wtt7_jUiI4yXB0VyDhDbWvi7kro38JbfNFE6dprhvIA,1240
26
+ skill_scan/tools/file/__init__.py,sha256=fDcNlTbX0Nag981_mCZpKs2T5PsFukb3tjC4eXQDQ9M,5
27
+ skill_scan/tools/file/read_file.py,sha256=IswnDrFB5hIRIen7SXjQgY_4KvY0MBrPOOipO2Hf3eM,6563
28
+ skill_scan/tools/file/read_file_schema.xml,sha256=dXAqgCJayFot25xIhGo16Qyd5kHyG3MxPcAHQQ3_H3Y,3307
29
+ skill_scan/tools/file/write_file.py,sha256=HWka_8dUHvdYJDR5URRO7awFhKmXCmg1OYu14VJe5dI,1605
30
+ skill_scan/tools/finish/__init__.py,sha256=UBUYDbo1uQKOzCUuhRkYz4tDnUC43H4iMjMJGFlsckI,58
31
+ skill_scan/tools/finish/finish_actions.py,sha256=JNBXjARD0Hztw_AXYyfBQ8NASLlBx8HVqyNR7Zh-vJg,532
32
+ skill_scan/tools/finish/finish_actions_schema.xml,sha256=K7RqIxcW0Hboi6mTw6AUjvvJZi1ObOUa-FIbc4WvZFs,556
33
+ skill_scan/tools/grep/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
+ skill_scan/tools/grep/grep_actions.py,sha256=KsuvSuB22Sdz2RGeaIST2wc8XV8whzN387gUcobQtVM,3975
35
+ skill_scan/tools/grep/grep_actions_schema.xml,sha256=0rMEf2aK-lytDw1GOeuv_GrQKX-jrvTJ45bON7giD98,2253
36
+ skill_scan/tools/ls/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ skill_scan/tools/ls/ls_actions.py,sha256=KD_W0UvjtIL0eJ4Js1UDJnjzntZXyIbQC3Zk_1NhyJ4,2598
38
+ skill_scan/tools/ls/ls_actions_schema.xml,sha256=ybT8PY_bCkghqKiAoO3tGlXqSsVlsg-MQbgN6QqOS2c,1132
39
+ skill_scan/tools/thinking/__init__.py,sha256=-v4fG4fyFkqsTSWspDtCT6IRlyRM8zeUwEM-kscaxDE,58
40
+ skill_scan/tools/thinking/thinking_actions.py,sha256=nFrieTb7Jzb5iD6h-VVEYlhNipQ23H5Yt6XRxRAo9dU,2248
41
+ skill_scan/tools/thinking/thinking_actions_schema.xml,sha256=bh-DUYK3UAMLS_U9xHUFW9f3ZbQPSxHAhK_teg3TcoA,3902
42
+ skill_scan/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ skill_scan/utils/aig_logger.py,sha256=Tidmf92l3tLqILeACiIJx9ranpd7puvTag6avXdVj6g,3323
44
+ skill_scan/utils/config.py,sha256=TEQk54ELW9flDT7BAZUhpwMiUB8ZAOhG-4_RGcseA0Q,2940
45
+ skill_scan/utils/extract_vuln.py,sha256=LRdVU0XahcjFvfrNcKV4TR6uk2hdoPBVN6K9nUJov6w,3582
46
+ skill_scan/utils/llm.py,sha256=TTBWWOaJY4A7mWK6JE-V8g3ZtVhQOMnWzM7smrNiugE,3540
47
+ skill_scan/utils/llm_manager.py,sha256=xQz1HH_sZWat6Cux_Agn2i4atY8Z7ENRSyhzTHZWPd8,4943
48
+ skill_scan/utils/loging.py,sha256=Y3vsq6CnNBVvuxf-oQXItvZmRn5IfVB-pXrajk2sFR0,953
49
+ skill_scan/utils/parse.py,sha256=OdAHEJr4fDYJ1ViTKAYXJ9uGau-loVMTXqjKlF4AJyg,12503
50
+ skill_scan/utils/pre_scan.py,sha256=8MIi-mEzmFesctt6R9k3tGKeNNE9Ttvox-YQ2BijmHw,6620
51
+ skill_scan/utils/project_analyzer.py,sha256=iOyxGrtCIx6r0u9lmDBjKvyi--tCdoT8TfrwFXPhTXk,3517
52
+ skill_scan/utils/prompt_manager.py,sha256=UGn9EsndBJU1-0iYzhyR9_JYPbSp_oEfkVcC5z0u2vA,2184
53
+ skill_scan/utils/tool_context.py,sha256=zRPV0ynJsonkxnzHYc0iyDyJSEuYJjR4OHVHCWRaEE4,2702
54
+ aig_skill_scan-0.1.0.dist-info/METADATA,sha256=xfa-cpr0uSi1uP8PDJTtAEZKAZZ7_fHerjZHhX8866w,7584
55
+ aig_skill_scan-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
56
+ aig_skill_scan-0.1.0.dist-info/entry_points.txt,sha256=5E33nZ_mjwMtJ93O0QmT3cVawwYou5a7IfSmV-xvbco,51
57
+ aig_skill_scan-0.1.0.dist-info/top_level.txt,sha256=5FoJxS3adp20DKZQKhcRxVWUQj94olmZJUqSnrIwI44,11
58
+ aig_skill_scan-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ skill-scan = skill_scan.main:cli
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the
44
+ purposes of this License, Derivative Works shall not include works
45
+ that remain separable from, or merely link (or bind by name) to the
46
+ interfaces of, the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean, as used in this License, any work of
49
+ authorship, including the original version of the Work and any
50
+ modifications or additions to that Work or Derivative Works of the
51
+ Work, that is intentionally submitted to the Licensor for inclusion
52
+ in the Work by the copyright owner or by an individual or Legal
53
+ Entity authorized to submit on behalf of the copyright owner. For
54
+ the purposes of this definition, "submitted" means any form of
55
+ electronic, verbal, or written communication sent to the Licensor or
56
+ its representatives, including but not limited to communication on
57
+ electronic mailing lists, source code control systems, and issue
58
+ tracking systems that are managed by, or on behalf of, the Licensor
59
+ for the purpose of discussing and improving the Work, but excluding
60
+ communication that is conspicuously marked or otherwise designated
61
+ in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by the Licensor
65
+ and subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have
78
+ made, use, offer to sell, sell, import, and otherwise transfer the
79
+ Work, where such license applies only to those patent claims
80
+ licensable by such Contributor that are necessarily infringed by
81
+ their Contribution(s) alone or by combination of their
82
+ Contribution(s) with the Work to which such Contribution(s) was
83
+ submitted. If You institute patent litigation against any entity
84
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
85
+ the Work or a Contribution incorporated within the Work constitutes
86
+ direct or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate as
88
+ of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the Work
91
+ or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You meet
93
+ the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or Derivative
96
+ Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work, excluding
104
+ those notices that do not pertain to any part of the Derivative
105
+ Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one of
112
+ the following places: within a NOTICE text file distributed as
113
+ part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and do
118
+ not modify the License. You may add Your own attribution notices
119
+ within Derivative Works that You distribute, alongside or as an
120
+ addendum to the NOTICE text from the Work, provided that such
121
+ additional attribution notices cannot be construed as modifying
122
+ the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions for
126
+ use, reproduction, or distribution of Your modifications, or for
127
+ such Derivative Works as a whole, provided Your use, reproduction,
128
+ and distribution of the Work otherwise complies with the conditions
129
+ stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this
153
+ License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all other
164
+ commercial damages or losses), even if such Contributor has been
165
+ advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer, and
169
+ charge a fee for, acceptance of support, warranty, indemnity, or
170
+ other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf of
173
+ any other Contributor, and only if You agree to indemnify, defend,
174
+ and hold each Contributor harmless for any liability incurred by, or
175
+ claims asserted against, such Contributor by reason of your
176
+ accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the format of the file. We also recommend that
187
+ a file and directory name be included on the same line as the
188
+ "Copyright" statement for easier location by automated tools.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,13 @@
1
+ Tencent AI-Infra-Guard
2
+ Copyright 2024-2026 Tencent Zhuque Lab
3
+
4
+ This product includes software developed at
5
+ Tencent Zhuque Lab (https://github.com/Tencent/AI-Infra-Guard).
6
+
7
+ Mandatory Attribution Requirement (per Apache License 2.0, Section 4(d)):
8
+ Any redistribution, integration, or derivative work — whether open-source or commercial —
9
+ that incorporates, modifies, or is based on this project must:
10
+
11
+ 1. Clearly state "Based on Tencent Zhuque Lab AI-Infra-Guard" in the product documentation,
12
+ About page, or release notes.
13
+ 2. Include a link to the original repository: https://github.com/Tencent/AI-Infra-Guard.
@@ -0,0 +1 @@
1
+ skill_scan
skill_scan/__init__.py ADDED
@@ -0,0 +1,14 @@
1
+ """Skill-Scan - AI Native Agent Skill 安全审计工具。
2
+
3
+ 一个面向 AI Agent Skill 项目的多阶段安全审计工具,通过 LLM 驱动的
4
+ 代码审计 + 漏洞复审流水线,对 Skill 项目进行静态安全分析。
5
+
6
+ 公开 API:
7
+ from skill_scan.agent.agent import Agent
8
+ from skill_scan.utils.llm import LLM
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ __version__ = "0.1.0"
14
+ __all__ = ["__version__"]
skill_scan/__main__.py ADDED
@@ -0,0 +1,6 @@
1
+ """支持 ``python -m skill_scan`` 运行。"""
2
+
3
+ from skill_scan.main import cli
4
+
5
+ if __name__ == "__main__":
6
+ cli()
File without changes