Back to skill

Security audit

jf-open-pro-ai-indoor-security

Security checks for vulnerabilities and agentic risk

Overview

This indoor-security skill is mostly aligned with its stated purpose, but it needs Review because it handles home activity, face/member records, and security-service changes without enough user control or credential safeguards.

Install only if you understand that it can send household monitoring data, device/user identifiers, authorization tokens, and face/member images to JF Tech cloud APIs. Avoid placing secrets or tokens directly on command lines, require explicit confirmation before disabling security or deleting/updating members, and treat face-image enrollment as requiring household consent.

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/alarm_query.py:107
Finding

Sensitive credentials exposed through command-line arguments

Content
View full analysis

Vulnerability Details

File Locations:

  • scripts/alarm_query.py:107-110
  • scripts/indoor_security.py:100-104
  • scripts/member_manager.py:223-226
  • scripts/stats_query.py:244-247

Vulnerability Type: Sensitive credential exposure through process arguments
Risk Level: Medium

Vulnerable Code

scripts/alarm_query.py:107-110

python
parser.add_argument("--uuid", required=True, help="开放平台用户 uuid")
parser.add_argument("--appkey", required=True, help="应用 appKey")
parser.add_argument("--secret", required=True, help="应用密钥")
parser.add_argument("--auth", required=True, help="用户 token")

scripts/indoor_security.py:100-104

python
parser.add_argument("--uuid", required=True, help="开放平台用户 uuid")
parser.add_argument("--appkey", required=True, help="应用 appKey")
parser.add_argument("--secret", required=True, help="应用密钥")
parser.add_argument("--auth", required=True, help="用户 token (Authorization)")
parser.add_argument("--movecard", type=int, default=7, help="移动卡标识(用于签名)")

scripts/member_manager.py:223-226

python
parser.add_argument("--uuid", required=True, help="开放平台用户 uuid")
parser.add_argument("--appkey", required=True, help="应用 appKey")
parser.add_argument("--secret", required=True, help="应用密钥")
parser.add_argument("--auth", required=True, help="用户 token")

scripts/stats_query.py:244-247

python
parser.add_argument("--uuid", required=True, help="开放平台用户 uuid")
parser.add_argument("--appkey", required=True, help="应用 appKey")
parser.add_argument("--secret", required=True, help="应用密钥")
parser.add_argument("--auth", required=True, help="用户 token")

Technical Analysis

All four command-line interfaces require the JF application secret and authorization token to be supplied directly as process arguments. This conflicts with the environment-variable configuration documented in SKILL.md, while the scripts do not load those documented variab ...[truncated 2877 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove --secret and --auth from the public command-line interfaces.
  2. Load credentials from the documented JF_APP_SECRET and JF_AUTHORIZATION environment variables, validating that they are present without including their values in error messages.
  3. For stronger protection, support an operating-system credential store, keychain, secret manager, or permission-restricted configuration file instead of persistent plaintext environment variables.
  4. If interactive use is required, read secrets using a non-echoing prompt such as Python's getpass, rather than ordinary command-line input.
  5. Keep non-secret selectors such as device serial number and action parameters separate from authentication material.
  6. Ensure verbose and JSON modes never print authorization headers, signatures, application secrets, face images, or other sensitive request content. Apply explicit redaction before logging.
  7. Update all documentation and examples so credentials are never placed in shell commands.
  8. Rotate any application secrets or authorization tokens that may already have appeared in shell histories, process logs, CI logs, or terminal recordings.
  9. Restrict permissions on shell-history files and operational logs, and configure log-retention systems to redact known credential fields.
  10. Add automated tests that verify secrets cannot appear in process arguments, normal output, verbose output, exceptions, or diagnostic logs.
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 (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is presented as an indoor security capability, but it also performs member and face-sample management, including uploading avatars or face images to remote APIs. This is a significant expansion into biometric and identity administration, which raises privacy and abuse concerns if not explicitly disclosed and consented to.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an indoor security capability, but it also performs member and face-sample management, including uploading avatars or face images to remote APIs. This is a significant expansion into biometric and identity administration, which raises privacy and abuse concerns if not explicitly disclosed and consented to.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as an indoor security capability, but it also performs member and face-sample management, including uploading avatars or face images to remote APIs. This is a significant expansion into biometric and identity administration, which raises privacy and abuse concerns if not explicitly disclosed and consented to.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill is presented as an indoor security capability, but it also performs member and face-sample management, including uploading avatars or face images to remote APIs. This is a significant expansion into biometric and identity administration, which raises privacy and abuse concerns if not explicitly disclosed and consented to.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation covers indoor scene monitoring, family activity tracking, alarms, and member management without clear privacy disclosures about the collection, handling, transmission, or storage of sensitive household and biometric-related data. In this context, the absence of data-impact notice is serious because users may expose intimate home occupancy patterns and face images without informed consent.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `SKILL.md` | 技能文档 |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/member_manager.py` | 成员管理脚本 |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill clearly documents shell execution and remote API usage, yet the manifest declares no explicit tool scope or permissions. This creates an authorization gap where a host system or reviewer cannot easily understand that the skill needs command execution and network access, increasing the risk of over-privileged or unexpectedly activated behavior involving sensitive device and account credentials.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest trigger list lacks scope and restriction details, so it is unclear when the skill should activate and what contexts are intended. Ambiguous activation is risky here because the skill interfaces with household monitoring data and administrative APIs using sensitive credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documents destructive and state-changing operations such as deleting members and modifying security-service settings, but it does not clearly warn users about operational or privacy consequences. Without strong notice and confirmation, users may unintentionally remove records, disrupt monitoring coverage, or change alerting behavior for a live household security deployment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad and overlap with ordinary home-safety and family-care language, making accidental invocation more likely. In this skill's context, accidental activation is more dangerous because the skill can access sensitive monitoring functions and potentially modify service settings tied to a household security device.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The function set_switch references movecard when generating the request signature, but movecard is not declared in the function signature or locally defined. This creates a runtime failure path or unintended reliance on external/global state, which can break a security-sensitive state-changing API call and make behavior unpredictable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The switch action changes the indoor security service state remotely, which is a safety-relevant operation, but the code performs it immediately once arguments are provided. There is no confirmation prompt or explicit user-facing warning that this command will enable or disable the protection service before making the API request.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script implements household face/member management operations including add, update, delete, and list, which materially exceeds the manifest’s stated monitoring-oriented purpose. In an indoor security context, managing biometric profiles changes who is recognized by the system and can affect alerts, access decisions, and privacy expectations, creating a capability mismatch that could surprise users or be misused.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code supports creating, modifying, and deleting face/member records even though the described skill purpose is passive indoor security monitoring. These operations can directly alter biometric recognition behavior and household membership state, enabling unauthorized enrollment or removal of people if exposed through the skill without strong access controls and clear justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The add_member path transmits sensitive credentials (app key, secret-derived signature, authorization token) and highly sensitive biometric/member data (face images, avatar) to an external API, but the script provides no explicit disclosure, consent flow, or minimization controls. In a household security setting, undisclosed transmission of biometric data raises significant privacy and compliance risk if users do not understand that enrollment images are being sent off-device.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The delete_member function performs an irreversible deletion request based solely on provided arguments, with no built-in confirmation, dry-run, or warning path. In this context, accidental or unauthorized deletion of member face profiles can disable recognition-based notifications and undermine household security workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code sends device identifiers, user IDs, optional face IDs, and authentication material (uuid, appKey, signature, Authorization token) to a remote HTTPS endpoint. Although network access is central to the script's purpose, there is no visible runtime disclosure, confirmation, or caution that sensitive user/system data will be transmitted off-host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

文档标题、描述、触发词、操作说明与参考内容均为中文,且未说明是否支持其他语言或允许用户选择语言/地区偏好。按照语言/区域政策要求,若强制单一语言而无用户选择或合理业务限定,可能构成自然语言层面的政策问题。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The file and function documentation describe a straightforward alarm-list query, but the implementation at L023-L045 constructs and sends an authenticated POST request to the remote platform API and references movecard, which is not defined in this file. While the network query itself is expected for this skill, the documented intent is incomplete and the signing call does not match the stated simple query behavior, creating a documentation-to-code inconsistency.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file includes Chinese-only docstrings, CLI descriptions, help text, and output messages. Under the natural-language policy rule, forcing a specific language without offering a locale choice or opt-in is a 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

All user-facing descriptions, help text, and output strings are written only in Chinese, which forces a specific language/locale without any opt-in or alternative. The file does not document that it is intentionally region-specific or provide a mechanism for the user to choose language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file’s natural-language content is entirely written in Chinese, including the top-level module docstring and inline documentation, with no indication that language choice is optional. Under the policy for natural-language violations, forcing a specific language without user opt-in can be a locale/language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language description and user-facing strings are written only in Chinese, which effectively forces a specific language/locale without any opt-in or documented justification. This can violate language-choice policy when the skill is not clearly scoped to a Chinese-only audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script's description, help text, and output messages are all hardcoded in Chinese, with no option to select another language or locale. This can violate language/locale policy when tools are expected to respect user language preferences or provide opt-in for a fixed locale.

Content

No source excerpt is available for this finding.