Back to skill

Security audit

aws-infra-free

Security checks for vulnerabilities and agentic risk

Overview

This AWS read-only helper is not malicious, but it asks for broader local authority and configuration changes than its read-only description clearly explains.

Install only if you are comfortable letting the agent run AWS CLI commands against your account. Prefer a temporary, least-privilege role limited to the specific describe/list APIs you need, avoid running the agent as administrator, and use per-command --region rather than changing your default AWS profile unless you intend that persistent local change.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:26
Finding

Excessive Tool Permissions and Unsafe Privilege-Escalation Guidance

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 26–29, 169, 229, and 300
Vulnerability Type: Violation of least privilege
Risk Level: Medium

Evidence

At lines 26–29, the skill requests unrestricted execution and filesystem-write capabilities even though its stated purpose is limited to read-only AWS queries:

yaml
tools:
  - read
  - exec
  - write

At lines 169 and 229, the document recommends attaching the AWS-managed AmazonEC2ReadOnlyAccess policy when an EC2 query is denied. Faithful English translation:

text
Attach the AmazonEC2ReadOnlyAccess policy to the IAM user.

At line 300, the generic permission-error guidance recommends operating-system elevation. Faithful English translation:

text
Check file permissions and run as administrator.

Technical Analysis

The documented functionality consists of fixed, read-only AWS inventory and health queries. General filesystem-write access is not required for those operations. Granting both arbitrary command execution and write access unnecessarily expands the capabilities available to the agent.

The suggested AmazonEC2ReadOnlyAccess managed policy can also grant access to more EC2 metadata and read operations than the specific inventory task requires. A narrowly scoped custom policy should instead contain only the AWS API actions used by this skill.

Finally, advising users to run as an administrator is unsafe because it elevates every command executed by the agent rather than resolving the specific access-control failure. This can turn an otherwise limited command error into a broad local privilege boundary failure.

No malicious payload, credential theft, or direct exploitation logic was found in the project. Exploitation therefore depends on a later compromised prompt, unsafe user input, or unintended command execution while the excessive permissions are active.

Attack Path

  1. A user loads the sk ...[truncated 1413 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove write from the declared tools because the documented read-only AWS queries do not require filesystem modification.
  2. Restrict exec to an allowlist of the documented AWS CLI commands and arguments. Reject shell metacharacters, command substitution, redirection, and unvalidated user-supplied command fragments.
  3. Replace AmazonEC2ReadOnlyAccess with a custom least-privilege IAM policy containing only the required actions, such as:
    • sts:GetCallerIdentity
    • ec2:DescribeInstances
    • ec2:DescribeInstanceStatus
    • s3:ListAllMyBuckets
    • rds:DescribeDBInstances
    • cloudwatch:DescribeAlarms
  4. Scope permissions by account, region, role, and applicable resource conditions where AWS supports such restrictions.
  5. Remove the recommendation to run as administrator. Diagnose the specific denied file or operation and grant only the minimum required permission.
  6. Run the agent under a dedicated unprivileged operating-system account and use a restricted working directory.
  7. Require explicit user confirmation before any operation that changes local configuration, IAM permissions, credentials, or execution privilege.
  8. Prefer temporary role credentials with short session durations over long-lived IAM user credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The user-facing display name, summary, and description are presented entirely in Chinese, and the document continues in Chinese without indicating that other languages are supported. This creates a locale/language constraint that is not framed as optional or region-specific, which can violate language choice policy.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill markets itself as 'read-only' and 'not performing changes', but it instructs users to run aws configure set region, which modifies local AWS CLI configuration. This can mislead users and downstream agents into permitting execution under a weaker trust model than the skill actually requires, causing unintended environment changes or operational mistakes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest declares write capability even though the description emphasizes read-only AWS queries and does not warn users about possible file modifications. In agent environments, exposed write permission expands the attack surface because a compromised or misdirected workflow could alter local files, credentials, scripts, or logs under the guise of a read-only infrastructure check.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill accepts a callback_url for asynchronous completion notifications without warning that data may be transmitted over the network to an arbitrary endpoint. In an agent setting, this can enable unintended exfiltration of resource metadata, execution results, or identifiers if users provide or are induced to use an attacker-controlled callback destination.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill's capability boundary says cross-region queries are unsupported, yet other sections recommend --region us-west-2 and changing the default configured region. This inconsistency can cause policy bypass in agentic contexts where safety decisions rely on the declared boundary, and can lead to unexpected access or disclosure of resources in other regions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.