Back to skill

Security audit

Codex Auth Cleaner

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it handles a high-privilege CPA admin key and destructive auth-file deletion with insecure defaults and limited safeguards.

Install only if you operate the CPA server and understand that this can disable and permanently delete Codex auth records. Prefer CPA_KEY from an environment variable or secret store, restrict config.json permissions, use HTTPS CPA URLs, avoid untrusted endpoints, and test status/check before running clean, delete, or monitor mode.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/codex_cleaner.py:50
Finding

CPA Administrative Credential Stored in a Plaintext Configuration File Without Enforced Access Controls

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/codex_cleaner.py:185
Finding

CPA Administrative Bearer Credential Can Be Transmitted Over Unencrypted or Unvalidated Endpoints

Content
View full analysis
dict: hdrs = {**(headers or HEADERS)} req = Request(url, data=data, headers=hdrs, method=method) try: with urlopen(req, timeout=timeout) as resp: body = resp.read().decode("utf-8") return {"status_code": resp.status, "body": body, "json": json.loads(body) if body else {}} except HTTPError as e: body = e.read().decode("utf-8") if e.fp else "" return {"status_code": e.code, "body": body, "json": {}} except URLError as e: return {"status_code": -1, "body": str(e.reason), "json": {}} except Exception as e: return {"status_code": -1, "body": str(e), "json": {}} ``` ...[truncated 3364 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill describes capabilities that can access environment variables, write files, and perform network operations, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, this weakens reviewability and least-privilege controls, making it easier for the skill to be invoked with broader capabilities than users or operators expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented workflow disables and permanently deletes authentication files, but it does not prominently warn that these actions are destructive and may remove valid credentials if the verification logic is wrong or the backend is unstable. Users may run the commands without understanding the operational impact, increasing the chance of accidental service disruption or data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script stores the CPA admin key in config.json in plaintext without a clear warning, permission hardening, or a safer secret-storage option. If the local filesystem is accessible to other users, backups, sync tools, or accidental commits, the admin credential could be exposed and used to manage or delete auth files via the CPA API.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The report format section shows user-facing output entirely in Chinese, which implies a fixed locale for the skill's messaging. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale limitation is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring, setup wizard prompts, and many user-facing messages are written in Chinese, which imposes a specific language on users. The file does not indicate that this is a region-specific tool or provide any user opt-in or alternative locale.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest frames the skill as monitoring and cleaning invalid codex auth files from CPA, but the code also implements an interactive setup wizard that collects and persists notification settings and formats output specifically for Telegram/Discord workflows. These are adjacent operational conveniences, but they go beyond the core described behavior of checking quota status, disabling 401 files, and deleting them after verification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description emphasizes cleaning invalid auth files and when to invoke the skill, but the code also exposes a standalone monitor mode that runs indefinitely in a loop on a timed interval. Continuous daemon-like monitoring is a broader operational capability than a one-shot cleaning action and is not stated in the manifest text.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.