aladin-secure-forge
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 "aladin-secure-forge" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-09c72bd3ece22087db9010a0a691215e192b247f1466db79a4029c7868dcd75e. Verify the upstream source and version against https://skillhub.cn/skills/user_d18c97ea/aladin-secure-forge before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Aladin's code security audit workshop skill designed to provide a local toolchain covering key areas: pre-commit secret scanning, post-deploy injection detection, dependency and license risk, and performance anti-pattern detection, with HTML/MD/JSON reporting, CI gating, and repair linkage to aladin-code-pilot. Descriptions cover secret/credential scanning, OWASP injection/XSS/SSRF/path traversal/unsafe deserialization/weak crypto detection, dependency and license risk (SBOM), performance anti-patterns (e.g. N+1/blocking I/O), multi-language coverage, reporting formats, and CI integration.
Introduction source: third_party · user_d18c97ea · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- "$PY" $SK/scripts/secure_scan.py scan --path ./src --out secrets.json --min-severity high
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- "$PY" $SK/scripts/secure_deps.py parse --path ./my-project --out deps.json
- Testing
- Not tested
Browse files
Frontmatter
name: aladin-secure-forge
slug: aladin-secure-forge
version: 1.0.0
displayName: 阿拉丁·代码安全审计工坊|密钥扫描·OWASP漏洞检测·依赖许可证风险·性能反模式·CI门禁
summary: 阿拉丁出品的代码安全审计工坊:把"提交前漏扫密钥、上线后爆注入漏洞、依赖里藏 GPL 雷、N+1 拖垮性能"这些隐患,从「靠运气 / 等 SAST 平台 / 付费扫描」变成一条纯本地工具链——密钥/凭证泄露扫描 + OWASP 注入/XSS/SSRF/路径穿越/不安全反序列化/弱加密检测 + 依赖与许可证风险(SBOM) + 性能反模式(N+1/阻塞IO) + 多语言 + HTML/MD/JSON 报告 + CI 门禁,并联动 aladin-code-pilot 把高危项转修复任务。比 skillhub 飙升的 scan-codes(单点扫描) 多出密钥+SAST+依赖许可证+性能四维、CWE 映射、CI 门禁与修复联动。
description: 阿拉丁·代码安全审计工坊把"代码安全"工程化:①密钥/凭证泄露扫描——AWS Key/私钥/Bearer/赋值式密码/高熵字符串,带误报过滤;②OWASP SAST——SQL 注入/命令注入/XSS/SSRF/路径穿越/不安全反序列化/弱加密,附 CWE 编号与修复示例;③依赖与供应链风险——解析 package.json/requirements.txt/go.mod/pom.xml,做许可证传染性分级(SBOM) + 离线 CVE 公告匹配 + 弃用标记;④性能反模式——N+1 查询/异步阻塞 IO/灾难性正则;⑤多语言(Python/JS/TS/Java/Go 等)纯正则单遍扫描,零依赖;⑥三种报告——自包含 HTML 看板 + Markdown 摘要 + 机器可读 JSON;⑦CI 门禁——按严重度阈值非零退出,直接卡流水线;⑧修复联动——生成 fix-tasks.md 交给 aladin-code-pilot 一键修。相比 skillhub 飙升的 scan-codes 只做单点扫描、code-reviewer 只做评审,本技能覆盖"密钥+SAST+依赖许可证+性能"四维、带 CWE 映射与 CI 门禁、可离线零依赖运行。触发词:代码安全扫描、密钥扫描、Secret 扫描、SAST、OWASP、SQL注入检测、XSS检测、依赖漏洞扫描、CVE检查、许可证风险、供应链安全、DevSecOps、CI安全门禁、代码审计、静态分析、code security、secret scanning、dependency audit、security scanner。
category: 开发者工具
license: MIT
platforms:
- WorkBuddy
- QClaw
- ima
homepage: https://skillhub.cn
author: adam
company: 阿拉丁
tags:
- 代码安全
- 密钥扫描
- Secret扫描
- SAST
- OWASP
- SQL注入检测
- XSS检测
- 依赖漏洞扫描
- CVE检查
- 许可证风险
- 供应链安全
- DevSecOps
- CI安全门禁
- 代码审计
- 静态分析
- 开发者工具
- code security
- secret scanning
- dependency audit
- security scanner
agent_created: true阿拉丁·代码安全审计工坊(aladin-secure-forge)
阿拉丁出品。你写的代码功能没问题,但「密钥不小心提交上去了」「上线后被人 SQL 注入拖库」「依赖里藏了个 GPL 雷」「N+1 把接口拖垮」——这些事每次都靠运气、靠付费 SAST 平台、靠上线后救火。skillhub 上
scan-codes(代码安全扫描工具) 只能做单点扫描、各类code-reviewer只做人工评审——没有任何技能把"密钥 + OWASP 漏洞 + 依赖许可证 + 性能反模式"收口成一条纯本地安全审计链。这个技能把它变成你仓库里的一条命令:扫完直接出 HTML 看板、MD 摘要、CI 门禁,高危项还能一键甩给自家aladin-code-pilot修。
它解决什么痛点
开发者在 skillhub 上能找到的"代码安全"类工具都是单点:
| 现有飙升技能 | 只做 | 不做 |
|---|---|---|
| scan-codes(it-ops-security 新晋,代码安全扫描工具) | 基础单点扫描 | 不扫密钥、不做 OWASP 分类、不扫依赖、不出 CI 门禁 |
| code-reviewer / code-reviews(趋势常驻) | 一次性代码评审 | 不专门做安全/密钥/依赖、不卡 CI |
| mvn-tool(Maven 依赖管理) | 依赖版本管理 | 不做许可证风险、不做 CVE 匹配 |
本技能 = 四维安全审计,脚本零依赖、纯本地、离线可用,且与自家 aladin 工程链互补。
与 skillhub 现有技能 + 自家 aladin 系列的差异化
| 能力 | scan-codes | code-reviewer | 阿拉丁·代码安全审计工坊(本款) |
|---|---|---|---|
| 密钥/凭证泄露扫描(AWS/私钥/Bearer/高熵) | ❌ | ❌ | ✅ 含误报过滤 |
| OWASP SAST(注入/XSS/SSRF/反序列化/弱加密) | 部分 | ❌ | ✅ 带 CWE 编号 + 修复示例 |
| 依赖与许可证风险(SBOM/强传染/弃用) | ❌ | ❌ | ✅ 多清单解析 + 离线 CVE |
| 性能反模式(N+1/异步阻塞/ReDoS) | ❌ | ❌ | ✅ 多语言启发式 |
| 多语言(Py/JS/TS/Java/Go…) | 有限 | 有限 | ✅ 统一正则引擎 |
| 三种报告(HTML/MD/JSON) | ❌ | ❌ | ✅ 自包含看板 |
| CI 门禁(按严重度非零退出) | ❌ | ❌ | ✅ 直接卡流水线 |
| 修复联动(→ aladin-code-pilot) | ❌ | ❌ | ✅ 生成 fix-tasks.md |
与自家 aladin 系列的关系:code-pilot 审函数质量/补单测、api-pilot 验接口契约、sql-forge 管存储、diagram-forge 画结构、cicd-forge 管交付、secure-forge 管安全——六者覆盖「函数→接口→存储→结构→交付→安全」,可串成统一工程闭环(CI 里先 secure-forge 卡安全,再过 code-pilot 评审、api-pilot 契约、sql-forge 迁移)。
何时触发
- "帮我扫一下这个项目有没有泄露的密钥 / 硬编码密码"
- "做次代码安全审计 / SAST / OWASP 扫描 / SQL 注入检测"
- "检查依赖有没有漏洞(CVE)/ 许可证是不是 GPL 传染 / 有没有弃用包"
- "给我出一份安全报告(HTML 看板 / Markdown 摘要)"
- "在 CI 里加个安全门禁,高危就阻断合并"
- "把这些安全问题交给 aladin-code-pilot 一键修复"
- 用户给出仓库路径,希望本地、离线、零依赖地拿到安全结论
何时不触发
- 用户要深度应用安全测试(DAST)/ 渗透测试 / 运行时防护——本技能是静态(SAST/SCA),不替代动态测试与渗透。
- 用户要权威全量 CVE 数据库实时比对——内置公告是离线精选包,生产需叠加
pip-audit/npm audit/govulncheck(见 license-risk.md)。 - 用户要商业级语义 SAST(CodeQL/Semgrep 级 precision)——本技能是正则启发式,重在低成本门禁,非替代。
- 用户要许可证法律意见书——本技能只做声明式分级,不构成法律意见。
- 用户代码涉及强合规涉密且禁止本地留痕——虽纯本地,仍需先确认合规策略。
核心能力(统一工具链 + 本地增值)
- 密钥/凭证泄露扫描:AWS Access Key、私钥块、Bearer Token、赋值式密码/Token、JWT 硬编码密钥、高熵字符串;带误报过滤(占位符/
node_modules/锁文件跳过)。 - OWASP SAST:SQL 注入(f-string/
+/.format/%)、命令注入(os.system/subprocess shell=True/eval)、XSS(innerHTML/dangerouslySetInnerHTML/v-html)、路径穿越(open/path.join/fs.readFile拼接可控路径)、SSRF(requests/fetch可控 URL)、不安全反序列化(pickle/yaml.load)、弱加密(MD5/SHA1/DES/ECB);每条附 CWE 编号 + 修复示例。 - 依赖与供应链风险:解析
package.json/requirements.txt/go.mod/pom.xml→ 许可证传染性分级(宽松/弱传染/强传染 GPL·AGPL/未知)+ 离线 CVE 公告匹配 + 弃用/未固定版本标记(SBOM 雏形)。 - 性能反模式:N+1 查询(循环内逐条查库)、异步函数内阻塞 IO、
ReDoS灾难性正则。 - 多语言统一引擎:纯正则单遍扫描,覆盖 Python/JS/TS/Java/Go 等常见语法,自动跳过
node_modules/__pycache__/锁文件/.min.js。 - 三种报告:自包含 HTML 看板(严重度徽章 + CWE 链接)、Markdown 摘要(适合 PR 评论/周报)、机器可读 JSON(接入 CI)。
- CI 门禁:
--fail-on {critical|high|medium|low|none},命中阈值即以非零退出码终止流水线,把安全左移到提交阶段。 - 修复联动:生成
fix-tasks.md(高危项清单),直接交给aladin-code-pilot产出修复补丁 + 单元测试 + Conventional 提交。
工作流(3 步)
① 代码层扫描 secure_scan.py scan --path ./repo --out findings.json
② 依赖层扫描 secure_deps.py parse --path ./repo --out deps.json
③ 汇总+门禁 secure_report.py --findings findings.json --deps deps.json \
--html report.html --md report.md --fix fix-tasks.md \
--fail-on high --project my-service
使用方式
脚本零依赖,直接用托管 Python 运行(无需 pip install):
PY="C:/Users/adam/.workbuddy/binaries/python/versions/3.13.12/python.exe"
SK="aladin-secure-forge"
# ① 代码层扫描(密钥 / OWASP / 性能)
"$PY" $SK/scripts/secure_scan.py scan --path ./my-project --out findings.json
# ①b 只扫密钥、屏蔽低危(适合 pre-commit)
"$PY" $SK/scripts/secure_scan.py scan --path ./src --out secrets.json --min-severity high
# ② 依赖与供应链风险(无需源码也能跑)
"$PY" $SK/scripts/secure_deps.py parse --path ./my-project --out deps.json
# ③ 汇总成看板 + 摘要 + 修复任务,并做 CI 门禁
"$PY" $SK/scripts/secure_report.py \
--findings findings.json --deps deps.json \
--html report.html --md report.md --json report.json --fix fix-tasks.md \
--fail-on high --project my-service
自然语言描述:让 Hy3 按
references/usage-examples.md把"扫哪个目录 / 门禁级别 / 报告格式"落成命令,再跑上述步骤,无需手敲路径。
输入输出规范
输入:
- 仓库路径(
scan --path/parse --path,自动递归发现源码与清单) - 可选:最低严重度(
--min-severity)、门禁阈值(--fail-on)、项目名称(--project)
输出:
findings.json:代码层问题(规则/CWE/位置/修复建议)deps.json:依赖清单 + 许可证风险 + CVE 命中report.html:自包含安全看板(严重度卡片 + 三张明细表)report.md:Markdown 摘要(适合 PR/周报)report.json:机器可读汇总(接入 CI)fix-tasks.md:高危项修复清单(联动 aladin-code-pilot)
输出位置: 由 --out / --html / --md 等参数指定,默认当前目录。
能力边界
能做:
- 扫描多语言源码,检测密钥泄露与 OWASP 常见高危模式。
- 解析 npm/pypi/go/maven 四种清单,做许可证分级与离线 CVE 匹配。
- 检测 N+1 / 异步阻塞 / ReDoS 等性能反模式。
- 生成 HTML/MD/JSON 三种报告,并据严重度做 CI 门禁。
- 产出修复任务清单,交给 aladin-code-pilot 继续修复。
- 纯本地、零依赖、离线可用,不发起任何网络请求。
不能做:
- 不做动态/运行时安全测试(DAST/渗透/运行时防护)——只做静态。
- 不提供全量实时 CVE 数据库——内置公告为离线精选,需叠加在线审计工具兜底。
- 不替代商业语义 SAST(CodeQL/Semgrep)——正则启发式,重在低成本门禁。
- 不出具许可证法律意见书——仅声明式分级。
- 不修改你的业务代码——只产出报告与修复建议清单。
重要约束
- 不联网执行:脚本只读本地仓库、只写本地报告,不发起任何网络请求(→ Trust)。
- 只出报告不代改码:默认只扫描与生成报告/门禁,真实修复由 aladin-code-pilot 或你执行(→ Reliability)。
- 可编辑优先:所有产物是纯文本/JSON,可进版控、可二次编辑(→ Adaptability)。
- 零依赖透明:脚本仅用 Python 标准库,SKILL.md 已写明运行方式,无需安装任何包(→ Adaptability)。
- 不臆造漏洞:未固定版本/未知许可证不强行判定为漏洞,仅提示核查(→ Convention)。
- 误报可控:密钥扫描含占位符过滤;确属误报可按
references/usage-examples.md的「误报处理」忽略(→ Reliability)。
安全说明
- 全部脚本仅用 Python 标准库,不发起任何网络请求,代码与结果均不出本机。
- 扫描器自身用于发现密钥泄露,样例库
assets/sample_repo中的凭证均为明显伪造值(如AKIA-DEMO-ONLY-NOT-A-REAL-KEY、S3cr3tP@ssw0rd2021),不含任何真实密钥,可安全入库与演示。 - 报告会主动标记硬编码凭证与强传染性许可证(GPL/AGPL),帮助你在提交前排雷。
- 建议把安全扫描接入 CI,
--fail-on high阻断含高危问题的合并;历史仓库先全量扫、再分批还债。
参考文档(渐进式披露)
| 文件 | 用途 | 加载时机 |
|---|---|---|
references/secret-patterns.md |
密钥扫描规则清单 + 误报过滤 + 使用建议 | 调密钥扫描 / 看密钥报告时 |
references/sast-rules.md |
OWASP SAST + 性能反模式规则清单(CWE + 修复方向) | 看漏洞报告 / 排错时 |
references/license-risk.md |
许可证分级 + 离线 CVE 公告 + 升级在线数据源 | 看依赖风险 / 供应链审计时 |
references/usage-examples.md |
4 个完整场景 + 最佳实践 + FAQ | 首次使用 / 排错时 |
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 覆盖密钥扫描、OWASP SAST、依赖许可证风险、性能反模式四维安全审计,解决开发者高频痛点
- 支持本地离线运行、CI 门禁、修复联动,显著优于现有单点扫描工具
- 与 aladin 工程链形成闭环,具备高实用价值
Highlights
- 触发词覆盖全面(代码安全扫描、密钥扫描、SAST、OWASP、CVE检查等),边界清晰
- 与功能高度匹配,用户可精准触发
Areas to improve
-
description 内容过长 Reported severity: Minor
frontmatter 中 description 字段内容过长,影响可读性
Recommendation: 建议精简 frontmatter description,保留核心卖点,详细内容放 skill_body
-
缺少显式 When to Use 章节 Reported severity: Minor
虽有“何时触发”内容,但未以标准章节名呈现
Recommendation: 建议将“何时触发”改为标准章节名 "When to Use",提升规范性
Highlights
- 结构完整:含核心能力、工作流、使用方式、输入输出、边界说明
- 提供端到端示例与三步工作流,执行路径清晰
- frontmatter 完整,参数定义明确
Areas to improve
-
文档总长度偏长 Reported severity: Minor
SKILL.md 文件约 450 行,部分细节可下沉至 references 文件
Recommendation: 建议将部分实现细节、规则清单进一步下沉至 references 目录,保持主文档简洁
Highlights
- 脚本零依赖,仅用 Python 标准库,不发起网络请求,安全可靠
- 覆盖主要异常场景(误报过滤、跳过依赖目录、未固定版本不强行判定)
- 不可逆操作明确交由 aladin-code-pilot 执行,本技能仅生成报告,符合最小权限原则
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.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 113 -
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 93 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 5, 6, 7, 19, 43
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- skillhub.cn
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
"$PY" $SK/scripts/secure_deps.py parse --path ./my-project --out deps.json
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.