Back to skill

Security audit

获取职位信息并总结

Security checks for vulnerabilities and agentic risk

Overview

This is a real job-crawling skill, but it should be reviewed carefully because it uses an authenticated Chrome debugging session and automatic dependency installation without enough safeguards.

Install only if you are comfortable using a dedicated BOSS Zhipin account/session in a separate temporary Chrome profile, closing the debugging browser immediately after use, and reviewing any package installation first. Prefer running it in an isolated workspace or virtual environment, set explicit output paths, and treat generated CSV files as untrusted before opening them in spreadsheet software.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/boss.py:88
Finding
Spreadsheet Formula Injection Through Untrusted Job Data## Vulnerability Details **File Location**: `scripts/boss.py`, lines 88-106 **Vulnerability Type**: CSV formula injection **Risk Level**: Medium ### Vulnerable Code ```python job_info = { '岗位名称': job.get('jobName', ''), '公司': job.get('brandName', ''), '规模': job.get('brandScaleName', ''), '公司领域': job.get('brandIndustry', ''), '学历要求': job.get('jobDegree', ''), '经验要求': job.get('jobExperience', ''), '技能需求': job.get('skills', []), '福利待遇': job.get('welfareList', []), '薪资': parse_month_salary(job.get('salaryDesc', '')), '市': job.get('cityName', ''), '区': job.get('areaDistrict', ''), '商圈': job.get('businessDistrict', ''), '经度': job.get('gps', {}).get('longitude', ''), '纬度': job.get('gps', {}).get('latitude', '') } csv_writer.writerow(job_info) ``` ### Technical Analysis Job attributes received from the external BOSS Zhipin API are copied directly into a CSV row without spreadsheet-specific output neutralization. CSV quoting performed by `csv.DictWriter` protects CSV structure but does not prevent spreadsheet applications from interpreting cell content as formulas. An attacker able to publish or influence a job listing could begin a string field with a formula indicator such as `=`, `+`, `-`, or `@`. When the generated file is opened in a compatible spreadsheet application, the cell may be evaluated rather than treated as literal text. The precise result depends on the spreadsheet product and its security configuration. ### Attack Path 1. An attacker publishes a job listing containing a formula-like value in a field such as the job name, company name, skills, or benefits. 2. The BOSS Zhipin API returns the attacker-controlled value in a job-list response. 3. `boss.py` retrieves the value through `job.get(...)`. 4. `csv_writer.writerow(job_info)` writes it into `boss.csv` without neutralization. 5. The user opens the CSV in spreadsheet software. ...[truncated 647 chars]
Remediation
## Remediation Suggestions Treat every string obtained from the recruitment service as untrusted. Before writing a value to CSV: 1. Convert list and scalar values into explicit strings. 2. Detect values whose first non-whitespace character is `=`, `+`, `-`, or `@`. 3. Prefix dangerous values with an apostrophe or another neutralization character appropriate for the intended spreadsheet application. 4. Apply neutralization recursively to values obtained from lists. 5. Consider generating XLSX output with scraped values explicitly stored as text cells. 6. Add tests covering formula prefixes, leading whitespace, tabs, carriage returns, and newline-prefixed formulas. Example hardening logic: ```python def spreadsheet_safe(value): if isinstance(value, list): value = ", ".join(str(item) for item in value) else: value = str(value) if value.lstrip().startswith(("=", "+", "-", "@")): return "'" + value return value safe_job_info = { key: spreadsheet_safe(value) for key, value in job_info.items() } csv_writer.writerow(safe_job_info) ```

T08 · Insecure Dependencies

Warning
Location
SKILL.md:26
Finding
Unpinned and Unspecified Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, line 26 **Vulnerability Type**: Unsafe dependency installation guidance **Risk Level**: Medium ### Vulnerable Instruction English rendering of the relevant instruction: ```text Check whether Python and the third-party libraries referenced by boss.py are installed. If they are not installed, install Python and the corresponding third-party libraries automatically. ``` The dependency inferred from the script includes: ```python from DrissionPage import ChromiumPage, ChromiumOptions ``` ### Technical Analysis The Skill directs the agent to install Python and third-party packages inferred from source imports. It provides no reviewed dependency manifest, exact version, integrity hash, approved package repository, or isolation requirement. Package installation can execute package-controlled build or installation logic. Resolving a mutable package from an unspecified source therefore makes the effective code base differ from the code reviewed in this project. This increases exposure to compromised releases, dependency confusion, package-name mistakes, and future incompatible or malicious updates. ### Attack Path 1. The Skill is invoked on a system where a required dependency is absent. 2. The agent follows the instruction to install dependencies automatically. 3. The dependency name and latest available version are resolved from an unspecified repository. 4. A compromised, substituted, or unexpectedly modified package is downloaded. 5. Package-controlled installation or runtime code executes with the privileges of the user running the agent. 6. That code may access files, environment variables, browser data, or network resources available to the installation process. ### Impact Assessment A malicious dependency could execute arbitrary code with the privileges of the account performing installation or running the crawler. If installation is performed w ...[truncated 222 chars]
Remediation
## Remediation Suggestions 1. Add a reviewed dependency manifest containing exact versions. 2. Use a lock file with cryptographic hashes for every direct and transitive dependency. 3. Require installation from an explicitly approved package repository. 4. Install packages inside a dedicated virtual environment rather than globally. 5. Prohibit elevated installation unless it is independently justified and approved. 6. Replace the instruction to infer and install dependencies with an explicit, reproducible command. 7. Review dependency updates before modifying the lock file. 8. Document a supported Python version rather than directing the agent to install an arbitrary current release. A hash-locked installation workflow should be used, such as: ```text python -m venv .venv .venv/bin/python -m pip install --require-hashes -r requirements.lock ```

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:24
Finding
Authenticated Browser Session Exposed Through a Fixed Remote-Debugging Port## Vulnerability Details **File Location**: `SKILL.md`, lines 24-25; `scripts/boss.py`, lines 54-56 **Vulnerability Type**: Insecure browser debugging configuration **Risk Level**: Medium ### Vulnerable Instructions and Code English rendering of the relevant Skill instructions: ```text Start Chrome with: chrome.exe --remote-debugging-port=9222 --user-data-dir="D:\chrome_debug" Require the user to log in to BOSS Zhipin before crawling. ``` The crawler attaches to that endpoint: ```python co = ChromiumOptions() co.debugger_address = '127.0.0.1:9222' dp = ChromiumPage(co) ``` ### Technical Analysis The workflow creates a Chrome instance with DevTools remote debugging enabled on a predictable port and then asks the user to authenticate to BOSS Zhipin inside that browser. The DevTools protocol offers extensive browser-control capabilities and does not add application-level authentication to the debugging endpoint. Although the script connects through the loopback address, other processes running under the local system may attempt to connect to the same endpoint while it is active. A process that can reach the debugging port may be able to inspect open pages, execute JavaScript in browser contexts, navigate tabs, or otherwise control the authenticated browser session. The use of a separate `user-data-dir` is beneficial, but the instructions do not require that the profile be temporary, prohibit unrelated account use, or require the browser and debugging endpoint to be closed immediately after collection. ### Attack Path 1. The user starts Chrome with remote debugging enabled on fixed port `9222`. 2. The user authenticates to BOSS Zhipin in that browser profile. 3. The crawler attaches to the DevTools endpoint and begins collection. 4. While the endpoint remains active, another local process discovers or already knows the fixed port. 5. That process connects to the DevTools endpoint. 6. It uses browser-c ...[truncated 743 chars]
Remediation
## Remediation Suggestions 1. Use a dedicated, temporary browser profile containing no unrelated accounts or sensitive browsing data. 2. Bind the debugging service explicitly to the loopback interface. 3. Select a random, short-lived debugging port rather than the predictable port `9222`. 4. Pass the selected port to the crawler through a narrowly scoped configuration value. 5. Start the browser only immediately before collection and terminate it immediately afterward. 6. Delete the temporary profile after logout and successful completion when retention is unnecessary. 7. Warn users not to open unrelated websites or authenticate other accounts in the debugging profile. 8. Avoid leaving debugging Chrome instances running after errors by adding cleanup logic in a `finally` block. 9. Where practical, use browser automation that launches and owns an isolated browser process rather than attaching to a manually maintained authenticated browser.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared purpose is a general job-summary skill, but the instructions expand behavior to controlling a local Chrome remote-debugging session, using a logged-in recruitment account, persisting scraped data locally, and relying on hardcoded parameters. This mismatch is dangerous because users may invoke a seemingly simple analysis skill without realizing it can access authenticated browser context and perform broader system actions.

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
The skill directs the agent to inspect the user's Python environment and to install Python and third-party packages automatically if missing. Allowing an agent to make system-level changes unrelated to a narrow summarization task increases supply-chain and host-integrity risk, especially when package sources, versions, and approval steps are unspecified.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill performs local file writes by saving CSV/TXT/HTML outputs but declares no tool scope or permission boundaries. This creates an authorization gap where an agent may write files without explicit user-visible constraints on location or type, increasing the chance of unsafe persistence or overwriting local data.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger condition is overly broad, causing the skill to activate for general questions about jobs in a city or domain without clear boundaries. Overbroad activation is dangerous in this context because the skill can then proceed to scraping, account-dependent browsing, and local file operations when the user may have expected only a conversational answer.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill requires the user to log into a recruitment platform and to expose a Chrome remote-debugging session, but it does not warn about the privacy and account-security implications. A remote-debugging connection can provide access to authenticated browser state, cookies, and page interactions, making this substantially more dangerous than ordinary web browsing.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill requests installation of Python and third-party libraries but provides no warning about system changes, package trust, or rollback considerations. This omission weakens informed consent and can lead users to unknowingly authorize persistent modifications to their machine for a task that could be scoped more safely.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The instructions tell the agent to modify local scripts and output logic before execution, including changing search parameters and file-save behavior. Unbounded code modification is risky because it lets the agent alter executable logic on the user's machine without review, which can introduce unintended behavior, break provenance, or expand data access.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The script persistently writes scraped job and company data, including location coordinates, to a local CSV file even though the skill description only states that it will crawl and summarize jobs. This creates an undisclosed data storage behavior that can surprise users, increase retention of collected data, and expose data to later unauthorized access or misuse on the host system.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script passively captures network response data via browser debugging/listening and then stores scraped results to disk without any explicit user confirmation or prominent disclosure. In the context of a job-crawling skill, this is more concerning because users may expect transient summarization, not hidden interception of response bodies and persistent local collection.

Intent-Code Divergence

Low
Confidence
98% confidence
Finding
The comment states that `city=101280600` corresponds to Shenzhen, but the hardcoded URL actually uses `city=101020100`, which is Shanghai. This is an active documentation/code mismatch about what location the crawler targets.

Static analysis

No suspicious patterns detected.