Back to skill

Security audit

MochiLab 网站基础巡检 · Site Check

Security checks for vulnerabilities and agentic risk

Overview

The skill performs clearly scoped, one-time checks of user-selected public websites and saves disclosed local reports.

Use public URLs without credentials or session tokens and an approved workspace. Website operators will see requests and the host's IP address. Local reports retain URLs and page metadata; sharing them with your configured model follows that provider's data policy. The documented runtime requires Node 24+.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (5)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tests/public-net.test.mjs (reported line 11)May include surrounding context.

js
const publicDns=async()=>[{address:'93.184.215.14',family:4}];
const response=(status=200,headers={})=>({status,headers:{'content-type':'text/html',...headers},body:Buffer.from('<title>Example</title>')});
test('only public HTTPS domains and port443 are admitted',()=>{
 for(const url of ['http://example.org','file:///etc/passwd','https://127.0.0.1','https://2130706433','<redacted-url>]','https://***@example.org/','https://example.org:8443','https://a.local','https://a.internal','https://localhost','https://example.org./','https://example.org/\n'])assert.throws(()=>publicUrl(url));
 assert.equal(publicUrl('https://example.org:443/path').href,'https://example.org/path');
});
test('private, reserved, multicast, metadata and transition IPs are refused',()=>{

Cloud Metadata Access

High
Category
Server-Side Request Forgery
Confidence
90% confidence
Finding

Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.

Content

Scanner excerpt · tests/public-net.test.mjs (reported line 31)May include surrounding context.

js
assert.equal(lookups,2);assert.equal(requests,2);assert.equal(r.redirects.length,1);assert.equal(r.finalUrl,'https://www.example.org/next');
});
test('private redirect and rebinding target are refused without a second request',async()=>{
 let calls=0;await assert.rejects(fetchPublic('https://example.org',{lookup:publicDns,request:async()=>{calls++;return response(302,{location:'https://169.254.169.254/latest/meta-data'});}}),/domain/);assert.equal(calls,1);
 let dnsCalls=0;calls=0;await assert.rejects(fetchPublic('https://example.org',{lookup:async()=>++dnsCalls===1?publicDns():[{address:'127.0.0.1',family:4}],request:async()=>{calls++;return response(302,{location:'https://example.org/again'});}}),/DNS/);assert.equal(calls,1);
});
test('three redirects, deadline and body limit are enforced',async()=>{

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Filesystem creation and writes lack user disclosure.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

workspaceFolder creates directories, and writeNew creates a file and writes supplied text. Neither operation has a confirmation prompt, user-facing log, or explanatory comment/docstring disclosing the filesystem changes in this file; exclusive creation prevents overwriting but does not disclose the write.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE (reported line 7)May include surrounding context.

text
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/public-net.mjs:16