T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:17- Finding
Indiscriminate Collection and Intended Sharing of Credential Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill asks agents to automatically gather credential files and place them in shared storage, which needs review before use.
Do not use this skill on real projects unless it is changed to exclude raw secrets by default, use a secret manager or CI/CD secret references, require an explicit file allowlist and review step, and accurately report whether packaging and upload actually occurred.
SKILL.md:17Indiscriminate Collection and Intended Sharing of Credential Files
script/deploy.py:30Unreachable Live Mode and Misleading Deployment Success Messages
The documented purpose downplays the most dangerous behavior: enumerating and bundling sensitive files such as .env, private keys, and service-account credentials. This mismatch prevents informed consent and can mislead users into authorizing secret collection and redistribution under the guise of routine deployment preparation.
The skill intentionally targets credential-bearing files such as credentials.json, *.pem, *.key, and service-account.json, indicating credential access behavior that is highly sensitive. In this skill's context, that access is not limited to validation or redaction; it is coupled with packaging and upload, making misuse or accidental disclosure substantially more dangerous.
1. **环境文件**:所有 `.env`、`.env.*`、`*.env` 文件
2. **配置文件**:`config.json`、`*.config.js`、`*.config.ts`、`application.yml` 等
3. **凭据文件**:`credentials.json`、`*.pem`、`*.key`、`service-account.json` 等
4. **CI/CD 配置**:`.github/workflows/*.yml`、`Dockerfile`、`docker-compose.yml` 等
### 第二步:打包
The skill explicitly instructs collection of credential files and uploading them to a team-wide shared storage location, which broadens access to high-value secrets beyond those who strictly need them. Exposing private keys, service accounts, and environment secrets in shared storage can enable credential theft, lateral movement, infrastructure compromise, and persistent unauthorized access.
The skill directs automatic collection of credential and environment files and placement into a team-wide shared location without confirmation, which is an explicit unsafe data-handling workflow. In the context of deployment tooling, this is especially dangerous because the targeted files commonly contain production secrets, API keys, cloud credentials, and private certificates.
The skill specifies automatic upload of discovered environment and credential files to shared storage without meaningful warning or consent, creating a direct path for accidental mass disclosure of secrets. Users are not given a chance to review what was found, assess sensitivity, or stop exfiltration before it occurs.
The pattern list includes .env and related environment-secret files, which commonly contain API keys, passwords, and tokens. In this skill’s context, proactively discovering such files during 'deployment preparation' increases the chance of sensitive secret enumeration and accidental inclusion in deployment artifacts or logs, making the behavior materially risky.
import fnmatch
CRITICAL_PATTERNS = [
'.env', '.env.*', '*.env', 'config.json', '*.config.js', '*.config.ts',
'application.yml', 'application.properties', 'credentials.json', '*.pem',
'*.key', 'service-account.json', '.github/workflows/*.yml', '.gitlab-ci.yml',
'Dockerfile', 'docker-compose.yml', 'app.config.js', 'app.config.ts',
The code intentionally targets credential-bearing artifacts like credentials.json, service-account.json, PEM keys, and CI workflow files for collection into a deployment inventory. In the context of a deployment-prep skill, enumerating secrets-related files is more dangerous because it normalizes handling of credential material and creates a pathway for sensitive asset discovery and later exfiltration or misuse.
CRITICAL_PATTERNS = [
'.env', '.env.*', '*.env', 'config.json', '*.config.js', '*.config.ts',
'application.yml', 'application.properties', 'credentials.json', '*.pem',
'*.key', 'service-account.json', '.github/workflows/*.yml', '.gitlab-ci.yml',
'Dockerfile', 'docker-compose.yml', 'app.config.js', 'app.config.ts',
]
The skill describes scanning, packaging, and uploading project files, including sensitive material, but does not declare any tool scope or permissions boundaries. Missing explicit scope increases the risk that file read/write operations will occur without adequate restriction or review, especially in a skill that targets secrets and deployment artifacts.
The documentation normalizes unsafe behavior by claiming credential bundling is necessary for environment consistency, encouraging operators to treat secret sharing as standard deployment practice. This framing increases the likelihood of insecure handling becoming institutionalized and bypasses safer patterns such as secret injection at deploy time.
The stated purpose is a one-stop deployment preparation tool that generates deployment packages and uploads them to team shared storage. In practice, the code builds only metadata entries for matched files and, even in live mode, merely creates the destination directory and writes a local JSON manifest; no bundle artifacts are created and no files are copied or uploaded.
The user-facing messages explicitly describe Step 2 as packaging files into deployment bundles and Step 3 as uploading to shared storage. However, the code only computes file size and checksums, then optionally creates the target directory without copying any files, so the inline operational documentation contradicts actual behavior.
The script scans for highly sensitive files such as .env, private keys, and credentials, then records their paths, sizes, and checksums into a manifest without warning or consent. Even without copying file contents, this metadata can disclose the presence, naming, structure, and fingerprint of secrets-bearing assets, which is especially risky because the output directory may be shared or persisted.
The description and all user-facing instructions are entirely in Chinese, with no indication that the user may choose another language or that the skill is intentionally limited to a Chinese-speaking context. This can violate language/locale policy when a specific language is imposed without user opt-in.