Back to skill

Security audit

TikTok Streak Bot

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its stated TikTok messaging purpose, but it stores TikTok login cookies and can send scheduled messages from the user's account without confirmation.

Review before installing. Use only with accounts and recipients you control, understand that the cookie file can act like a login session, keep it out of shared folders and source control, revoke the TikTok session if exposed, and avoid enabling scheduled/headless sends unless you are comfortable with messages being sent without a final prompt.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/lib/session.py:50
Finding
Authentication Cookies Stored in Plaintext Without Restrictive File Permissions## Vulnerability Details **File Location**: `scripts/lib/session.py:50-54` **Vulnerability Type**: Plaintext storage of reusable authentication credentials **Risk Level**: Medium ### Vulnerable Code ```python def save_cookies(self): logging.info(f"Saving cookies to {self.cookies_path}...") cookies = self.context.cookies() with open(self.cookies_path, 'w', encoding='utf-8') as f: json.dump(cookies, f, indent=4) ``` ### Technical Analysis The Skill exports all cookies from the active Playwright browser context and writes them directly to `data/cookies.json` as plaintext. TikTok session cookies are reusable authentication credentials and may allow a party possessing them to assume the authenticated browser session without knowing the account password. The file is created with Python's default file-creation behavior. The code does not enforce restrictive permissions, verify ownership, encrypt the contents, or reject an existing file with unsafe permissions. The file is also located inside the project directory, increasing the possibility of exposure through repository commits, backups, artifact packaging, or access by other local processes. ### Attack Path 1. A user supplies valid TikTok authentication cookies and runs the Skill. 2. The Skill authenticates a Playwright browser context with those cookies. 3. At the end of the run, `save_cookies()` exports the complete browser cookie set. 4. The credentials are written in plaintext to `data/cookies.json` using default filesystem permissions. 5. An unauthorized local process, another user permitted by those filesystem settings, an insecure backup, or an accidental repository publication obtains the file. 6. The exposed cookies are imported into another browser context. 7. If the session remains valid and TikTok does not require additional verification, the attacker can impersonate the authenticated user. ### Impact Assessment Successful exploi ...[truncated 496 chars]
Remediation
## Remediation Suggestions 1. Store cookies outside the project and source-control directories. 2. Create the credential file with owner-only permissions, such as mode `0600` on POSIX systems. 3. Verify file ownership and permissions before reading or overwriting an existing cookie file. 4. Use an operating-system credential manager or encrypted secret store rather than a plaintext JSON file where practical. 5. Write credentials atomically through a securely created temporary file, set restrictive permissions, and then replace the destination. 6. Add `data/cookies.json` and generated credential files to repository ignore and artifact exclusion rules. 7. Restrict imported cookies to explicitly approved TikTok domains. 8. Document how users can revoke active TikTok sessions if the cookie file is exposed.

T08 · Insecure Dependencies

Note
Location
scripts/requirements.txt:1
Finding
Unpinned Playwright Dependency Creates Supply-Chain and Reproducibility Risk## Vulnerability Details **File Location**: `scripts/requirements.txt:1` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Low ### Vulnerable Code ```text playwright ``` The documented installation process executes: ```bash pip install -r scripts/requirements.txt ``` ### Technical Analysis The requirements file specifies Playwright without an exact version or package-integrity hash. Each installation can therefore resolve to a different release depending on the package index state and resolver behavior. The package name is legitimate and there is no evidence that the currently resolved Playwright package is malicious. However, the absence of version and integrity controls means the reviewed Skill does not uniquely determine the dependency code that users will install and execute. A compromised future release, unexpected upstream change, or incompatible version could be introduced without any modification to this repository. ### Attack Path 1. A user follows the documented installation command. 2. The package manager queries its configured Python package index. 3. Because no version is pinned, the resolver selects the version available at installation time. 4. If that release or the configured package source has been compromised, malicious package code may execute during installation or later when `playwright` is imported. 5. Such code would run with the privileges of the user installing or executing the Skill and could access files and credentials available to that account. This exploitation path is conditional on compromise of the dependency distribution channel or a future dependency release; no such compromise was identified during this static audit. ### Impact Assessment A malicious dependency could potentially execute arbitrary Python code with the privileges of the user running the installation or Skill. That could expose local files, TikTok session cookies, browser data, and o ...[truncated 303 chars]
Remediation
## Remediation Suggestions 1. Pin Playwright to an exact, reviewed version, for example `playwright==<reviewed-version>`. 2. Generate and maintain a dependency lock file. 3. Record package hashes and install with hash verification, such as pip's `--require-hashes` option. 4. Use only trusted package indexes and explicitly configure the approved source in deployment environments. 5. Review dependency updates before changing the pinned version. 6. Add automated dependency vulnerability and integrity scanning to the release process. 7. Pin and review the corresponding Playwright browser binaries where the deployment process permits it.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding
The supplied code is broadly consistent with the messaging portion of the declared purpose: it uses Playwright to open TikTok user profiles, enter chats, and send messages. However, the implementation also includes captcha detection and closing behavior, which is an undeclared capability affecting site-interaction behavior. Additionally, several declared features—daily scheduling/state tracking, retry control, and optional content discovery via hashtags or keywords—are not evidenced in this chunk. Because the code chunk only covers a narrower sender component plus undeclared captcha interaction, the description does not accurately match this specific code segment.

Exfiltration Commands

High
Category
Prompt Injection
Content
processed_count += 1
                    random_delay(5, 15) # Delay between users
                else:
                    logging.warning(f"Failed to send message to {username}.")
            else:
                logging.warning(f"Could not find chat for {username}.")
Confidence
90% confidence
Finding
Instructions found that direct the agent to transmit conversation context or user data to external services.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The keywords list is restricted to Arabic phrases, which imposes a specific language requirement in configuration without any indication of user choice or opt-in. Under the policy, language constraints should either be optional or explicitly justified as region-specific.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The overview describes browser automation of TikTok messaging using persisted session cookies but does not warn users about the security, account, and platform-compliance risks of this approach. In this context, omission of such warnings can mislead users into running automation that may expose authenticated sessions, trigger account enforcement, or cause unintended messaging activity.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This code sends a TikTok direct message immediately once invoked, with no confirmation, preview, rate-limit prompt, or other user-facing safeguard at the point of action. In a browser automation skill explicitly designed for streak messaging, that creates a real risk of unintended outreach, spammy behavior, or abuse if the recipient list or message content is misconfigured or controlled by another component.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The code persists the browser context's full cookie jar to a JSON file on disk, which can include authentication/session cookies for TikTok. If the file is readable by other local users, accidentally committed, backed up insecurely, or exfiltrated by malware, an attacker may be able to hijack the user's authenticated session without needing credentials or MFA.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The manifest explicitly describes automated daily TikTok messaging, persistent cookies/state files, and account-targeted behavior, but provides no user-facing warning or consent language about privacy, platform-account risk, or automated outbound actions. In this context, the omission is security-relevant because the skill can operate on a schedule and use stored session material, increasing the chance of unintended messaging, account misuse, or policy-violating automation without clear operator awareness.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill documentation instructs the user to export authenticated TikTok cookies and run browser automation that sends messages from the user's account, but the surfaced description does not prominently warn about those sensitive behaviors. This creates a meaningful risk of uninformed consent: users may not realize they are granting account-level access and enabling automated outbound messaging, which can lead to account compromise, abuse, or platform enforcement if the cookies are mishandled or the automation behaves unexpectedly.

Missing User Warnings

Low
Confidence
76% confidence
Finding
The code performs an HTTP navigation to a TikTok profile URL derived from the provided username, transmitting that identifier to an external service. While logging is present, this file does not include a user-facing warning, confirmation, or explanatory comment/docstring disclosing that external network requests will be made with the supplied username.

Unpinned Dependencies

Low
Category
Supply Chain
Content
playwright
Confidence
94% confidence
Finding
The dependency is unpinned, so installs may resolve to different Playwright versions over time. That creates supply-chain and reproducibility risk: a future compromised, vulnerable, or breaking release could be pulled automatically into an automation skill that drives a browser and handles account actions.

Static analysis

No suspicious patterns detected.