Back to skill

Security audit

alibabacloud-dataworks-context-graph

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report evaluation and grading activity beyond its stated Context Graph retrieval purpose, along with a concern about subprocess output handling; some analysis is incomplete.

The verdict is suspicious, so review the flagged behavior before installing. In particular, consider whether local evaluation and grading belongs in a Context Graph retrieval skill, and account for the confirmed risk that large subprocess output may consume excessive memory. Scanner analysis was partial: one referenced evaluation document was not fully assessed, so the findings do not establish that the skill is safe.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (24)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied chunk implements an evaluation workflow rather than the declared business-knowledge workflow. It accesses local evaluation resources, writes their hashes into a review file, and runs a grading command. No Context Graph retrieval or interpretation of identifiable Context Graph evidence is shown. The grading script's internals are not supplied, so no additional behavior is inferred.

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 41)May include surrounding context.

md
- Read [Offline evaluation](references/evaluation.md) only when authoring, operating, or grading evaluations. A candidate answering a business question must nev

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/interpretation.md (reported line 69)May include surrounding context.

md
e establishes dataset/business scope, one snapshot/version, all relevant pages, primary-key deduplication, consistent date fields/timezone/bounds, and business-row completeness. A point may contain many rows, summaries, or indexes; one catalog entry is not one business row. The end of `ListKnowledgePoints` pagination proves only the catalog traversal ended. Do not invent totals/snapshot guarantees absent from the API.

`RetrieveKnowledgePoints` has no pagination; MaxResults is a Top-N cap. Even without Warnings, hit counts are not a global denominator. For incomplete scope, unread pages, inconsistent versions, or coverage warnings, report only the read batch/sample and gaps, not exact global statistics. A sum over Top-N is not a complete business sum.

Do not execute SQL. Deterministic local calculations may use authorized complete records meeting these conditions. State full source identities, snapshot, filters, deduplication keys, date rules, formula, and denominator; preserve values

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/interpretation.md (reported line 114)May include surrounding context.

md
| `RESULT_TRUNCATED` | Some internal results were not converted to public points; this is not normal Top-N; report the limit/RequestId |
| `AMBIGUITY_LIMIT_REACHED` | Candidate limit reached; request a clearer business entity or scope |

Warnings justify only bounded reads for identities linked to contract gaps/truncation. Do not reread known fields solely to clear warnings, blindly raise MaxResults, or retry forever. Local checks cannot erase SEARCH_SCOPE_INCOMPLETE or manufacture complete search coverage. Preserve warnings and their impact. Normal MaxResults saturation alone does not create degradation warnings; no warning does not prove exhaustive retrieval.

## Sources and temporary links

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/interpretation.md (reported line 128)May include surrounding context.

--query 'Original metric definition document' --knowledge-base-ids '["kb-example"]'

text

DownloadUrl is a temporary HTTPS access credential valid for 2 hours; ExpirationTime is Unix milliseconds. Display it only for the user's current explicit request. Do not cache, widely forward, treat it as a resource ID, derive storage paths, or pass it to point get. Read again after expiration.

The link targets the complete document file used for building, not the hit fragment, and promises no historical snapshot. Retrieval permission does not imply complete original-file access. Returned content remains usable when links are missing, unavailable, or expired. This package never downloads source files.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% 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/context_graph.py (reported line 116)May include surrounding context.

python
}
        print(json.dumps(payload, ensure_ascii=False, indent=2))
    action = None
    environ = dict(os.environ)
    secrets = tuple(environ.get(name, "") for name in CREDENTIAL_ENV.values())
    try:
        args = parser().parse_args(argv)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% 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/runtime.py (reported line 80)May include surrounding context.

python
validate_backend(backend, profile)
    if profile is not None and credentials_file is not None:
        raise SkillError("InvalidParameter", "A CLI profile cannot be combined with an explicit credentials file.")
    environment = dict(os.environ)
    resolve_endpoint(region, environment.get("DATAWORKS_ENDPOINT"), allowed_hosts=endpoint_allowlist(environment))
    if credentials_file is not None:
        environment.update(read_credentials_file(credentials_file))

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/runtime.py (reported line 117)May include surrounding context.

python
"SSL_CERT_FILE", "SSL_CERT_DIR"}
    pip_network = {"PIP_INDEX_URL", "PIP_EXTRA_INDEX_URL", "PIP_TRUSTED_HOST", "PIP_CERT", "PIP_CLIENT_CERT",
                   "PIP_PROXY", "PIP_TIMEOUT", "PIP_DEFAULT_TIMEOUT", "PIP_RETRIES", "PIP_NO_INDEX", "PIP_FIND_LINKS"}
    environment = {key: value for key, value in os.environ.items() if key in allowed or key in pip_network}
    # Disable system/user pip configuration so target/prefix/user/log cannot escape the dedicated environment.
    environment["PIP_CONFIG_FILE"] = os.devnull
    environment["PIP_REQUIRE_VIRTUALENV"] = "true"

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

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 · SKILL.md (reported line 47)May include surrounding context.

md
ime or attempting a read.

The user supplies the business question and, when fresh cloud access is needed, the necessary region/endpoint and either existing credentials or a configured CLI identity when selecting aliyun mode. Reuse an existing CLI profile without requesting its token values. Derive the answer requirements internally. Generate and run the appropriate local job yourself: source selections for unstructured knowledge, or AnswerContract and bindings for TSV records and calculations. Do not ask the user to fill in JSON.

For an explicitly unattended task, finish using the authorized evidence and tools available in this run. Do not request or wait for human replies. If scope, applicability, or a material fact is unresolved, list the supported alternatives and unknowns, state the resulting limitation, and end the answer. Do not invent a user choice or connection configuration. When fresh knowledge is requested, check all prerequisites that apply to the authorized read interfac

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

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

md
retrievals (derived/focused included), 6 detail reads (including pages), and 2 fallback catalog pages of at most 10 items each. Typical basic questions use 1-3 calls and associations 3-6; these estimates do not raise the limits. Verify each hop; compute aggregates locally from complete content; do not expand scope to obtain a desired conclusion. Warnings justify only necessary reads of identities related to missing/truncated evidence. Do not blindly increase MaxResults, reread known fields, or retry indefinitely. Report gaps when the budget is insufficient.
5. Combine complementary graph candidates when appropriate. In interactive tasks, ask the user only about ambiguities that materially change the answer. In unattended tasks, use an explicitly authorized choice source if available. Otherwise enumerate the supported meanings and unresolved applicability in the final answer without asking for a reply. Never silently choose the first conflicting candidate. `FocusObjects` must contain 1

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · SKILL.md (reported line 57)May include surrounding context.

md
f identities related to missing/truncated evidence. Do not blindly increase MaxResults, reread known fields, or retry indefinitely. Report gaps when the budget is insufficient.
5. Combine complementary graph candidates when appropriate. In interactive tasks, ask the user only about ambiguities that materially change the answer. In unattended tasks, use an explicitly authorized choice source if available. Otherwise enumerate the supported meanings and unresolved applicability in the final answer without asking for a reply. Never silently choose the first conflicting candidate. `FocusObjects` must contain 1-2 actually returned, confirmed-applicable `GRAPH` identities within the original scope. When the question asks to continue from an object discovered in a graph detail, build its focus triple from the returned node: use its KnowledgeBaseId, the knowledge point type GRAPH, and its NodeId as Id. The node's business Type (such as TABLE) is separate. Carry that triple into the next retriev

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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/authentication.md (reported line 33)May include surrounding context.

md
y local conditions. It calls no API, does not read stdin, and does not consume session STS. `RuntimeReady` means only that Python and exact dependency versions active on this platform satisfy requirements. `CredentialsConfigured` checks only the shape of injected or explicitly supplied file credentials; `LiveAuthVerified` is always false. Missing environment credentials produce `not_configured` without invalidating runtime checks. If the user already supplied session STS, continue through stdin without asking again. Unsupported Python/dependencies or malformed configured credentials cause a nonzero exit. Python 3.9 can run doctor to report the 3.10 minimum, not business operations in an unsupported runtime.

`setup` first reuses a helper-owned cache with matching pinned dependencies. Otherwise it checks existing Python 3.10-3.14 executables and the current interpreter within bounds; it does not download Python or install interpreter managers. The default dedicated directory is `${XDG_C

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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/authentication.md (reported line 55)May include surrounding context.

:"","SecurityToken":""}

text

Send this JSON **only through standard input**, never positional arguments, environment-assignment commands, shell `echo`/here-doc text, or temporary credential files. Do not echo values in tool output, final answers, or debug logs. Prefer host secret-input or existing secret-injection facilities. If stdin is unavailable, already-injected environment variables below are an option; never silently persist credentials to bypass a limitation. Use an already-provided session triple without asking the user to resend it or configure another identity.

The script accepts at most 64 KiB of UTF-8 JSON with exactly these three nonempty string fields; duplicate keys, whitespace, and control characters are rejected. Triple mode replaces the entire environment credential set without filling missing fields or modifying `os.environ`. Nothing is persisted after process exit. Help and invalid business-parameter checks do not read credentials.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

md
ide index. Its schema remains unchanged. Definitions and generated inputs have `execution_status=not_run`; they are not candidate execution results.

Each candidate prompt contains the original natural business question, concise local-answer execution context, raw successful synthetic knowledge responses, and a delivery reminder after the JSON. The first tool action reads the installed `alibabacloud-dataworks-context-graph` entry point. The known AgentHub session-workspace entry point is `.qwen/skills/alibabacloud-dataworks-context-graph/SKILL.md`; the helper is `scripts/knowledge_answer.py` under that same installed directory. Candidates run the helper by its absolute installed path. Assemble the original responses and selected source fields first, then send the full JSON job to new-job --from-stdin under the host-approved existing outputs parent. Render from its returned private path with --full-selected-fields and the original response-batch SHA256. The builder computes that fingerp

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · references/interpretation.md (reported line 114)May include surrounding context.

md
| `RESULT_TRUNCATED` | Some internal results were not converted to public points; this is not normal Top-N; report the limit/RequestId |
| `AMBIGUITY_LIMIT_REACHED` | Candidate limit reached; request a clearer business entity or scope |

Warnings justify only bounded reads for identities linked to contract gaps/truncation. Do not reread known fields solely to clear warnings, blindly raise MaxResults, or retry forever. Local checks cannot erase SEARCH_SCOPE_INCOMPLETE or manufacture complete search coverage. Preserve warnings and their impact. Normal MaxResults saturation alone does not create degradation warnings; no warning does not prove exhaustive retrieval.

## Sources and temporary links

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
93% confidence
Finding

The argument-list invocation does not itself introduce shell injection, but capture_output=True buffers all stdout and stderr before MAX_OUTPUT_BYTES is checked. An oversized knowledge response or excessive CLI output can exhaust agent-host memory before the supposed size limit takes effect; the timeout does not bound the volume buffered during that interval.

Content

Scanner excerpt · scripts/context_graph_cli_transport.py (reported line 50)May include surrounding context.

python
def _run(arguments, environment, timeout):
    try:
        result = subprocess.run(arguments, env=environment, stdin=subprocess.DEVNULL,
                                capture_output=True, text=True, encoding="utf-8",
                                timeout=timeout, check=False)
    except subprocess.TimeoutExpired:

Tainted flow: 'arguments' from os.environ.get (line 71, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/context_graph_cli_transport.py (reported line 50)May include surrounding context.

python
def _run(arguments, environment, timeout):
    try:
        result = subprocess.run(arguments, env=environment, stdin=subprocess.DEVNULL,
                                capture_output=True, text=True, encoding="utf-8",
                                timeout=timeout, check=False)
    except subprocess.TimeoutExpired:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/runtime.py (reported line 126)May include surrounding context.

python
def run_local(arguments, timeout):
    try:
        return subprocess.run(arguments, env=installer_environment(), capture_output=True,
                              text=True, check=False, timeout=timeout)
    except (OSError, subprocess.SubprocessError):
        raise SkillError("RuntimePreparationFailed", "Local runtime preparation failed or timed out; check Python, venv, and package-index connectivity.") from None

Tainted flow: 'arguments' from os.environ.get (line 226, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/runtime.py (reported line 126)May include surrounding context.

python
def run_local(arguments, timeout):
    try:
        return subprocess.run(arguments, env=installer_environment(), capture_output=True,
                              text=True, check=False, timeout=timeout)
    except (OSError, subprocess.SubprocessError):
        raise SkillError("RuntimePreparationFailed", "Local runtime preparation failed or timed out; check Python, venv, and package-index connectivity.") from None

Scope Creep

Low
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

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

md
iness rules; without sufficient evidence, state what is unknown.
4. Bound follow-up reads: by default, at most **12 logical API calls per question**, including initial retrieval; at most 2 further retrievals (derived/focused included), 6 detail reads (including pages), and 2 fallback catalog pages of at most 10 items each. Typical basic questions use 1-3 calls and associations 3-6; these estimates do not raise the limits. Verify each hop; compute aggregates locally from complete content; do not expand scope to obtain a desired conclusion. Warnings justify only necessary reads of identities related to missing/truncated evidence. Do not blindly increase MaxResults, reread known fields, or retry indefinitely. Report gaps when the budget is insufficient.
5. Combine complementary graph candidates when appropriate. In interactive tasks, ask the user only about ambiguities that materially change the answer. In unattended tasks, use an explicitly authorized choice source if available. Otherwis

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/context_graph.py (reported line 123)May include surrounding context.

python
diagnostics = args.diagnostics
        action = args.action
        validate_backend(args.backend, args.profile)
        params = {target: getattr(args, source) for source, target in PARAMETERS.items()
                  if hasattr(args, source)}
        params = validate_request(action, params)
        resolve_endpoint(args.region, environ.get("DATAWORKS_ENDPOINT"), allowed_hosts=endpoint_allowlist(environ))

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/knowledge_answer.py (reported line 97)May include surrounding context.

python
"""Never block on a FIFO or follow an input symlink; read at most the input budget."""
    descriptor = None
    try:
        require(all(type(getattr(os, name, None)) is int for name in ("O_NONBLOCK", "O_NOFOLLOW")),
                "UnsupportedPlatform")
        descriptor = os.open(path, os.O_RDONLY | os.O_NONBLOCK | os.O_NOFOLLOW)
        info = os.fstat(descriptor)

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/knowledge_answer.py (reported line 126)May include surrounding context.

python
parent = child = None
    try:
        require(os.name == "posix" and hasattr(os, "fchmod")
                and all(type(getattr(os, flag, None)) is int for flag in ("O_NOFOLLOW", "O_DIRECTORY"))
                and {os.open, os.mkdir} <= os.supports_dir_fd, "UnsupportedPlatform")
        parent = os.open(directory, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW)
        name = "knowledge-answer-" + secrets.token_hex(16)