source-code-audit
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "source-code-audit" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-2b30642265b33916fca9df46a130b957bf83fb640d3c16c4dc3513dcc4949d10. Verify the upstream source and version against https://github.com/zhaji2333/CkSKILLS before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Invoke when source code, snippets, or decompiled artifacts are received to perform static auditing from entry points through propagation chains to dangerous sinks; supports quick lookup of dangerous functions across PHP/Java/Python/Node/Go and outputs suspicious call chains and defect trigger conditions.
Introduction source: third_party · zhaji2333 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: source-code-audit
description: 当拿到源码、代码片段、反编译产物,或用户要求代码审计时调用。负责输入点→传播链→危险函数Sink的静态审计,跨语言(PHP/Java/Python/Node/Go)危险函数速查,输出可疑调用链与缺陷触发条件。source-code-audit — 源码审计专项深度挖掘
何时调用(触发条件)
- 有源码(开源项目/泄露代码/反编译产物)
- 用户给代码片段要求审计
- 前端 source map 还原出完整源码
- APK 反编译后需要审计 Java/so 层
- 需要定位:拼接、反序列化、模板渲染、命令执行、文件操作、鉴权分支
一、静态审计方法(SAST)
核心思路
输入点 → 传播链 → 危险函数(Sink)
审计关注
- 拼接:SQL/命令/路径/模板
- 反序列化:unserialize/readObject/pickle
- 模板渲染:用户输入进入模板引擎
- 命令执行:exec/system/ProcessBuilder
- 文件操作:上传/下载/包含/删除
- 鉴权分支:哪些接口缺少权限校验
输出格式
- 可疑调用链(输入 → 传播 → Sink)
- 关键代码片段
- 缺陷触发条件(参数、前置校验)
二、危险函数速查(按语言)
PHP
eval / assert / system / exec / passthru / shell_exec / popen
include / require / file_get_contents / unserialize
preg_replace(e修饰符) / create_function / $$变量覆盖
Java
Runtime.exec / ProcessBuilder / readObject / XMLDecoder
SpEL / OGNL / MVEL / EL表达式
JNDI lookup / JdbcRowSetImpl / TemplatesImpl
Python
eval / exec / os.system / subprocess / pickle.loads
yaml.load(Loader=Loader) / __import__ / compile
Node.js
eval / Function() / child_process / vm.runInContext
__proto__ / constructor.prototype(原型污染)
Go
os/exec.Command / text/template(SSTI)
sql拼接 / 不安全的反序列化
三、鉴权审计要点
- 接口/路由是否有统一鉴权中间件
- 是否存在免鉴权路径(白名单/静态资源/回调)
- 角色判断是否可信(前端传角色 vs 服务端查库)
- 对象级校验:是否只校验登录不校验归属
- 管理接口与普通接口的权限边界
四、结合其他技能
审计发现的具体漏洞类型转对应技能深化:
- 注入点 →
injection-vulns - 反序列化 →
deserialization-xxe - 文件操作 →
file-handling - 鉴权缺陷 →
auth-access-control - 加密/签名算法 →
auth-access-control
五、输出与报告要点
- 每个漏洞:输入点 / 传播链 / Sink / 缺失的校验
- 附代码片段与触发条件
- 可利用性评估(前置条件、影响面)
- 修复方案(代码级)
Version history
-
v2.1.0
GitHub ↗
Original release notes
## 一句话 新增 **`kb/` 结构化数据层**(664 CVE / 237 字典 / 69 载荷)与 **内网/域技能包 `internal-network`**(10 块),`cloud-infra` 扩充 10 块;全局路由、纪律、索引同步接线,并修掉 7 个超限知识块与存量死链。 ## 新增 - **数据层 `kb/`**:`vuln/` 664 条 CVE(ai/cloud/middleware/network/web)、`dict/` 237 个字典(368 万行)、`payload/` 69 个载荷;4 个自动索引 + `tools/kb_index.py`(`--check` 做一致性闸,不参与默认加载) - **`internal-network`(内网/域)**:域侦察与决策树、Kerberos、委派/ACL/ADCS、凭据/中继/投毒、横向移动、隧道多跳、后渗透提权、持久化、内网基础设施(Exchange/SCCM/OA/DB/中间件)、工具投递 - **`kb-security-data`**:CVE / 字典 / payload 检索入口(30 秒分诊 + 证据纪律) - **`cloud-infra` +10 块**:多云概览、AWS IAM 提权、Azure/GCP、国内云、云凭据/IAM/元数据、K8s 逃逸与集群、K8s 组件/网络/存储、容器运行时、对象存储/Serverless、CI-CD/供应链/IaC - **战法索引-08-内网与域**(22 行首枪表)、`rules/55-kb-usage.md`、`templates/SEEDS.template.md` - **`docs/CHANGELOG.md`**:v2.1 完整更新记录 ## 变更 - `AGENTS.md`(10 秒决策 + 文件地图)、`rules/70`、`docs/TRIGGER-MATRIX.md`、`ck-router`(分诊/索引/进站决策)、`README.md`、`docs/ARCHITECTURE.md`(六层结构)全部接线 - 技能包 16 → **18**,知识块 **501**,规则 11 → **12** ## 修复 - 7 个超过 12KB 的知识块按「索引 + 分段」拆分(原文件名保留,新增 `-b` 分段) - 存量死链、kb 相对路径、索引兜底计数、CTF 导向表述清理 ## 验收 - 单块 ≤12KB:0 超限;SKILL.md 全部达标;死链 0 - `python3 tools/kb_index.py --check` → OK(664 / 237 / 69) - 常驻层 `AGENTS.md` 5.4KB(限 6.5KB) ## 升级方式 更新仓库后运行 `python3 tools/kb_index.py --check` 确认索引一致;用法见 `docs/CHANGELOG.md` 第 5 节与 `README.md`「数据层 kb/」小节。
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的输入点→传播链→危险函数 Sink 的静态审计方法论
- 支持 PHP/Java/Python/Node/Go 多语言危险函数速查,覆盖主流漏洞类型
- 明确与其他专项技能(injection-vulns/deserialization-xxe 等)的联动机制
Highlights
- 触发条件覆盖源码、反编译产物、source map 还原等多种实际场景
- 边界清晰,不易误触或漏触
Highlights
- Phase 划分清晰,从审计方法到输出报告形成完整闭环
- frontmatter 完整,文档长度适中(约 480 行)
Highlights
- 基于行业标准 SAST 方法论,参数定义准确
- 输出要求包含可利用性评估与代码级修复方案,具备确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Invoke commands or scripts
Read the script and arguments first. Use ordinary privileges and a scoped directory; confirm installation or execution in your host tool.
Mentioned in main document · lines 60
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.