T09 · Insecure Skill Coding Practices
- Location
scripts/session_manager.py:31- Finding
Persistent Authenticated Browser Profiles Lack Explicit Filesystem Protection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its restaurant-checking purpose, but it can store logged-in browser sessions locally and its default fetchers can return mock data despite live-data wording.
Review before installing. Use it only if you are comfortable with scraping Dianping/Xiaohongshu and possibly saving logged-in browser cookies under a local sessions directory. Treat default results as potentially synthetic unless using the real scraper path, run in an isolated environment, and do not share or commit the sessions directory.
scripts/session_manager.py:31Persistent Authenticated Browser Profiles Lack Explicit Filesystem Protection
scripts/requirements.txt:4Unpinned and Unverified Third-Party Dependencies Create Supply-Chain Exposure
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Interactive browser automation for login plus persistent session storage and expiry tracking are materially sensitive behaviors omitted from the high-level description. This is dangerous because it can lead to unanticipated handling of credentials, cookies, and local session artifacts, exposing users to token leakage or overprivileged automation if the environment is shared or compromised.
Referenced artifact was not completely inspected
See [scripts/requirements.txt](scripts/requirements.txt) for complete list.
The skill documentation describes capabilities that require network access, local file access, and likely session/cookie storage, but it does not declare an explicit tool scope or permissions boundary. This creates an authorization and transparency gap: an agent or reviewer cannot easily tell what external actions the skill may perform, increasing the risk of overbroad execution and unintended data access.
The skill relies on web scraping, cookies, and residential proxies against third-party platforms, but this is not surfaced as a prominent user warning in the main description. That omission is dangerous because users may unknowingly authorize collection methods involving authenticated sessions, proxy routing, and potential legal/privacy risks that materially change the trust profile of the skill.
The document is entirely scoped to Chinese-language Xiaohongshu content, keywords, and Chinese-specific NLP libraries, but it does not state that this locale restriction is optional or justified as a region-specific skill. Under the policy, language or locale constraints should either offer user choice or be clearly documented as intentional and justified.
This code emits user-facing text exclusively in Chinese, including labels such as "高/中/低" and the formatted recommendation output. That creates a language-policy issue because the skill forces a specific locale without any visible opt-in, fallback, or justification that it is intended only for a Chinese-speaking context.
The script's user-facing CLI text is written exclusively in Chinese, including status messages and usage guidance. This imposes a specific language on users without opt-in or explanation, which matches the natural-language locale policy violation criteria.
The docstring claims this is a server-friendly cross-check using requests and BeautifulSoup, but the code performs no scraping and does not use those libraries. This deceptive description increases the chance that operators or agents rely on the module for real-world verification when it only emits synthetic data.
The skill metadata promises automatic fetching and cross-referencing of live Xiaohongshu and Dianping data, but this implementation only fabricates mock restaurants and posts. In an agent setting, this can mislead users and downstream systems into trusting invented recommendations as validated external intelligence, creating integrity and trust risks.
The request headers hard-code Accept-Language to prefer zh-CN, which imposes a specific locale policy on all requests. The file does not offer user opt-in or configuration for locale selection, and no region-specific justification is documented in the code.
The request header hard-codes 'Accept-Language' to 'zh-CN,zh;q=0.9', which imposes a specific language/locale behavior. The file does not offer user opt-in or configuration for locale selection, and no region-specific justification is documented in the code.
The search method’s name, docstring, and surrounding behavior imply a real cross-platform search, but the implementation explicitly uses simulated data. Because this skill is supposed to validate restaurant quality across platforms, simulated Xiaohongshu results undermine the core security property of data trustworthiness and can produce false confidence scores or incorrect recommendations.
The exported convenience function is presented as fetching Xiaohongshu data, but it ultimately returns fabricated mock records rather than data from the platform. In this skill’s context, that can mislead downstream recommendation or trust-scoring logic into treating synthetic data as real evidence, causing integrity failures and potentially deceptive outputs to users.
The scraper launches a persistent Playwright browser context tied to a reused session directory, which can silently reuse authentication state, cookies, and other browsing artifacts across runs. In an agent skill that performs network actions automatically, this creates privacy and authorization risks because requests may be made under a prior logged-in identity without explicit user awareness or consent.
The manifest describes a skill that fetches ratings/review counts from Xiaohongshu and Dianping to validate restaurant recommendations. This file instead provides a standalone browser session manager that opens login flows, persists authenticated browser profiles, and maintains login state across runs, which is a materially broader capability than recommendation cross-checking itself.
The code creates session directories and writes session_state.json to disk, persisting login metadata outside the user-visible restaurant-analysis function. In a skill described as recommendation cross-checking, undocumented local state changes increase privacy and transparency risk because users may not expect durable browser profile storage and session reuse.
Session state is persisted to disk without an explicit user-facing notice that login persistence data and browser profiles will be stored locally. Because the skill handles authenticated access to third-party services, lack of clear disclosure creates privacy and consent issues and may lead users to unknowingly leave reusable sessions on disk.
No suspicious patterns detected.