Back to skill

Security audit

alibabacloud-sls-data-agent-qa

Security checks for vulnerabilities and agentic risk

Overview

The skill provides documented, read-only Alibaba Cloud log analysis, with optional local evidence files and no observed malicious behavior.

Use a read-only RAM identity limited to the models and Logstores you intend to analyze, and verify any endpoint override before connecting. Saved evidence contains log data, so protect and remove it when no longer needed. This review inspected all bundled files but did not execute cloud requests or verify installed dependencies and live permission enforcement.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (21)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The code's primary purpose is model-readiness inspection, which the description explicitly excludes. It calls get_generation_status and queries model storage nodes rather than using semantic definitions to analyze logs or answer business questions. Although read-only and potentially useful as a prerequisite, this chunk directly implements the excluded model-inspection capability.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Semantic catalog reads and log queries align with the declared business-analysis purpose. However, listing models and inspecting their generation status or readiness are explicit model-inspection capabilities, contradicting the description's exclusion of inspecting models themselves. Storage resolution, index reads, and optional evidence saving can support log analysis and are not independently treated as mismatches. The discrepancy is additional read-only model inspection, not model management or modification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The command model_qa.py source-model status performs model inspection, which the declared description explicitly excludes. The supplied chunk does not query or analyze log data or answer business questions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The command performs a model-readiness assessment rather than querying or analyzing log data using model semantics. This directly conflicts with the exclusion of inspecting models. The supplied chunk does not reveal the script's internal checks or establish any model modification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code's primary output is an inventory of model contents and relationships, including member counts and unresolved elements. This constitutes model inspection, which the description explicitly excludes. Although semantic definitions can support log analysis, this chunk produces a catalog overview rather than resolving definitions for a log query or analyzing log data. It performs no model mutation or external resource access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The query_model method aligns with the declared data-querying purpose. However, list_models exposes model enumeration and metadata discovery, which constitutes inspecting models themselves and conflicts with the description's explicit exclusion. No model modification or management operations are shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The query functionality is consistent with the declared model-assisted analysis purpose. However, get_generation_status explicitly exposes model-status inspection, which the description excludes. The supplied code does not show this status operation being used merely as an internal prerequisite for querying.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The function's direct purpose is retrieving model catalog contents rather than querying log data or answering business questions. Although semantic-definition lookup could support the declared analytical workflow, this function exposes a model-inspection operation that conflicts with the description's explicit boundary. No model modification or management behavior is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The visible command requests an overview of the source-model catalog, which is model inspection explicitly excluded by the description. It does not visibly query or analyze log data or answer a business question. The underlying script is not supplied, so this assessment is limited to the invoked command.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The supplied function directly discovers and summarizes model catalog contents rather than querying log data or answering business questions. Although semantic discovery can support the declared workflow, this implementation retrieves model specifications and generates an overview, crossing the description's explicit exclusion of model inspection. No model modification is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The supplied command targets a model's catalog overview rather than querying or analyzing log data. Although accessing semantic definitions can support the declared purpose, this command directly requests model-level overview information, which falls within the explicitly excluded inspection capability. The chunk does not show model modification or management.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The command directly retrieves model catalog content rather than querying or analyzing log data. Although semantic-definition retrieval could support the declared analytical workflow, this standalone catalog-get operation exposes model inspection, which the description expressly excludes. No model modification or management behavior is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The supplied command performs an index-inspection operation, not semantic business analysis or a log-data query. Although index metadata could support query preparation, the chunk shows only its retrieval and no connection to the declared analysis workflow. The script implementation is not supplied, so its precise output and any additional behavior cannot be verified.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/model_qa.py (reported line 221)May include surrounding context.

python
message = str(error)
    message = str(message or "Request failed; check credentials, endpoint and network access")
    # Do not print SDK objects/tracebacks, which may contain signed requests.
    for key, value in os.environ.items():
        if value and any(word in key.upper() for word in ("SECRET", "TOKEN", "ACCESS_KEY")):
            message = message.replace(value, "[REDACTED]")
    result = {"code": str(code), "message": message}

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/sql/incomplete.md (reported line 13)May include surrounding context.

md
- Do not automatically switch an ordinary indexed query to SCAN because its results are incomplete.
- Use time partitioning only when partial results can be combined to reproduce the original query result. The windows must cover the original time range without overlap.

Do not automatically modify indexes or resource configuration.

Standalone model-listing and generation-status commands exceed the manifest's explicit exclusion of model inspection.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The manifest permits using model definitions to answer business questions but explicitly excludes inspecting models themselves. In scripts/model_qa.py, L129–L130 execute a standalone Context Model listing, and L139–L140 retrieve Source Model generation status; these expose model inventory and lifecycle information rather than retrieving semantic definitions or analyzing logs.

Content

No source excerpt is available for this finding.

The client exposes Source Model generation-status inspection despite the manifest excluding model inspection.

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

At L10-L11, get_generation_status calls GetSourceModelStatus rather than retrieving semantic definitions or analyzing log data. This exposes model lifecycle inspection, which the manifest explicitly excludes; the semantic query operation at L13-L16 is separately consistent with the stated purpose.

Content

No source excerpt is available for this finding.

The readiness checker inspects model-generation lifecycle state and recommends model creation or regeneration.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

The function inspects generation task state and element counts at L13-L27, then evaluates model-generation completeness and storage-node generation status. Its creation and regeneration recommendations at L36, L55, and L61 make this a model-readiness diagnostic, beyond the manifest's semantic QA purpose and explicit exclusion of inspecting models themselves; it does not actually initiate those operations.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/model_qa.py (reported line 152)May include surrounding context.

python
if args.operation == "search":
        return catalog.search(args.search_text, parse_name_list(args.source_tags), args.limit, args.max_bytes)
    if args.operation == "get":
        element_type, element_name = next((typ, getattr(args, argument)) for typ, argument in ELEMENT_SELECTORS.items()
                                          if getattr(args, argument, None) is not None)
        return catalog.get(element_type, element_name, parse_name_list(args.member_names), args.max_bytes)
    raise CommandError("InvalidParameter", "Unknown catalog operation")

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/model_qa.py (reported line 153)May include surrounding context.

python
return catalog.search(args.search_text, parse_name_list(args.source_tags), args.limit, args.max_bytes)
    if args.operation == "get":
        element_type, element_name = next((typ, getattr(args, argument)) for typ, argument in ELEMENT_SELECTORS.items()
                                          if getattr(args, argument, None) is not None)
        return catalog.get(element_type, element_name, parse_name_list(args.member_names), args.max_bytes)
    raise CommandError("InvalidParameter", "Unknown catalog operation")