Back to skill

Security audit

geoskill-crop-rotation-detection

Security checks across malware telemetry and agentic risk

Overview

The main crop-rotation tool looks local, but the package also ships under-disclosed network and credential-handling code that does not fit the stated offline purpose.

Install only if you are comfortable with a package that includes unused but accessible network, downloader, and credential-management helpers. Review or remove _geoskill_core/credentials.py, _geoskill_core/aoi.py, _place.py, and safe_download.py before use, and avoid running it in an environment containing sensitive ~/.netrc or ~/.geoskill/secrets.json credentials.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (25)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill advertises no declared permissions, yet the associated capability profile indicates access to environment variables, filesystem read/write, shell execution, and network. That gap prevents users and reviewers from understanding the true attack surface and can enable unintended data access or outbound communication if the skill is run in a permissive environment.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The declared purpose is offline crop-rotation detection, but the detected behavior includes geocoding, HTTP access, remote downloads, credential handling for multiple external services, and even embedded default credentials. This is a serious trust-boundary violation because users may run the skill expecting local raster analysis while it can reach external systems and expose secrets or fetch unreviewed content.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The vendored metadata claims this package contains core code for 'landsat-download' while the surrounding skill is 'geoskill-crop-rotation-detection'. This mismatch is a supply-chain integrity issue because it can indicate the wrong dependency bundle was copied in, metadata was tampered with, or reviewers may be misled about what code is actually included. In a skill ecosystem, incorrect provenance reduces trust in hash verification and can hide unexpected functionality behind apparently unrelated packaging metadata.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
This credentials module manages secrets for multiple unrelated external services, including OpenAI, CMA, FIRMS, EOG, and NASA Earthdata, which is broader than the declared crop-rotation detection purpose. Expanding secret-handling scope increases attack surface and enables the skill to access or facilitate access to external systems not justified by its stated analytics function.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The code explicitly reads user-home secret sources such as ~/.netrc and ~/.geoskill/secrets.json, allowing the skill to harvest ambient credentials from the user's environment. For a crop-rotation detection skill, this is overprivileged behavior and dangerous because it can silently consume credentials the user did not intend to expose to this skill.

Description-Behavior Mismatch

High
Confidence
96% confidence
Finding
This file implements broad place-resolution and external network geocoding logic that is unrelated to the declared crop-rotation detection purpose. That mismatch increases the risk of hidden data exfiltration, unexpected outbound requests, and capability creep, especially because user-supplied place strings are sent to third-party services without any purpose-bound enforcement in this module.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The module sends user-provided place queries to Open-Meteo and Nominatim, creating undisclosed external data exposure that is not justified by the stated crop-rotation detection function. Even if the requests are functional, unnecessary third-party transmission of user inputs can leak sensitive locations, operational context, or analyst intent.

Missing User Warnings

Medium
Confidence
78% confidence
Finding
The geocoding functions transmit user-provided place queries to third-party services without any disclosure or consent mechanism in this code path. In a crop-rotation skill, AOI names may reveal sensitive farm, project, or customer locations, so silent external transmission creates a real privacy and data-governance risk even if the destinations are legitimate geocoders.

Missing User Warnings

High
Confidence
99% confidence
Finding
The module hardcodes a real-looking default username and password for NASA Earthdata as fallback credentials. Hardcoded secrets are highly dangerous because they can be extracted from source control, reused by anyone with code access, and may cause unauthorized access or credential compromise across deployments.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
The Nominatim request hard-codes an Accept-Language header of zh-CN,zh;q=0.9 without user choice. Forcing locale can reveal assumptions about the operator or deployment region, alter returned results unexpectedly, and reduce transparency by making network behavior diverge from user expectations.

Credential Access

High
Category
Privilege Escalation
Content
/ `EARTHDATA_TOKEN` / `FIRMS_MAP_KEY` / `OPENAI_API_KEY` /
  `CMA_API_KEY` / `EOG_USERNAME` / `EOG_PASSWORD` 任何一项显式设置
  都优先于默认值。
- **支持 .netrc**:若 ~/.netrc 中存在 `machine urs.earthdata.nasa.gov`
  行,优先取 .netrc 凭证。
- **支持用户级 secrets 文件** ``~/.geoskill/secrets.json``:Phase 7
  (2026-07-27) 新增。本文件在用户 home,**不** vendor 到任何 skill,
Confidence
96% confidence
Finding
.netrc

Credential Access

High
Category
Privilege Escalation
Content
/ `EARTHDATA_TOKEN` / `FIRMS_MAP_KEY` / `OPENAI_API_KEY` /
  `CMA_API_KEY` / `EOG_USERNAME` / `EOG_PASSWORD` 任何一项显式设置
  都优先于默认值。
- **支持 .netrc**:若 ~/.netrc 中存在 `machine urs.earthdata.nasa.gov`
  行,优先取 .netrc 凭证。
- **支持用户级 secrets 文件** ``~/.geoskill/secrets.json``:Phase 7
  (2026-07-27) 新增。本文件在用户 home,**不** vendor 到任何 skill,
Confidence
96% confidence
Finding
~/.netrc

Credential Access

High
Category
Privilege Escalation
Content
`CMA_API_KEY` / `EOG_USERNAME` / `EOG_PASSWORD` 任何一项显式设置
  都优先于默认值。
- **支持 .netrc**:若 ~/.netrc 中存在 `machine urs.earthdata.nasa.gov`
  行,优先取 .netrc 凭证。
- **支持用户级 secrets 文件** ``~/.geoskill/secrets.json``:Phase 7
  (2026-07-27) 新增。本文件在用户 home,**不** vendor 到任何 skill,
  **不** push 到 GitHub;用于把个人真实凭证(NASA Earthdata bearer
Confidence
95% confidence
Finding
.netrc

Credential Access

High
Category
Privilege Escalation
Content
(2026-07-27) 新增。本文件在用户 home,**不** vendor 到任何 skill,
  **不** push 到 GitHub;用于把个人真实凭证(NASA Earthdata bearer
  token 等)放在 skill 之外。
- **不缓存密码**:每次调用读环境或 .netrc(避免长寿命进程泄露)。
- **统一接口**:`get_earthdata_creds()` / `get_earthdata_token()` /
  `get_firms_key()` / `get_cma_key()` / `get_openai_key()` /
  `get_eog_creds()` 六个 helper。
Confidence
94% confidence
Finding
.netrc

Credential Access

High
Category
Privilege Escalation
Content
"EOG_PASSWORD": "",
}

# .netrc 解析(仅在 UNIX-like / WSL 下 ~/.netrc 可用;Windows 下
# 通常用 %USERPROFILE%\_netrc,但 .netrc 本身仍是约定俗成的名称)。
_NETRC_HOSTS = {
    "urs.earthdata.nasa.gov": ("EARTHDATA_USERNAME", "EARTHDATA_PASSWORD"),
Confidence
95% confidence
Finding
.netrc

Credential Access

High
Category
Privilege Escalation
Content
"EOG_PASSWORD": "",
}

# .netrc 解析(仅在 UNIX-like / WSL 下 ~/.netrc 可用;Windows 下
# 通常用 %USERPROFILE%\_netrc,但 .netrc 本身仍是约定俗成的名称)。
_NETRC_HOSTS = {
    "urs.earthdata.nasa.gov": ("EARTHDATA_USERNAME", "EARTHDATA_PASSWORD"),
Confidence
95% confidence
Finding
~/.netrc

Credential Access

High
Category
Privilege Escalation
Content
}

# .netrc 解析(仅在 UNIX-like / WSL 下 ~/.netrc 可用;Windows 下
# 通常用 %USERPROFILE%\_netrc,但 .netrc 本身仍是约定俗成的名称)。
_NETRC_HOSTS = {
    "urs.earthdata.nasa.gov": ("EARTHDATA_USERNAME", "EARTHDATA_PASSWORD"),
    "firms.modaps.eosdis.nasa.gov": ("FIRMS_MAP_KEY",),
Confidence
93% confidence
Finding
.netrc

Credential Access

High
Category
Privilege Escalation
Content
def _read_netrc(host: str) -> Optional[Tuple[str, ...]]:
    """从 ~/.netrc 读指定 host 的凭证(无 token 格式)。"""
    for path in (Path.home() / ".netrc", Path.home() / "_netrc"):
        if not path.is_file():
            continue
Confidence
98% confidence
Finding
~/.netrc

Credential Access

High
Category
Privilege Escalation
Content
def _read_netrc(host: str) -> Optional[Tuple[str, ...]]:
    """从 ~/.netrc 读指定 host 的凭证(无 token 格式)。"""
    for path in (Path.home() / ".netrc", Path.home() / "_netrc"):
        if not path.is_file():
            continue
        try:
Confidence
97% confidence
Finding
.netrc

Credential Access

High
Category
Privilege Escalation
Content
都优先于默认值。
- **支持 .netrc**:若 ~/.netrc 中存在 `machine urs.earthdata.nasa.gov`
  行,优先取 .netrc 凭证。
- **支持用户级 secrets 文件** ``~/.geoskill/secrets.json``:Phase 7
  (2026-07-27) 新增。本文件在用户 home,**不** vendor 到任何 skill,
  **不** push 到 GitHub;用于把个人真实凭证(NASA Earthdata bearer
  token 等)放在 skill 之外。
Confidence
96% confidence
Finding
secrets.json

Credential Access

High
Category
Privilege Escalation
Content
# 用户级 secrets 文件位置(在用户 home,**不** vendor 到 skill 内部)。
# Phase 7 (2026-07-27): 包含 NASA Earthdata bearer token 等真实凭证。
USER_SECRETS_PATH = Path.home() / ".geoskill" / "secrets.json"

# 是否已加载过用户级 secrets(避免每次调用都重读)
_user_secrets_loaded = False
Confidence
97% confidence
Finding
secrets.json

Credential Access

High
Category
Privilege Escalation
Content
def load_user_secrets(path: Optional[Path] = None, *, force: bool = False) -> bool:
    """从 ``~/.geoskill/secrets.json`` 加载用户级凭证到 _DEFAULTS.

    Phase 7 (2026-07-27): 第一次调用自动加载(lazy)。之后每个 helper
    调用也会 lazy 加载,除非显式 ``force=True`` 强制重读。返回 True
Confidence
98% confidence
Finding
secrets.json

Unpinned Dependencies

Low
Category
Supply Chain
Content
numpy
rasterio
Confidence
97% confidence
Finding
numpy

Unpinned Dependencies

Low
Category
Supply Chain
Content
numpy
rasterio
Confidence
97% confidence
Finding
rasterio

Known Vulnerable Dependency: numpy — 10 advisory(ies): CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +7 more

Critical
Category
Supply Chain
Confidence
84% confidence
Finding
numpy

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
tests/conftest.py:15