Back to skill

Security audit

元链 yotta-chain

Security checks for vulnerabilities and agentic risk

Overview

This dependency checker needs review because project files can trigger reads outside the chosen folder and expose sensitive values in reports.

Run scans of untrusted repositories in isolation with only intended project files readable until include-path containment is fixed. Remove credentials from registry URLs and keep reports private. Prefer a reviewed, pinned release and one installation destination. The packaged test suite is absent, so its advertised results could not be verified.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/yotta_chain.py
Finding

Repository-controlled requirements includes escape the authorized scan directory

Content
View full analysis

Impact

Unauthorized out-of-project reads and conditional disclosure through reports or CI logs. For example, an include targeting an external file containing a single alphanumeric credential emits that credential as an unpinned package name under the default output settings. Disclosure to the contributor requires access to the resulting report or logs; arbitrary file contents are not necessarily reproduced.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (46)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · CHANGELOG.md (reported line 43)May include surrounding context.

md
## 0.1.0 (2026-08-27)

- 初始版本:零依赖供应链依赖校验引擎(Python 3.8+ 标准库,纯本地离线)。
- 生态:npm(package.json + package-lock v1/v2/v3 + npm-shrinkwrap + .npmrc 作用域仓库)、
  Python(requirements*.txt + pyproject.toml(PEP 621 / poetry)+ poetry.lock + Pipfile / Pipfile.lock)、
  Maven(pom.xml 基础:未固定版本 / SNAPSHOT / 可疑仓库 URL)。
- 检测:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 31)May include surrounding context.

md
## Core value

- **Zero-dependency engine** — npm semver + PEP 440 range checks, TOML / JSON / requirements parsers, all built with Python 3.8+ standard library.
- **Dependency confusion** — scope registry configured in `.npmrc` but resolved from a public registry; the same package resolved from multiple registries; suspicious registry URLs (http / IP literal / localhost); pip extra-index and poetry secondary-source public fallback.
- **Lockfile consistency** — manifest entry missing from lockfile, locked version out of the declared range, root name / version mismatch, dangling references, missing integrity, same version with conflicting sources.
- **Hygiene** — missing lockfile, unpinned versions (`*` / `latest` / no constraint), Maven SNAPSHOT dependencies.
- **Typosquatting** — dependency names within edit distance 2 of well-known npm / PyPI packages are flagged for manual review.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.zh-CN.md (reported line 31)May include surrounding context.

md
## 核心价值

- **零依赖引擎**——npm semver + PEP 440 版本范围判定、TOML / JSON / requirements 解析器,全部用 Python 3.8+ 标准库实现。
- **依赖混淆**——.npmrc 里配置了私有仓库的 scope 却从公共仓库解析;同一包被多个仓库解析;可疑仓库地址(http / IP 字面量 / 本机);pip extra-index 与 poetry secondary 源造成的公共回退。
- **lockfile 一致性**——清单条目在锁文件缺失、锁定版本超出声明范围、根 name / version 不一致、悬空引用、缺 integrity、同版本多来源冲突。
- **卫生**——缺失锁文件、未固定版本(`*` / `latest` / 无约束)、Maven SNAPSHOT 依赖。
- **typo-squat**——依赖名与知名 npm / PyPI 包编辑距离 ≤ 2 时提示人工复核。

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_chain.py (reported line 1074)May include surrounding context.

python
for n, r in d.items():
                manifest_deps.setdefault(n, {"range": r, "group": group})

    npmrc = parse_npmrc(_read_text(base / ".npmrc"))
    pub_cfg = pj.get("publishConfig") or {}
    if isinstance(pub_cfg, dict) and pub_cfg.get("registry"):
        npmrc["registry"] = npmrc["registry"] or pub_cfg["registry"]

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 131)May include surrounding context.

md
| Rule | Severity | What it means |
|---|---|---|
| `confusion_scope_registry` | high | Scope has a private registry in `.npmrc`, but the lockfile resolves it from a public registry |
| `confusion_mixed_registry` | high | The same package is resolved from multiple registry hosts |
| `lockfile_missing_entry` | high | A manifest dependency is absent from the lockfile |
| `lockfile_range_unsatisfied` | high | Locked version does not satisfy the declared range (npm semver / PEP 440) |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 149)May include surrounding context.

md
## Supported ecosystems

- **npm** — `package.json` + `package-lock.json` (v1 / v2 / v3) / `npm-shrinkwrap.json` / `yarn.lock` / `pnpm-lock.yaml` / `bun.lock` + `.npmrc` (per-scope registries);
- **Python** — `requirements*.txt` (with `--index-url` / `--extra-index-url` / `-r` recursion), `pyproject.toml` (PEP 621 / poetry), `poetry.lock`, `uv.lock`, `Pipfile` / `Pipfile.lock`;
- **Maven** — `pom.xml` (basic: unpinned / SNAPSHOT / suspicious repository URLs / property + dependencyManagement resolution).
- `bun.lockb` is recognized but not deeply parsed; `go.mod` / `Cargo.lock` are not yet supported.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.zh-CN.md (reported line 131)May include surrounding context.

md
| 规则 | 严重度 | 说明 |
|---|---|---|
| `confusion_scope_registry` | high | .npmrc 为某 scope 配置私有仓库,锁文件却从公共仓库解析(依赖混淆) |
| `confusion_mixed_registry` | high | 同一包被解析自多个不同仓库主机 |
| `lockfile_missing_entry` | high | 清单声明的依赖在锁文件中缺失 |
| `lockfile_range_unsatisfied` | high | 锁定版本不满足声明范围(npm semver / PEP 440) |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.zh-CN.md (reported line 149)May include surrounding context.

md
## 支持的生态(v0.1.4)

- **npm** — `package.json` + `package-lock.json`(v1 / v2 / v3)/ `npm-shrinkwrap.json` / `yarn.lock` / `pnpm-lock.yaml` / `bun.lock` + `.npmrc`(作用域仓库映射);
- **Python** — `requirements*.txt`(含 `--index-url` / `--extra-index-url` / `-r` 递归)、`pyproject.toml`(PEP 621 / poetry)、`poetry.lock`、`uv.lock`、`Pipfile` / `Pipfile.lock`;
- **Maven** — `pom.xml`(基础:未固定版本 / SNAPSHOT / 可疑仓库 URL / 属性与 dependencyManagement 解析)。
- `bun.lockb` 只识别不深度解析;`go.mod` / `Cargo.lock` 暂不支持。

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 7)May include surrounding context.

md
version: 0.1.7
displayName: 元链·供应链校验
summary: 供应链依赖校验:本地解析 npm、Python、Maven 依赖清单,检查版本与供应链风险。
description: '元链 —— 跨智能体的供应链依赖校验技能:零依赖自研引擎本地解析 npm(package.json / package-lock v1-v3 / yarn.lock / pnpm-lock.yaml / bun.lock / .npmrc)与 Python(requirements / pyproject.toml / poetry.lock / uv.lock / Pipfile)及 Maven pom.xml,检测依赖混淆(私有包名被公共仓库同名抢占 / 混合仓库 / 可疑仓库 URL / extra-index 回退)、lockfile 与清单不一致、缺失锁文件、未固定版本、typo-squat 仿冒命名,并生成 SBOM-lite(CycloneDX 1.5 子集)。触发:用户要在构建 / 发布 / CI 前检查项目依赖是否存在供应链风险、核对锁文件与清单是否一致、排查依赖混淆风险或生成 SBOM 时。边界:纯本地离线解析,不做在线 CVE 比对、不查询公共包仓库、不发送任何数据;结果只是「需人工复核的风险信号」,是否真实需人工核实;仅用于已获授权 / 自有资产 / 教学环境。'
tags: [供应链, 依赖校验, 依赖清单, 供应链安全, supply chain, 检查]
category: it-ops-security
license: MIT

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 67)May include surrounding context.

md
| 规则 | 严重度 | 说明 |
|---|---|---|
| confusion_scope_registry | high | .npmrc 为某 scope 配置私有仓库,但锁文件里该 scope 包实际解析自公共仓库(依赖混淆) |
| confusion_mixed_registry | high | 同一包在锁文件里被解析自多个不同仓库主机 |
| lockfile_missing_entry | high | 清单声明了依赖,锁文件里却没有 |
| lockfile_range_unsatisfied | high | 锁文件版本不满足清单声明的范围(npm semver / PEP 440) |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 89)May include surrounding context.

md
## 支持的生态(v0.1.4)

- **npm**:package.json + package-lock.json(v1 / v2 / v3)/ npm-shrinkwrap.json / yarn.lock / pnpm-lock.yaml / bun.lock + .npmrc(作用域仓库映射);
- **Python**:requirements*.txt(含 --index-url / --extra-index-url / -r 递归)、pyproject.toml(PEP 621 / poetry)、
  poetry.lock、uv.lock、Pipfile / Pipfile.lock;
- **Maven**:pom.xml(基础:未固定版本 / SNAPSHOT / 可疑仓库 URL / dependencyManagement 属性解析)。

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/rules.md (reported line 15)May include surrounding context.

md
### confusion_scope_registry(high)

- 触发:`.npmrc` 为某 scope 配置了私有仓库(`@scope:registry=...`),但 package-lock.json 里该 scope 的包 `resolved` 指向其它(公共)仓库主机。
- 含义:私有包名本应从私有仓库解析,实际却可能被公共仓库的同名攻击者包抢占。
- 示例:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/rules.md (reported line 20)May include surrounding context.

  • 示例:

    text
    # .npmrc
    @corp:registry=https://npm.corp.example.com/
    # package-lock.json
    "node_modules/@corp/secret": { "resolved": "https://registry.npmjs.org/@corp/secret.tgz" }
    

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/rules.md (reported line 48)May include surrounding context.

md
### confusion_registry_mismatch(medium)

- 触发:项目配置了私有默认仓库(`.npmrc registry=` 或 package.json publishConfig),但锁文件里包从公共仓库(registry.npmjs.org)解析。
- 含义:配置与锁定来源不一致,私有包名可能从公共仓库被抢占。
- 修复:核对默认仓库配置与锁文件生成时机;重新安装生成锁文件。

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/rules.md (reported line 124)May include surrounding context.

md
- 依赖混淆为本地近似:真正确认「私有包名被公共仓库抢占」需要在线核对,引擎给强信号供人工复核。
- `yarn.lock` / `pnpm-lock.yaml` / `bun.lock` / `uv.lock` 做基础一致性解析;`bun.lockb` 只识别不深度解析,`go.mod` / `Cargo.lock` 未支持。
- 只扫描给定目录(不递归子目录 monorepo);`-r` 递归的 requirements 会跟随(深度 ≤ 5)。
- 不读用户级 `.npmrc` / `pip.conf`(只读项目内配置),避免触碰项目外数据。

## 七、输出语义

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_chain.py (reported line 8)May include surrounding context.

python
Zero-dependency Python 3.8+ implementation (standard library only).

Scope (v0.1.2):
  - npm   : package.json + package-lock.json (v1/v2/v3) + npm-shrinkwrap.json + .npmrc
  - python: requirements*.txt + pyproject.toml (PEP 621 / poetry) + poetry.lock
            + Pipfile / Pipfile.lock
  - maven : pom.xml (basic: unpinned / SNAPSHOT / suspicious repository URLs)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_chain.py (reported line 778)May include surrounding context.

python
def parse_npmrc(text):
    """Parse .npmrc into {"registry": url|None, "scopes": {scope: url}}."""
    cfg = {"registry": None, "scopes": {}}
    for raw in (text or "").splitlines():
        line = raw.strip()

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_chain.py (reported line 1920)May include surrounding context.

python
lock = _select_npm_lockfile(base, pj)
        if lock is not None:
            out.append(lock.name)
        if (base / ".npmrc").is_file():
            out.append(".npmrc")
    if "python" in eco:
        for path in sorted(base.glob("requirements*.txt")):

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_chain.py (reported line 1921)May include surrounding context.

python
if lock is not None:
            out.append(lock.name)
        if (base / ".npmrc").is_file():
            out.append(".npmrc")
    if "python" in eco:
        for path in sorted(base.glob("requirements*.txt")):
            out.append(path.name)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The chunk's primary operation is deploying a skill, not inspecting project dependencies. Its writes and cleanup operations in agent skill directories are substantive installation capabilities not described by the declared auditing purpose. Installation could support a larger package, but this chunk does not implement the advertised audit functionality. It uses only built-in Node.js modules and shows no networking or data transmission, so those declared boundaries are consistent. This finding applies to the supplied chunk and does not establish whether other package files implement the advertised scanner.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 43)May include surrounding context.

md
python3 scripts/yotta_chain.py scan --path ./

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 46)May include surrounding context.

md
python3 scripts/yotta_chain.py scan --path ./src --level medium --format json

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
python3 scripts/yotta_chain.py scan --path . --gate high; echo $?

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 52)May include surrounding context.

md
python3 scripts/yotta_chain.py sbom --path . --output sbom.json

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 55)May include surrounding context.

md
python3 scripts/yotta_chain.py sbom --path . --format text