Back to skill

Security audit

jf-open-pro-algo-detection

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for JFTech image-analysis workflows, but it needs review because it uploads sensitive images with API credentials and can persistently install another unverified remote skill.

Install only if you trust JFTech and the referenced capture-skill source. Avoid the automatic dependency install unless you can pin and verify the downloaded version. Treat submitted images, device serial numbers, callback results, and API credentials as sensitive; use the default HTTPS endpoint, keep config.json out of backups and repositories, and rotate credentials if the skill directory is shared.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/jf_client.py:108
Finding

Unrestricted API Endpoint Allows Redirection of Sensitive Images and Authentication Metadata

Content
View full analysis

Vulnerability Details

File Location: scripts/jf_client.py:108-112, scripts/jf_client.py:131, and scripts/jf_client.py:176-195
Vulnerability Type: Unvalidated destination for authenticated data transmission
Risk Level: Medium

Vulnerable Code

python
def api_call(cfg, path, body, timeout=60):
    url = cfg["endpoint"].rstrip("/") + path
    req = urllib.request.Request(url, data=json.dumps(body).encode("utf-8"),
                                 headers=auth_headers(cfg), method="POST")
    try:
        with urllib.request.urlopen(req, timeout=timeout) as r:
            return json.loads(r.read().decode("utf-8"))
python
if args.endpoint: cfg["endpoint"] = args.endpoint
python
def cmd_call(args):
    cfg = require_config()
    img = args.image
    if img.lower().startswith(("http://", "https://")):
        image_obj = {"url": img, "sn": args.sn}
    else:
        if not os.path.exists(img):
            print(json.dumps({"ok": False, "error": "image_not_found", "path": img}, ensure_ascii=False))
            sys.exit(2)
        with open(img, "rb") as f:
            b64 = base64.b64encode(f.read()).decode()
        image_obj = {"b64": b64, "sn": args.sn}

    app_config = {"confThreshold": args.conf}
    if args.config_json:
        try:
            app_config.update(json.loads(args.config_json))
        except Exception as e:
            print(json.dumps({"ok": False, "error": "bad_config_json", "detail": str(e)}, ensure_ascii=False))
            sys.exit(2)

    body = {"appUuid": args.app_uuid, "image": image_obj, "appConfig": app_config}
    resp = api_call(cfg, "/openai/algorithm/application/v3/callApp", body, timeout=args.timeout)

Technical Analysis

The client permits the configured API endpoint to be replaced with an arbitrary URL. It does not validate the URL scheme, hostname, port, embedded credentials, or final destination ...[truncated 2151 chars]

Remediation
View remediation

Remediation Suggestions

  1. Allowlist the documented destination, preferably requiring the exact origin https://api.jftechws.com.
  2. Parse the endpoint with a standard URL parser and reject:
    • Schemes other than HTTPS.
    • Embedded usernames or passwords.
    • Unexpected ports.
    • Missing or unexpected hostnames.
    • Fragments and malformed paths.
  3. Disable redirects or verify that every redirect remains on the approved HTTPS origin.
  4. If custom enterprise endpoints are genuinely required, maintain an explicit administrator-controlled allowlist rather than accepting arbitrary command-line values.
  5. Display the destination hostname and require explicit user confirmation immediately before uploading an image to any non-default endpoint.
  6. Bind signatures to the HTTP method, destination host, path, and body where supported by the API protocol.
  7. Add automated tests proving that HTTP URLs, lookalike domains, alternate ports, embedded credentials, and cross-origin redirects are rejected.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/jf_client.py:79
Finding

Application Secret Is Exposed Through Command-Line Arguments and Plaintext Local Storage

Content
View full analysis

Vulnerability Details

File Location: scripts/jf_client.py:30, scripts/jf_client.py:79-81, and scripts/jf_client.py:125-134; setup guidance at SKILL.md:65
Vulnerability Type: Insecure credential handling and plaintext secret storage
Risk Level: Medium

Vulnerable Code

python
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
CONFIG_PATH = os.path.join(os.path.dirname(SCRIPT_DIR), "config.json")
python
def save_config(cfg):
    with open(CONFIG_PATH, "w", encoding="utf-8") as f:
        json.dump(cfg, f, ensure_ascii=False, indent=2)
python
def cmd_config_set(args):
    cfg = load_config()
    if args.uuid: cfg["uuid"] = args.uuid
    if args.appkey: cfg["appKey"] = args.appkey
    if args.appsecret: cfg["appSecret"] = args.appsecret
    if args.movecard is not None: cfg["moveCard"] = args.movecard
    if args.endpoint: cfg["endpoint"] = args.endpoint
    cfg.setdefault("moveCard", 2)
    cfg.setdefault("endpoint", DEFAULT_ENDPOINT)
    save_config(cfg)

The documented setup command is:

bash
python scripts/jf_client.py config set --uuid xxx --appkey xxx --appsecret xxx --movecard 2

Technical Analysis

The application secret is accepted directly as a command-line argument. Command-line arguments may be exposed through shell history, terminal transcripts, process-monitoring interfaces, audit logs, automation logs, and diagnostic tools.

The complete secret is subsequently serialized into config.json as plaintext. The file is created using ordinary open() behavior without explicitly enforcing owner-only permissions. Its effective permissions therefore depend on the operating system, ambient umask, inherited access-control lists, and directory permissions.

The configuration is also stored inside the Skill directory. Although the documentation warns that config.json must be excluded from distribution, no technical control enforce ...[truncated 1636 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the --appsecret command-line option from the recommended setup flow.
  2. Read the secret interactively with getpass.getpass() or retrieve it from an operating-system credential manager.
  3. Prefer platform-native secret storage such as Windows Credential Manager, macOS Keychain, or a Linux secret-service implementation.
  4. If file storage is unavoidable:
    • Store credentials outside the distributable Skill directory.
    • Create the file atomically with owner-only permissions.
    • Enforce mode 0600 on POSIX systems.
    • Validate ownership and permissions before loading it.
    • Apply restrictive Windows ACLs where applicable.
  5. Add config.json to source-control, package, archive, and publication exclusion rules rather than relying only on written instructions.
  6. Avoid including secrets in process arguments, logs, exceptions, diagnostic bundles, or terminal output.
  7. Support short-lived tokens or scoped credentials if the service provides them.
  8. Document credential rotation and require immediate rotation if the Skill directory has ever been shared or published.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:136
Finding

Mutable Unpinned Remote Skill Is Installed and Trusted Without Integrity Verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:136-142
Vulnerability Type: Unpinned remote dependency and supply-chain execution risk
Risk Level: Medium

Vulnerable Instructions

bash
git clone --depth 1 https://gitee.com/jftek/jftech-open-skills.git <temporary-directory>

The fallback installation source and post-install behavior are described as:

text
If Git is unavailable, download:
https://gitee.com/jftek/jftech-open-skills/repository/archive/main.zip

Copy the jf-open-pro-capture subdirectory into the local Skills directory.
Verify that SKILL.md exists. If the current session's Skill list has not
refreshed, directly read that SKILL.md and continue according to its
instructions.

Technical Analysis

The installation procedure retrieves the mutable default branch or its main.zip archive. It does not pin an immutable commit, identify a reviewed release, verify a cryptographic checksum, or validate a digital signature.

The downloaded component is copied into a persistent local Skills directory. The Agent is then instructed to read and follow the newly downloaded SKILL.md, even when the normal Skill registry has not refreshed. Consequently, the effective dependency content and instructions can change after this Skill has been audited.

This is a supply-chain weakness rather than evidence that the currently referenced repository is malicious. User consent before installation reduces unexpected behavior but does not provide integrity, authenticity, or reproducibility.

Attack Path

  1. An attacker compromises the upstream repository, its maintainer account, release infrastructure, or an applicable distribution path.
  2. The attacker modifies the default branch or archive to include malicious instructions or executable scripts in jf-open-pro-capture.
  3. A user selects automatic installation.
  4. The Agent downloads the latest mutable repository state without verif ...[truncated 1059 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to an immutable, reviewed commit hash or versioned release.
  2. Publish and verify a SHA-256 or stronger digest before copying any downloaded files.
  3. Prefer signed releases and validate the maintainer’s signature against a trusted key.
  4. Download only the required release artifact instead of cloning the mutable default branch.
  5. Inspect the downloaded file list and reject symbolic links, path traversal entries, unexpected executables, and files outside the expected Skill subtree.
  6. Present the pinned version, source, and verified digest to the user before installation.
  7. Do not automatically follow newly downloaded instructions until their integrity and expected behavior have been validated.
  8. Install into a staging directory first, perform static review, and copy only an allowlisted set of files.
  9. Treat updates as new installations requiring integrity verification and renewed user approval.
  10. Run capture functionality with the minimum filesystem and network permissions required for its declared purpose.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The manifest presents the skill as an interactive recommendation and analysis assistant, but the documented behavior includes remote algorithm enablement ('open'), credential configuration, local file generation, and dependency installation steps that go beyond a simple detection workflow. This mismatch can mislead users and orchestration systems about the actual authority of the skill, creating opportunities for unexpected external actions and privilege overreach.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill directs the agent to perform network requests to external APIs, write local configuration and result files, and modify the local skills directory, but it declares no explicit tool scope or permission boundaries. This increases the chance of unintended network access, credential handling, file writes, or silent side effects because the host cannot enforce least-privilege behavior from the manifest.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description instructs use when the user mentions several broad terms, including generic concepts like image analysis and detection services. Because it mixes domain-specific and generic phrases without stating exclusion contexts, it can cause unintended invocation outside the intended JFTech algorithm platform use case.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The listed triggers include generic phrases such as “AI检测”, “算法调用”, “图片分析”, and “检测服务”, which are broad enough to match many ordinary conversations unrelated to this specific JFTech platform skill. The file does not provide exclusion conditions or negative examples to narrow when the skill should or should not activate.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs automatic installation of another skill by cloning a remote Git repository or downloading an archive, then copying files into the user's local skills directory and proceeding without waiting for further review. This creates a software supply-chain risk: remote content can change, may not be integrity-checked, and is being placed directly into an execution-sensitive location.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The catalog enumerates many surveillance-oriented capabilities such as behavior monitoring, intrusion detection, demographic analysis, ReID, and theft detection without documenting activation limits, authorized-use boundaries, or prohibited contexts. In a skill designed to guide users toward algorithmic monitoring of images and camera captures, this omission can enable overbroad or privacy-invasive deployment because nothing in the file constrains sensitive use cases or high-risk inferences.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest says the skill recommends from a list of 52 no-database algorithms and excludes comparison-style algorithms ('不含需底库的比对类算法'), focused on detection and analysis. However, the catalog includes '人形ReID' at L323-L328, which is explicitly a re-identification capability, and elsewhere includes non-detection features such as VQA, obfuscation, and video summarization, expanding beyond the described detection-only scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest frames this skill as interactive guidance for selecting detection algorithms and calling them on images/camera captures to produce structured detection reports. The '视频质量与内容理解' scene includes '人体打码', '车牌打码', '视觉问答', and '时光缩影', which are transformation or content-understanding utilities rather than straightforward detection algorithms, creating a semantic mismatch with the described purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documentation instructs sending images, image URLs, and device serial numbers to a third-party remote API, but it does not explicitly warn users that potentially sensitive visual data and device identifiers will leave their environment. In a surveillance/monitoring skill context, this increases privacy and compliance risk because operators may submit personally identifiable, operational, or location-linked data without informed consent or data-handling guidance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The asynchronous interface description notes that users can supply a callback URL to receive alerts, but it does not warn that analysis outputs may be pushed to arbitrary external endpoints. That omission can lead to unintentional data disclosure, SSRF-like misuse patterns in integrations, or delivery of sensitive monitoring results to improperly controlled destinations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script persists API credentials, including appSecret, to a local config.json file in plaintext and only masks the value when displaying it. If the workstation is shared, the repo directory is synced, or file permissions are weak, an attacker or another local user could recover the secret and use the API account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The api_call function sends request bodies to a remote endpoint, and cmd_call includes either a local image encoded as base64 or an image URL together with the SN value. Although network transmission is core functionality here, the code provides no explicit disclosure that local file contents and identifiers will be uploaded to the external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s natural-language interface, including its description, usage instructions, and argument help text, is entirely Chinese and does not indicate that other languages are supported or that Chinese is required for a specific regional/compliance reason. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Natural-language fields such as name, category, intro, and scene labels are written in Chinese throughout the file, while there is no indication that the skill is intentionally China-specific or that users can opt into this locale. This can violate a language/locale policy when a skill forces a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

A file-wide language constraint can be a natural-language policy issue when the skill effectively forces one language without user opt-in or explicit documentation. Here, all headings, instructions, and operational guidance are in Chinese, with no indication of language options or intended locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring and user-facing guidance are entirely in Chinese, and the test request also hardcodes lang="zh", which indicates a fixed locale without opt-in. The policy requires avoiding forced language or locale constraints unless user choice is offered or the restriction is clearly justified.

Content

No source excerpt is available for this finding.