Back to skill

Security audit

Token Config Checker

Security checks for vulnerabilities and agentic risk

Overview

The skill is meant to check token configuration files, but it can copy live credentials and send them to user-selected remote endpoints in ways that are not clearly disclosed.

Review before installing. Use offline checks by default, run it only on token files you own, avoid custom --probe-url values unless you fully trust the endpoint operator, and do not use the save-directory options unless you are prepared to protect and clean up duplicate credential files.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/check_token_configs_plus.py:276
Finding

Access Tokens Can Be Disclosed to Arbitrary Probe Endpoints

Content
View full analysis
Dict[str, Any]: out = {'online_checked': False, 'online_valid': None, 'probe': probe_url, 'probe_detail': None, 'probe_json': None} if requests is None: out['probe_detail'] = 'requests_not_installed' return out access_token = data.get('access_token') if not isinstance(access_token, str) or not access_token: out['probe_detail'] = 'no_access_token' return out headers = {'Authorization': f'Bearer {access_token}'} try: out['online_checked'] = True r = requests.get(probe_url, headers=headers, timeout=timeout) out['status_code'] = r.status_code out['probe_detail'] = r.text[:5000] try: out['probe_json'] = r.json() except Exception: out['probe_json'] = None out['online_valid'] = 200 <= r.status_code < 300 except Exception as e: out['online_checked'] = True out['online_valid'] = False out['probe_detail'] = str(e) return out ``` The destination is supplied through the command-line option: ```python ap.add_argument('--probe-url', default=DEFAULT_PROBE_URL) ... if args.probe: rep.update(online_probe(data, args.probe_url)) ``` ### Technical Analysis When `--probe` is enabled, the enhanced script reads the complete `access_token` from each candidate configuration file and places it in an HTTP `Authorization` header. The destination comes directly from the unrestricted `--probe-url` argument. The implementation does not: - Require HTTPS. - Restrict probing to recognized provider domains. - Confirm disc ...[truncated 1799 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/check_token_configs_plus.py:214
Finding

Undocumented Proxy Mode Forwards Complete Tokens and Account Identifiers

Content
View full analysis
Dict[str, Any]: token = data.get('access_token', '') account_id = data.get('account_id', '') return { 'authIndex': auth_index, 'method': 'GET', 'url': CODEX_USAGE_URL, 'header': { 'Authorization': f'Bearer {token}', 'Chatgpt-Account-Id': account_id, 'Content-Type': 'application/json', 'User-Agent': CODEX_UA, } } def online_probe_codex_panel(data: Dict[str, Any], probe_url: str, timeout: int = 15) -> Dict[str, Any]: out = {'online_checked': False, 'online_valid': None, 'probe': probe_url, 'probe_detail': None, 'probe_json': None} if requests is None: out['probe_detail'] = 'requests_not_installed' return out access_token = data.get('access_token') if not isinstance(access_token, str) or not access_token: out['probe_detail'] = 'no_access_token' return out if not data.get('account_id'): out['probe_detail'] = 'no_account_id' return out payload = build_codex_panel_payload(data) headers = { 'Authorization': 'Bearer ab87036181', 'Content-Type': 'application/json', } try: out['online_checked'] = True r = requests.post(probe_url, json=payload, headers=headers, timeout=timeout) ``` The mode is selected through a substring check: ```python def online_probe(data: Dict[str, Any], probe_url: str, timeout: int = 12) -> Dict[str, Any]: if 'management/api-call' in probe_url: return online_probe_codex_panel(data, probe_url, timeout=timeout) ret ...[truncated 2021 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check_token_configs_plus.py:322
Finding

Supposedly Redacted Reports Expose Identity Data and Untrusted Probe Responses

Content
View full analysis
str: lines = [] lines.append(f'FILE: {path}') lines.append(f" type: {report.get('type')}") lines.append(f" email: {report.get('email')}") lines.append(f" account_id: {report.get('account_id')}") lines.append(f" valid_offline: {report.get('valid_offline')}") if 'online_checked' in report: lines.append(f" online_checked: {report.get('online_checked')}") lines.append(f" online_valid: {report.get('online_valid')}") if report.get('status_code') is not None: lines.append(f" status_code: {report.get('status_code')}") lines.append(f" failure_class: {classify_failure(report)}") lines.append(f" bucket: {report.get('bucket')}") for k, v in (report.get('times') or {}).items(): lines.append(f' {k}: {v}') if report.get('issues'): lines.append(' issues:') for issue in report['issues']: lines.append(f' - {issue}') if report.get('probe_detail'): preview = report.get('probe_detail')[:300].replace('\n', ' ') lines.append(f" probe_preview: {preview}") lines.append('') return '\n'.join(lines) ``` Probe responses are stored without sanitization: ```python r = requests.get(probe_url, headers=headers, timeout=timeout) out['status_code'] = r.status_code out['probe_detail'] = r.text[:5000] try: out['probe_json'] = r.json() except Exception: out['probe_json'] = None ``` JSON mode emits the report directly: ```python if args.json: print(json.dumps({'file': str(f), **rep}, ensure_ascii=F ...[truncated 2292 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

描述的前半部分与代码大体一致:代码确实批量扫描候选 JSON/token/auth/session 文件,离线检查 token/auth 配置有效性,支持可选在线探测,并对 token 做脱敏展示。但描述中强调的一个重要能力——将配置分为 valid / no_quota / invalid 三类并分别保存——在代码中完全没有实现。代码既不创建输出目录,也不复制/保存分类后的配置文件;同时也没有识别 no_quota 的专门逻辑,在线探测只把 HTTP 2xx 视为有效,其余均视为无效。此外,所谓“自动输出脱敏报告”在实现上只是向标准输出打印摘要,而不是生成报告文件。整体来看,主要用途相近,但描述包含了若干关键且未实现的能力,因此应判定为存在描述与行为不匹配。

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The skill is explicitly designed to locate, parse, and validate files containing access_token, refresh_token, and similar session credentials. In context, credential access is intrinsic to the feature set, but it remains dangerous because it centralizes handling of highly sensitive secrets and combines credential discovery with optional network transmission and file copying.

Content

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

md
---
name: token-config-checker
description: 批量检测 token / auth JSON 配置文件有效性,并可对 access token 做在线轻量探测,自动输出脱敏报告。适用于排查 Codex/OpenAI/OpenAI 兼容客户端导出的登录配置、会话凭据文件、token 缓存文件。支持把配置分为 valid / no_quota / invalid 三类并分别保存。 Also validates token/auth JSON files such as Codex/OpenAI/OpenAI-compatible exported session configs, supports online probing, redacted reports, and saving valid / no_quota / invalid configs into separate directories.
---

# token-config-checker

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script copies discovered token/auth JSON files into new output directories, which duplicates live credentials onto disk and increases the number of exposure points. In this skill’s context, the files being handled are explicitly access tokens, refresh tokens, session configs, and auth caches, so copying them is materially sensitive even if done for operator convenience.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The README recommends probing sensitive token/auth JSON files against an external endpoint, which causes live credentials to be transmitted off-host to a third party service. In the context of a tool specifically designed to batch-process exported session configs and separate valid credentials, this materially increases the risk of credential exposure, unauthorized account use, and accidental validation of stolen tokens.

Content

Scanner excerpt · README.md (reported line 28)May include surrounding context.

bash
python3 scripts/check_token_configs_plus.py ./tokens \
  --probe \
  --probe-url https://api.openai.com/v1/models \
  --save-valid-dir ./valid_configs \
  --save-no-quota-dir ./no_quota_configs \
  --save-invalid-dir ./invalid_configs \

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The English section repeats guidance to send token-bearing validation requests to api.openai.com, again encouraging external transmission of highly sensitive credentials. Because the skill is explicitly intended to test batches of exported auth/session files and classify still-usable configs, the network probe capability makes misuse and credential harvesting workflows more operationally effective.

Content

Scanner excerpt · README.md (reported line 81)May include surrounding context.

bash
python3 scripts/check_token_configs_plus.py ./tokens \
  --probe \
  --probe-url https://api.openai.com/v1/models \
  --save-valid-dir ./valid_configs \
  --save-no-quota-dir ./no_quota_configs \
  --save-invalid-dir ./invalid_configs \

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes capabilities that read sensitive credential files, write categorized copies to disk, and optionally perform network probing, but it declares no explicit tool/permission scope. That omission weakens reviewability and allows an operator or hosting environment to grant broader access than users may expect for a credential-handling skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises online probing of access_token validity without explicitly warning that the token will be sent to a remote service for validation. Because the entire purpose involves highly sensitive credentials, failing to disclose outbound transmission can cause inadvertent credential exposure to third parties or unexpected policy violations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation describes saving scanned configs into valid, no_quota, and invalid directories without clearly warning that this writes or copies sensitive credential-bearing files back to disk. That behavior can proliferate secrets, create insecure duplicate storage, and increase the chance of accidental disclosure through backups, sync tools, or source control.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The example explicitly targets https://api.openai.com/v1/models for probe requests, which means bearer tokens from scanned files may be transmitted externally. In a credential-auditing skill, external transmission is especially sensitive because the tool handles live authentication material that may belong to multiple accounts or environments.

Content

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

bash
python3 scripts/check_token_configs_plus.py ./tokens \
  --probe \
  --probe-url https://api.openai.com/v1/models \
  --save-valid-dir ./valid_configs \
  --save-no-quota-dir ./no_quota_configs \
  --save-invalid-dir ./invalid_configs \

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This repeated English example again documents transmission of tokens to an external API endpoint for validation. Even if the endpoint is legitimate, sending discovered credentials off-host materially increases exposure and may violate least-privilege or data-handling expectations.

Content

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

bash
python3 scripts/check_token_configs_plus.py ./tokens \
  --probe \
  --probe-url https://api.openai.com/v1/models \
  --save-valid-dir ./valid_configs \
  --save-no-quota-dir ./no_quota_configs \
  --save-invalid-dir ./invalid_configs \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The optional online probe transmits the bearer access token to an external service by placing it in the Authorization header for a live request. Even though this appears to be the advertised feature of the tool rather than overtly malicious behavior, it is still security-relevant because the script processes exported credential files and sends secrets off-host without an explicit runtime warning, consent prompt, or strong scoping controls.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This code performs external transmission to https://api.openai.com/v1/models using the discovered access token as a bearer credential. In the context of a bulk token/session-config checker, this is more dangerous because the tool is designed to scan many sensitive auth files, so enabling probing can cause multiple live credentials to be sent externally and potentially trigger unintended account activity, logging, or policy violations.

Content

Scanner excerpt · scripts/check_token_configs.py (reported line 143)May include surrounding context.

python
if not isinstance(access_token, str) or not access_token:
        out['probe_detail'] = 'no_access_token'
        return out
    probe_url = 'https://api.openai.com/v1/models'
    headers = {'Authorization': f'Bearer {access_token}'}
    try:
        out['online_checked'] = True

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/check_token_configs_plus.py (reported line 19)May include surrounding context.

python
'access_token', 'refresh_token', 'id_token', 'token', 'api_key', 'apiKey', 'secret', 'appSecret'
}

DEFAULT_PROBE_URL = 'https://api.openai.com/v1/models'
CODEX_USAGE_URL = 'https://chatgpt.com/backend-api/wham/usage'
CODEX_UA = 'codex_cli_rs/0.76.0 (Debian 13.0.0; x86_64) WindowsTerminal'

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The POST request transmits a payload containing an Authorization bearer token for the target account and includes account metadata, while also allowing the outer probe destination to be user-controlled. In a credential-checking skill, external transmission is especially sensitive because the primary data being processed are authentication secrets.

Content

Scanner excerpt · scripts/check_token_configs_plus.py (reported line 263)May include surrounding context.

python
}
    try:
        out['online_checked'] = True
        r = requests.post(probe_url, json=payload, headers=headers, timeout=timeout)
        out['status_code'] = r.status_code
        out['probe_detail'] = r.text[:5000]
        try:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The online probe sends bearer tokens and, for Codex flows, account identifiers to remote endpoints, which is an external transmission of sensitive credentials. Although probing is a stated feature, the code path provides no strong user-facing disclosure, allowlist enforcement, or destination validation, so users may unintentionally transmit secrets to arbitrary probe URLs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script's argument description and help strings are written in Chinese only, imposing a specific language on users with no opt-in or alternative locale. This is a natural-language policy issue because the tool does not provide a language choice or document a justified locale restriction.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.