Back to skill

Security audit

Job Search

Security checks for vulnerabilities and agentic risk

Overview

This skill is a job-search tool, but its packaged behavior and documentation materially overstate live platform searching and under-disclose mock data, persistence, exports, and scraping-circumvention guidance.

Review this carefully before installing. Treat results as potentially mixed live and synthetic data, do not rely on them for important job-market decisions without checking the original platform links, and avoid running the test or deployment scripts unless you are comfortable with local file creation and third-party scraping behavior.

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/zhilian_parser.py:156
Finding
Unrestricted URL Fetching Enables Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/boss_parser.py:127-130` - `scripts/zhilian_parser.py:156-159` - `scripts/qiancheng_parser.py:170-173` **Vulnerability Type**: Server-Side Request Forgery (SSRF) **Risk Level**: Medium ### Vulnerable Code ```python # scripts/boss_parser.py:127-130 def get_job_detail(self, job_url: str) -> Optional[Dict]: try: response = self.session.get(job_url, timeout=10) ``` ```python # scripts/zhilian_parser.py:156-159 def get_job_detail(self, job_url: str) -> Optional[Dict]: try: response = self.session.get(job_url, timeout=10) ``` ```python # scripts/qiancheng_parser.py:170-173 def get_job_detail(self, job_url: str) -> Optional[Dict]: try: response = self.session.get(job_url, timeout=10) ``` ### Technical Analysis All three parser classes expose a public `get_job_detail()` method that accepts an arbitrary URL and passes it directly to `requests.Session.get()`. The code does not validate: - The URL scheme. - The destination hostname. - Whether the resolved address is loopback, private, link-local, reserved, or multicast. - Whether the destination belongs to the recruitment platform handled by the parser. - Redirect destinations. The required functionality only needs access to known recruitment domains. Allowing arbitrary destinations creates an SSRF primitive that can access any HTTP service reachable from the process. The normal command-line search workflow does not currently invoke these methods, which reduces immediate exposure. However, they are public APIs and may be called directly by an integration or future workflow. In addition, job URLs extracted from HTML are not consistently restricted to expected platform domains. ### Attack Path 1. An attacker supplies a crafted URL through an integration that calls `get_job_detail()`. 2. The URL targets a service reachable from the Skill host, such as a loopback service, private-network application, or cloud metadata ...[truncated 1341 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create a centralized URL-validation function and require every detail request to pass validation. 2. Permit only `https` URLs. 3. Use a strict hostname allowlist for each parser, for example: - BOSS Zhipin: `www.zhipin.com` and explicitly reviewed subdomains. - Zhaopin: `www.zhaopin.com`, `jobs.zhaopin.com`, and explicitly reviewed subdomains. - 51job: `www.51job.com`, `jobs.51job.com`, and explicitly reviewed subdomains. 4. Perform exact hostname or safe subdomain matching. Do not use substring checks such as `"zhaopin.com" in hostname`. 5. Resolve the hostname and reject loopback, private, link-local, reserved, multicast, and unspecified IP addresses for both IPv4 and IPv6. 6. Disable automatic redirects or validate the destination before following every redirect. 7. Reject URLs containing embedded credentials or ambiguous hostname encodings. 8. Consider removing `job_url` from the public API and accepting a platform-specific job identifier instead. 9. Add tests covering: - Loopback and private IPv4 addresses. - IPv6 loopback and private addresses. - Decimal, hexadecimal, and encoded IP representations. - DNS rebinding scenarios. - Open redirects from permitted domains. - User-information hostname confusion such as `allowed.example@127.0.0.1`. A hardened request flow should resemble: ```python validated_url = validate_platform_url(job_url, allowed_hosts) response = self.session.get( validated_url, timeout=10, allow_redirects=False, ) ``` ]]>

T08 · Insecure Dependencies

Note
Location
scripts/requirements.txt:1
Finding
Unpinned Dependencies and Missing Integrity Verification<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/requirements.txt:1-4` - `scripts/setup_and_test.sh:17` - `SKILL.md:68` - `package.json:8` **Vulnerability Type**: Non-reproducible dependency installation without package integrity verification **Risk Level**: Low ### Vulnerable Code ```text # scripts/requirements.txt:1-4 requests>=2.31.0 beautifulsoup4>=4.12.0 lxml>=4.9.0 fake-useragent>=1.4.0 ``` ```bash # scripts/setup_and_test.sh:17 pip3 install requests beautifulsoup4 fake-useragent lxml -q ``` The documented installation flow also invokes pip without hash verification: ```bash pip install -r scripts/requirements.txt ``` ### Technical Analysis The dependency manifest uses open-ended minimum-version constraints rather than exact, reviewed versions. As a result, installing the Skill at different times can retrieve materially different package versions. The shell setup script further bypasses the dependency manifest and installs packages by name without version constraints. Neither installation path uses a lock file, package hashes, a restricted package index, or integrity enforcement. The package names are consistent with the documented functionality, and the audit found no evidence that they are current typosquatting or dependency-confusion packages. The risk arises from future package compromise, unexpected releases, compromised distribution infrastructure, or incompatible transitive dependency resolution. Python package installation may execute package build logic. Consequently, dependency installation is a code-execution boundary and should use reproducible, verified artifacts. ### Attack Path 1. A user runs the documented pip command or `scripts/setup_and_test.sh`. 2. pip queries its configured package index and resolves the newest versions satisfying the open-ended constraints. 3. A maliciously modified future release, compromised package, or unsafe transitive dependency is selected. 4. pip downloads the package without compari ...[truncated 1104 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct and transitive dependency to an exact reviewed version. 2. Generate a reproducible lock file using a dependency-locking tool. 3. Record cryptographic hashes for every permitted distribution. 4. Install with hash enforcement, for example: ```bash python3 -m pip install --require-hashes -r requirements.lock ``` 5. Modify `scripts/setup_and_test.sh` to install exclusively from the locked manifest rather than listing packages independently. 6. Use `python3 -m pip` instead of an unqualified `pip3` command to ensure installation targets the intended interpreter. 7. Prefer binary wheels from trusted indexes where appropriate, while still verifying hashes. 8. Explicitly configure trusted package indexes and avoid unreviewed extra indexes. 9. Run dependency vulnerability and provenance checks in continuous integration. 10. Perform installation in an isolated virtual environment as a non-administrative user. 11. Review and update pinned versions through a controlled process rather than permitting automatic resolution to arbitrary future releases. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (132)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the code only handles one platform while claiming three and does not implement salary filtering, the discrepancy is material rather than cosmetic. Security review cannot rely on descriptions that overstate benign functionality while understating side effects or limitations.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill metadata claims to search major Chinese recruitment platforms, but this implementation mainly searches a local JSON database and fabricates supplemental mock jobs when results are insufficient. That is a capability/integrity mismatch: downstream users or agents may believe results are live platform data and make decisions based on synthetic or stale records, which is especially risky in a job-search context where authenticity matters.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The skill includes a database-modifying capability that allows manual job insertion and persistence, which is unrelated to a read/search-focused job-search skill. This expands the attack surface by enabling unauthorized data tampering, poisoning of future search results, and persistence of misleading records in the local database.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
Manifest 描述将该技能定位为面向三大中国招聘平台的搜索能力,并支持真实的平台级筛选;但 search() 实际只执行本地 JSON 数据库检索,并在结果不足时调用 _get_mock_jobs() 生成模拟职位。L231-L237 甚至明确表明外部 API 只是预留接口而未实现,因此实际行为与技能对外宣称的核心能力明显不符。

Static analysis

No suspicious patterns detected.