Back to skill

Security audit

alibabacloud-flink-python-job-submission

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a Flink deployment workflow, but it asks users or agents to run unverified installer/update commands and grants broader cloud permissions than the creation workflow needs.

Install only after reviewing the Aliyun CLI installer/update process and granting a minimal RAM policy for the specific operation. Prefer a pinned, verified CLI installation, an isolated Python virtual environment with pinned dependencies, and RAM permissions limited to DescribeVvpInstances, CreateDeployment, GetDeployment, and ListEngineVersionMetadata only when needed; keep start/stop/update/log/API-proxy permissions in a separate operational workflow.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:22
Finding

Unverified Remote Shell Script Download and Execution

Content
View full analysis
Remediation
View remediation
' 'aliyun-cli-installer.sh' | sha256sum -c - /bin/bash aliyun-cli-installer.sh ``` The digest must come from a trusted, version-controlled source rather than from the same mutable download location. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:30
Finding

Unpinned Python Dependencies Installed Without Integrity Verification

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/ram-policies.md:13
Finding

RAM Permission Guidance Exceeds the Skill's Declared and Implemented Scope

Content
View full analysis
**[MUST] Permission Failure Handling:** When any command or API call fails due to permission errors at any point during execution, follow this process: > 1. Read `references/ram-policies.md` to get the full list of permissions required by this SKILL > 2. Use `ram-permission-diagnose` skill to guide the user through requesting the necessary permissions > 3. Pause and wait until the user confirms that the required permissions have been granted ``` The referenced full policy includes the following permissions in `references/ram-policies.md:13-24`: ```text | stream:UpdateDeployment | Write | Update Python deployment configuration | | stream:ListSavepoints | List | Check for completed checkpoint/savepoint state before choosing a default startup strategy | | stream:StartJobWithParams | Write | Start job instance | | stream:StopJob | Write | Stop running job | | stream:GetLatestJobStartLog | Read | Get JM startup log | | stream:FlinkApiProxy | Read | Proxy to Flink REST API (logs/metrics) | | stream:ListDeployments | List | List deployments | ### OSS (user-managed storage only) | RAM Action | Operation Type | Purpose | |---|---|---| | oss:PutObject | Write | Upload artifacts to OSS | | oss:GetObject | Read | Verify uploaded artifacts | | oss:ListObjects | List | List objects in bucket | | oss:ListBuckets | List | Discover OSS buckets | ``` ### Technical Analysis The declared scope in `SKILL.md` is creation of a new Python deployment and verification of its saved configuration. It explicitly routes existing deployment updates, starts, stops, logs, and metrics to a different Skill. The local script implements only: - Workspace storag ...[truncated 2516 chars]
Remediation
View remediation
/*`. 7. Grant `oss:PutObject`, object metadata/read access, and listing access only where each operation is demonstrably required. 8. Document separate policies for fully managed storage and user-managed OSS rather than combining their privileges. 9. Require review of the concrete RAM policy resource scope before the user grants it. ]]>
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Self-Modification

High
Category
Rogue Agent
Confidence
98% confidence
Finding

The skill instructs the agent to execute a remote installation script via curl piped to /bin/bash and also to self-update the Alibaba CLI/plugin. That introduces an unpinned, network-fetched code-execution path and mutable tooling state inside the session; if the upstream source, transport, mirror, or plugin channel is compromised, the agent could run attacker-controlled code with the user's privileges.

Content

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

md
**Pre-check: Aliyun CLI >= 3.3.3 required**
> [MUST] Verify: `aliyun version` — must be >= 3.3.3.
> - **First install or major upgrade:** `/bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)"`
> - **Routine update (CLI >= 3.3.5):** `aliyun upgrade` — prefer this built-in self-update over re-running the install script.
> - See `references/cli-installation-guide.md` for full installation instructions.

Before the first non-version `aliyun` command, apply the conversation-scoped

Undeclared Tool Scope

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.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest description says to route deletion-only requests elsewhere, implying this skill should not handle deletion. However, the Scope section groups 'deletion' among operations to use another Flink workspace skill for, which creates an inconsistent statement of what this skill is responsible for versus what adjacent documentation says about operation routing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The guide instructs users to execute a shell script fetched directly from the internet via curl piped to bash, without any integrity verification, signature check, pinning, or explicit warning. If the remote host, CDN path, DNS resolution, TLS trust chain, or setup script is compromised, users could execute arbitrary code on their systems during installation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documented console path includes /zh/, which forces a specific language locale in the UI. The file does not offer a user opt-in, alternative locale, or justification that this skill is region- or language-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented clickable VVP configuration link hardcodes /zh/ in the path, which imposes a specific locale in the user-facing console experience. The file does not offer a language choice or explain why Chinese is required for this workflow.

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

python
"""Store one option value and reject a second occurrence."""

    def __call__(self, parser, namespace, values, option_string=None):
        if getattr(namespace, self.dest, None) is not None:
            parser.error(f'{option_string} may be specified only once')
        setattr(namespace, self.dest, values)

Static analysis

No suspicious patterns detected.