T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/ossfs_mount_diagnosis.py:568- Finding
Account-Wide Bucket Enumeration Exceeds the Scope of Single-Bucket Diagnosis
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed read-only Alibaba Cloud OSS mount diagnostic, but it uses broad cloud-account metadata access and recommends an unpinned host CLI upgrade that users should review before installing.
Install only with a narrowly scoped temporary Alibaba Cloud role where possible. Expect the skill to call OSS and STS read-only APIs, possibly list bucket names visible to the credential, print account/principal metadata in reports, fetch official docs, and write a small docs cache. Avoid following the unpinned aliyun upgrade --yes instruction without separately verifying the CLI source/version, and treat privileged-container and metadata-endpoint steps as manual last-resort diagnostics.
scripts/ossfs_mount_diagnosis.py:568Account-Wide Bucket Enumeration Exceeds the Scope of Single-Bucket Diagnosis
scripts/ossfs_mount_diagnosis.py:600Unconditional Caller Identity Collection Exposes Account and Principal Identifiers
SKILL.md:96Unattended Upgrade to an Unpinned Latest CLI Version Creates Supply-Chain Risk
The skill is advertised as read-only mount diagnosis, but the specification also includes outbound documentation fetches and local cache writes under ~/.cache, which are not clearly disclosed in the top-level purpose. This mismatch can mislead operators about what data leaves the environment and what local state is modified, undermining trust and review assumptions.
The skill is advertised as read-only mount diagnosis, but the specification also includes outbound documentation fetches and local cache writes under ~/.cache, which are not clearly disclosed in the top-level purpose. This mismatch can mislead operators about what data leaves the environment and what local state is modified, undermining trust and review assumptions.
The skill is advertised as read-only mount diagnosis, but the specification also includes outbound documentation fetches and local cache writes under ~/.cache, which are not clearly disclosed in the top-level purpose. This mismatch can mislead operators about what data leaves the environment and what local state is modified, undermining trust and review assumptions.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 1. Credential file / credential chain
- ossfs 1.0: credential file `/etc/passwd-ossfs`, line format
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 1. Credential file / credential chain
- ossfs 1.0: credential file `/etc/passwd-ossfs`, line format
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 1. Credential file / credential chain
- ossfs 1.0: credential file `/etc/passwd-ossfs`, line format
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 1. Credential file / credential chain
- ossfs 1.0: credential file `/etc/passwd-ossfs`, line format
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 1. Credential file / credential chain
- ossfs 1.0: credential file `/etc/passwd-ossfs`, line format
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 1. Credential file / credential chain
- ossfs 1.0: credential file `/etc/passwd-ossfs`, line format
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 1. Credential file / credential chain
- ossfs 1.0: credential file `/etc/passwd-ossfs`, line format
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
Recommending docker run --privileged=true is dangerous because it grants the container broad host-equivalent capabilities and can enable container escape or host compromise if followed in an unsafe environment. Even though the skill is read-only and cites official guidance, embedding a high-risk privileged-container workaround without strong least-privilege framing can lead users to adopt an unnecessarily dangerous configuration.
module and matching libfuse. `fuse: device not found, try 'modprobe fuse'`
inside a container means the container lacks FUSE access - the official
guidance is running the container with elevated privileges
(`docker run --privileged=true ...`) or providing `/dev/fuse` (ossfs FAQ).
- `ossfs: error while loading shared libraries: libcrypto.so.1.1 ...` =
installation package / OS mismatch - install the package matching the OS.
- ossfs only supports Linux (CentOS/Rocky/Alibaba Cloud Linux/Ubuntu/
The document instructs checking the cloud metadata endpoint http://100.100.100.200/..., which is a sensitive internal service. In many agent or tool-using contexts, guidance that encourages access to metadata endpoints can normalize SSRF-like patterns or lead to unintended exposure of instance role information if later operationalized by automation.
| `There is no enough disk space for used as cache(or temporary) directory` | tmp_space | free space on /tmp < `multipart_size * parallel_count`; shrink `multipart_size` or free space (guidance) |
| `Input/Output error` copying large files | io_error_bigfile | high disk load from large-part copying; lower `parallel_count` / `multipart_size`, or use ossutil multipart instead |
| `NSS error -8023` (CentOS 7.x HTTPS mount, ossfs >= 1.91.5; also `ls` Input/Output error) | nss_old | outdated NSS library; `yum update nss` then remount (guidance) |
| ram_role mount fails on ossfs >= 1.91.7 | imdsv2 | check `curl http://100.100.100.200/latest/meta-data/ram/security-credentials/<role>`; if reachable, add `-o disable_imdsv2` (guidance) |
| uploaded files all get Content-Type `application/octet-stream` | mime_missing | `/etc/mime.types` absent; install `mime-support`/`mailcap` or add the file, then remount |
| a folder object shows up as a plain file | folder_misrec | folder object has non-zero size or wrong Content-Type; mount with `-ocomplement_stat` or fix/remove the object via ossutil |
Potential security issue detected. Manual review is recommended.
"vars + ossfs2.conf with '--' prefixed keys (ossfs 2.0); "
"(2) credential account owns the bucket; (3) endpoint region "
"matches the bucket location; (4) FUSE kernel module available "
"(containers need /dev/fuse or --privileged); (5) mountpoint "
"exists and is empty (see "
"references/ossfs-mount-knowledge.md).")
The skill requires shell, network, environment access, and filesystem read/write, but it does not declare an explicit tool scope or permission boundary. That creates unnecessary ambient authority: a runtime or orchestrator may grant broader capabilities than users expect, increasing the blast radius if the skill is misused or its scripts are compromised.
Despite prohibiting certain commands, the skill explicitly instructs the agent to execute local scripts and shell commands, and no concrete sandbox/tool allowlist is declared in metadata. In practice this means the skill relies on prose restrictions instead of enforceable execution boundaries, leaving room for unintended command execution paths in environments that expose general shell access.
## Absolute Rules
1. **ABSOLUTE PROHIBITION (no execution):** Under **NO** circumstances may you execute, or generate for direct execution, any mount-class command - `ossfs`, `ossfs2`, `fusermount`, `mount`/`umount`, `modprobe fuse`, `kubectl apply`, or any command that changes bucket configuration (including PutBucketArchiveDirectRead, PutBucketPolicy, ACL changes). All corrective steps are output as MANUAL GUIDANCE for the user to run themselves.
2. **ABSOLUTE PROHIBITION (read-only enforcement):** Never generate, write, or execute any command/script calling a mutating OSS API - e.g. `PutBucket*`, `DeleteBucket*`, `PutObject*`, `DeleteObject*`, RestoreObject, or any ACL/policy change, including commands "for the user to run manually" beyond the manual guidance allowed by rule 1's scope.
3. **MANDATORY entry-point enforcement:** All cloud-side checks MUST be performed by running the scripts under `scripts/` (`ossfs_mount_diagnosis.py` as the entry, `sts_token.py` for identity). The Agent is forbidden from assembling its own ossutil / SDK / curl commands against the OSS control plane or bypassing the scripts - the scripts embed timeout, error degradation, and observability guarantees that ad-hoc commands lack. Read the script output, interpret it, and compose the report; do not re-implement the queries.
4. **ABSOLUTE PROHIBITION (credential handling):** Never read, print, or pass AK/SK/STS tokens explicitly. The OSS SDK resolves credentials exclusively from the environment variables of the default credential chain; the identity check uses the aliyun CLI default credential chain. Never accept AK/SK from the user or from another script, and never ask the user to paste them into the conversation.
5. **NO FABRICATION:** Every conclusion must be grounded in data actually returned by GetBucketInfo / ListBuckets / GetCallerIdentity or in the documented knowledge of `references/`. If a query fails or returns empty, record it and state the limitation - never invent bucket l
...[truncated 24 chars]
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.
1. **ABSOLUTE PROHIBITION (no execution):** Under **NO** circumstances may you execute, or generate for direct execution, any mount-class command - `ossfs`, `ossfs2`, `fusermount`, `mount`/`umount`, `modprobe fuse`, `kubectl apply`, or any command that changes bucket configuration (including PutBucketArchiveDirectRead, PutBucketPolicy, ACL changes). All corrective steps are output as MANUAL GUIDANCE for the user to run themselves.
2. **ABSOLUTE PROHIBITION (read-only enforcement):** Never generate, write, or execute any command/script calling a mutating OSS API - e.g. `PutBucket*`, `DeleteBucket*`, `PutObject*`, `DeleteObject*`, RestoreObject, or any ACL/policy change, including commands "for the user to run manually" beyond the manual guidance allowed by rule 1's scope.
3. **MANDATORY entry-point enforcement:** All cloud-side checks MUST be performed by running the scripts under `scripts/` (`ossfs_mount_diagnosis.py` as the entry, `sts_token.py` for identity). The Agent is forbidden from assembling its own ossutil / SDK / curl commands against the OSS control plane or bypassing the scripts - the scripts embed timeout, error degradation, and observability guarantees that ad-hoc commands lack. Read the script output, interpret it, and compose the report; do not re-implement the queries.
4. **ABSOLUTE PROHIBITION (credential handling):** Never read, print, or pass AK/SK/STS tokens explicitly. The OSS SDK resolves credentials exclusively from the environment variables of the default credential chain; the identity check uses the aliyun CLI default credential chain. Never accept AK/SK from the user or from another script, and never ask the user to paste them into the conversation.
5. **NO FABRICATION:** Every conclusion must be grounded in data actually returned by GetBucketInfo / ListBuckets / GetCallerIdentity or in the documented knowledge of `references/`. If a query fails or returns empty, record it and state the limitation - never invent bucket locations, storage c
...[truncated 25 chars]
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.
1. **ABSOLUTE PROHIBITION (no execution):** Under **NO** circumstances may you execute, or generate for direct execution, any mount-class command - `ossfs`, `ossfs2`, `fusermount`, `mount`/`umount`, `modprobe fuse`, `kubectl apply`, or any command that changes bucket configuration (including PutBucketArchiveDirectRead, PutBucketPolicy, ACL changes). All corrective steps are output as MANUAL GUIDANCE for the user to run themselves.
2. **ABSOLUTE PROHIBITION (read-only enforcement):** Never generate, write, or execute any command/script calling a mutating OSS API - e.g. `PutBucket*`, `DeleteBucket*`, `PutObject*`, `DeleteObject*`, RestoreObject, or any ACL/policy change, including commands "for the user to run manually" beyond the manual guidance allowed by rule 1's scope.
3. **MANDATORY entry-point enforcement:** All cloud-side checks MUST be performed by running the scripts under `scripts/` (`ossfs_mount_diagnosis.py` as the entry, `sts_token.py` for identity). The Agent is forbidden from assembling its own ossutil / SDK / curl commands against the OSS control plane or bypassing the scripts - the scripts embed timeout, error degradation, and observability guarantees that ad-hoc commands lack. Read the script output, interpret it, and compose the report; do not re-implement the queries.
4. **ABSOLUTE PROHIBITION (credential handling):** Never read, print, or pass AK/SK/STS tokens explicitly. The OSS SDK resolves credentials exclusively from the environment variables of the default credential chain; the identity check uses the aliyun CLI default credential chain. Never accept AK/SK from the user or from another script, and never ask the user to paste them into the conversation.
5. **NO FABRICATION:** Every conclusion must be grounded in data actually returned by GetBucketInfo / ListBuckets / GetCallerIdentity or in the documented knowledge of `references/`. If a query fails or returns empty, record it and state the limitation - never invent bucket locations, storage c
...[truncated 25 chars]
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.
1. **ABSOLUTE PROHIBITION (no execution):** Under **NO** circumstances may you execute, or generate for direct execution, any mount-class command - `ossfs`, `ossfs2`, `fusermount`, `mount`/`umount`, `modprobe fuse`, `kubectl apply`, or any command that changes bucket configuration (including PutBucketArchiveDirectRead, PutBucketPolicy, ACL changes). All corrective steps are output as MANUAL GUIDANCE for the user to run themselves.
2. **ABSOLUTE PROHIBITION (read-only enforcement):** Never generate, write, or execute any command/script calling a mutating OSS API - e.g. `PutBucket*`, `DeleteBucket*`, `PutObject*`, `DeleteObject*`, RestoreObject, or any ACL/policy change, including commands "for the user to run manually" beyond the manual guidance allowed by rule 1's scope.
3. **MANDATORY entry-point enforcement:** All cloud-side checks MUST be performed by running the scripts under `scripts/` (`ossfs_mount_diagnosis.py` as the entry, `sts_token.py` for identity). The Agent is forbidden from assembling its own ossutil / SDK / curl commands against the OSS control plane or bypassing the scripts - the scripts embed timeout, error degradation, and observability guarantees that ad-hoc commands lack. Read the script output, interpret it, and compose the report; do not re-implement the queries.
4. **ABSOLUTE PROHIBITION (credential handling):** Never read, print, or pass AK/SK/STS tokens explicitly. The OSS SDK resolves credentials exclusively from the environment variables of the default credential chain; the identity check uses the aliyun CLI default credential chain. Never accept AK/SK from the user or from another script, and never ask the user to paste them into the conversation.
5. **NO FABRICATION:** Every conclusion must be grounded in data actually returned by GetBucketInfo / ListBuckets / GetCallerIdentity or in the documented knowledge of `references/`. If a query fails or returns empty, record it and state the limitation - never invent bucket locations, storage c
...[truncated 25 chars]
Lines L043-L049 state that the trigger conditions are 'the same list the description advertises'. Later, L235-L243 documents another supported symptom ('mounted directory does not show files uploaded by SDK'), which contradicts that claim of equivalence between advertised triggers and actual supported behavior.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
--endpoint oss-cn-hangzhou.aliyuncs.com --symptom "ossfs mount failed" --platform ecs
Report the `verdict` (endpoint region vs bucket location), the `archive_verdict` (storage class), the pre-flight checklist recommendations, and declare any auto-filled parameters. All remediation (credential file, chmod 640, remount) is output as manual guidance.
**Example 2 - container storage volume mount 403**
The manifest description and trigger list constrain the skill to ossfs mount failure, disappeared mountpoints, container mount 403, and archive-read 403 scenarios. However, Example N introduces a different use case—mounted directory not showing SDK-uploaded files due to caching semantics—which is not one of the declared triggers and broadens the skill beyond the stated diagnostic scope.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
when others can read it; fix with `chmod 640 /etc/passwd-ossfs`
(ossfs FAQ, permission / mount sections).
- ossfs 2.0: credentials come from the environment variables
`OSS_ACCESS_KEY_ID` / `OSS_ACCESS_KEY_SECRET`; an unset pair surfaces as
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
`<bucket>:<AccessKeyId>:<AccessKeySecret>`; the file permission MUST be
restricted - ossfs refuses to start with
`credentials file /etc/passwd-ossfs should not have others permissions`
when others can read it; fix with `chmod 640 /etc/passwd-ossfs`
(ossfs FAQ, permission / mount sections).
- ossfs 2.0: credentials come from the environment variables
`OSS_ACCESS_KEY_ID` / `OSS_ACCESS_KEY_SECRET`; an unset pair surfaces as
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.
responding. Verify the credential's account UID against the bucket owner
UID (the entry script's GetCallerIdentity + GetBucketInfo owner_id pair
provides this evidence).
- Never ask the user to paste AK/SK into the conversation; guide them to
fix the credential file / environment on their own host.
### 2. Endpoint
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
Detected: suspicious.exposed_resource_identifier