T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:28- Finding
Agent Access to a Persistently Stored Authentication Cookie
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:28-29; duplicated inreferences/collector-workflow.md:29-30
Vulnerability Type: Authentication credential access without an explicit approval boundary
Risk Level: LowVulnerable Code Snippets
SKILL.md:28-29:markdown 2. Load the saved cookie from `data/xiaohongshu-cookie.txt` unless a newer cookie is provided. 3. Run or update `scripts/collect_xiaohongshu.py` with the requested URL(s), `--db`, `--refresh-url`, and `--comment-limit 0` when full comments are needed.references/collector-workflow.md:29-30:markdown 2. Read the saved cookie from `data/xiaohongshu-cookie.txt` unless the user provides a newer cookie. 3. Run or update `scripts/collect_xiaohongshu.py` with:The Skill can also be invoked implicitly, as configured in
agents/openai.yaml:5-6:yaml policy: allow_implicit_invocation: trueTechnical Analysis
The Skill instructs the Agent to read a persistently stored browser authentication cookie. This credential access supports the declared collection workflow, so the audit found no evidence that the Skill intentionally steals or exfiltrates the cookie. The documentation also explicitly says not to reproduce the cookie in final output.
Nevertheless, reading a reusable session credential is a sensitive operation. The instructions do not establish an explicit user-consent boundary before access, limit how the credential may be exposed to model context, or enforce destination restrictions for its use. Implicit invocation increases the possibility that credential access could occur without a distinct, informed approval step.
The artifact contains documentation and configuration only. The referenced collector, backend, and browser-extension implementations are absent, so the audit could not verify whether runtime controls prevent logging, disclosure, transmission to unintended hosts, or broader reuse of the ...[truncated 1250 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user approval immediately before reading the cookie, even when the Skill itself was invoked implicitly.
- Avoid placing the raw cookie in model-visible context. Pass it directly from a restricted secret store to the collector process or browser integration.
- Restrict file permissions on
data/xiaohongshu-cookie.txtto the minimum required user and process. - Constrain cookie use to approved Xiaohongshu domains and reject redirects or requests to untrusted destinations.
- Prevent the cookie from appearing in command-line arguments, exception messages, telemetry, debug output, generated artifacts, or logs.
- Prefer short-lived or narrowly scoped credentials where the platform supports them, and provide a clear revocation procedure.
- Add runtime tests verifying that cookie values are redacted and cannot be included in CSV, JSON, API responses, or final Agent output.
- Consider disabling implicit invocation for workflows that access authentication credentials, or require a separate privileged confirmation step.
