Back to skill

Security audit

Byted Security SkillsScanner

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed remote security scanner, but it can unintentionally send sensitive files outside the selected skill directory and exposes uploaded content too broadly.

Install only if you are comfortable sending scanned skill archives to the configured Volcengine or local scan service. Before use, remove secrets from target skills, avoid scanning untrusted skill directories with symlinks, verify SCAN_BASE_URL and SCAN_SERVICE_HOST, and avoid running it in CI or shells where request-body logs may be retained.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/scan.py:86
Finding

Symlink Following Allows Files Outside the Scan Target to Be Uploaded

Content
View full analysis

Vulnerability Details

File Location: scripts/scan.py:86-104; resulting archive upload at scripts/scan.py:197-251
Vulnerability Type: Improper symlink handling and unauthorized local-file disclosure
Risk Level: High

Vulnerable Code:

python
with zipfile.ZipFile(temp_zip.name, 'w', zipfile.ZIP_DEFLATED) as zipf:
    for root, dirs, files in os.walk(dir_path):
        for file in files:
            if file.startswith('.') or file.startswith('._'):
                continue
            file_path = os.path.join(root, file)
            arcname = os.path.relpath(file_path, dir_path)

            if arcname.lower() == "skill.md":
                arcname = "skill.md"
            elif arcname.lower().endswith("/skill.md"):
                arcname = arcname[:-len("/skill.md")] + "/skill.md"

            while arcname.startswith('./') or arcname.startswith('/'):
                arcname = arcname.lstrip('./')

            zipf.write(file_path, arcname)

The resulting archive is read and transmitted here:

python
with open(file_to_upload, 'rb') as f:
    file_content = f.read()

files = {
    'File': (os.path.basename(file_to_upload), file_content, 'application/zip')
}

Technical Analysis

The directory-packaging routine does not reject symbolic links and does not resolve each file path before verifying that it remains inside the requested scan directory. zipfile.ZipFile.write() follows a symbolic link to a file and archives the target's contents.

Consequently, an untrusted Skill directory can contain a symlink whose apparent path is inside the Skill but whose target is an arbitrary file readable by the scanner process. The target file is incorporated into the generated ZIP and uploaded to the configured scanning service.

This exceeds least privilege because scanning a selected directory should grant access only to regular files contained within that directory, not to ...[truncated 1236 chars]

Remediation
View remediation

Remediation Suggestions

  • Reject symbolic links for both files and directories before adding entries to the archive.
  • Resolve the target directory and every candidate path with os.path.realpath().
  • Enforce containment with os.path.commonpath() before opening or archiving a file.
  • Use os.lstat() and require regular files rather than relying on path-based checks that follow links.
  • Consider opening files with O_NOFOLLOW on platforms that support it to reduce time-of-check/time-of-use risks.
  • Abort the scan and report the offending path whenever a symlink or path escaping the target directory is found.
  • Add tests covering file symlinks, directory symlinks, nested links, broken links, and links changed concurrently.

Example containment logic:

python
root_real = os.path.realpath(dir_path)
file_real = os.path.realpath(file_path)

if os.path.islink(file_path):
    raise ValueError(f"Symbolic links are not permitted: {file_path}")

if os.path.commonpath([root_real, file_real]) != root_real:
    raise ValueError(f"Path escapes the scan directory: {file_path}")

if not os.path.isfile(file_real):
    continue

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan.py:343
Finding

Unrestricted Endpoint Overrides Can Redirect Archives and Signed Requests

Content
View full analysis

Vulnerability Details

File Location: scripts/scan.py:60-71, scripts/scan.py:234-251, and scripts/scan.py:343-349
Vulnerability Type: Unvalidated network destination and insecure transport configuration
Risk Level: Medium

Vulnerable Code:

python
if base_url:
    self.base_url = base_url.rstrip('/')
    self.upload_url = f"{self.base_url}/UploadAndScanSkill"
    self.detail_url = f"{self.base_url}/GetSkillScanDetail"
else:
    self.base_path = f"/api/top/{self.service}/{self.region}/2026-01-04"
    self.upload_url = f"{self.host}{self.base_path}/CreateSkill?Action=CreateSkill&Version=2026-01-04"
    self.detail_url = f"{self.host}{self.base_path}/GetSkillScanDetail?Action=GetSkillScanDetail&Version=2026-01-04"
python
parsed_url = urllib.parse.urlparse(self.upload_url)

v_request = Request()
v_request.method = 'POST'
v_request.host = parsed_url.netloc
v_request.path = parsed_url.path
v_request.query = dict(urllib.parse.parse_qsl(parsed_url.query))
v_request.headers = dict(prepped.headers)
v_request.headers['Host'] = parsed_url.netloc
v_request.body = prepped.body
SignerV4.sign(v_request, self.credentials)

response = requests.post(
    self.upload_url,
    headers=v_request.headers,
    data=prepped.body,
    timeout=60
)
python
base_url = os.environ.get("SCAN_BASE_URL", "")
ak = os.environ.get("VOLC_ACCESS_KEY") or os.environ.get("VOLC_ACCESSKEY") or os.environ.get("SCAN_AK")
sk = os.environ.get("VOLC_SECRET_KEY") or os.environ.get("VOLC_SECRETKEY") or os.environ.get("SCAN_SK")
region = os.environ.get("VOLC_REGION", DEFAULT_REGION)
host = os.environ.get("SCAN_SERVICE_HOST", DEFAULT_HOST)
service = os.environ.get("VOLC_SERVICE", DEFAULT_SERVICE)

Technical Analysis

SCAN_BASE_URL and SCAN_SERVICE_HOST control the destination of archive uploads without hostname allowlisting or mandatory HTTPS validation. The scanner si ...[truncated 1792 chars]

Remediation
View remediation

Remediation Suggestions

  • Allowlist the exact documented Volcengine API hostnames.
  • Require https for every non-loopback destination and reject unsupported URL schemes.
  • Permit loopback HTTP only through an explicit development-mode option.
  • Normalize and validate URLs before use, including the hostname, port, scheme, user information, and resolved IP address.
  • Reject URL userinfo, ambiguous hostnames, unexpected ports, and destinations resolving to prohibited private or link-local networks unless explicitly approved.
  • Disable redirects or validate every redirect destination before forwarding the request.
  • Make custom endpoints an explicit command-line opt-in and display the final destination before uploading.
  • Avoid attaching production credentials when communicating with custom or local endpoints.
  • Document clearly that the complete target directory is transferred to an external service.
  • Apply outbound network policy controls so the scanner can contact only approved scanning endpoints.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/scan.py:238
Finding

Multipart Request Body May Expose Uploaded Skill Content in Logs

Content
View full analysis

Vulnerability Details

File Location: scripts/scan.py:238-242
Vulnerability Type: Sensitive information exposure through logging
Risk Level: Low

Vulnerable Code:

python
if len(v_request.body) < 2000:
    # Only show short bodies safely
    print(f"Body Preview: {v_request.body}")
else:
    print("Body Preview (too long): <multipart form>")

Technical Analysis

The scanner prints the complete signed multipart request body whenever its serialized size is below 2,000 bytes. The body contains multipart metadata and the uploaded ZIP bytes. Size does not make content safe to log; a small Skill can still contain credentials, private instructions, source code, or confidential configuration.

Standard output may be retained by shell capture, CI/CD systems, orchestration platforms, centralized logging services, or agent execution history. These systems commonly have different access controls and retention periods from the original files.

Attack Path

  1. A user scans a sufficiently small Skill or archive containing sensitive information.
  2. The multipart request body remains below the 2,000-byte threshold.
  3. The scanner prints the entire body to standard output before sending the request.
  4. The execution environment captures or forwards standard output.
  5. A user with access to those logs retrieves the archived content or associated metadata.

Impact Assessment

The disclosure is limited to uploads whose serialized multipart body falls below the threshold, but it can expose the complete contents of such uploads. The affected scope may include source code, configuration values, API tokens, and descriptive metadata.

No additional system privilege is obtained directly. The practical exposure depends on who can access terminal output, CI logs, agent histories, or centralized logging infrastructure.

Remediation
View remediation

Remediation Suggestions

  • Remove request-body logging entirely in production and development modes.
  • Log only non-sensitive operational information, such as the archive size, request ID, destination hostname, and final status.
  • Never log authorization headers, signatures, session tokens, multipart bodies, or file bytes.
  • If diagnostic logging is necessary, require an explicit debug option and emit only fixed, redacted metadata.
  • Review existing CI, terminal, and centralized logs for previously exposed request bodies and apply appropriate deletion and credential-rotation procedures.
  • Add automated tests that fail if uploaded file content or authentication material appears in standard output.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
- **要求**:必须确保目标技能包含 `SKILL.md` 文件,因为它是扫描的主要输入。

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code may print a preview of the signed multipart request body, which can expose uploaded file contents and form data into logs. Since scanned skill packages may contain secrets or proprietary source, logging request bodies creates a direct confidentiality risk and can leak sensitive material to consoles, CI logs, or monitoring systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly instructs users to package an entire skill directory and upload it to a remote Volcengine scanning service, but it does not clearly warn that the archive may contain sensitive code, prompts, secrets, or proprietary data. Because this skill is specifically meant to scan other workspace skills, the default behavior increases the chance of unintentionally exfiltrating confidential content to a third-party service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill instructs use of a Python scanning script that reads environment variables, accesses local files, packages directories, and uploads content to a remote Volcengine service, but it declares no tool scope or permission boundaries. This creates an under-specified trust boundary: an agent could read sensitive workspace data or exfiltrate skill contents over the network without an explicit, user-visible permission model.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions require results to be presented "以易读的格式(中文)向用户展示结果", which imposes a specific language regardless of user preference. This is a natural-language policy concern because the skill does not offer any language choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file states that the agent "必须" use the specified format "(中文)", creating a hard requirement for Chinese output. Because no alternative locale or user-choice mechanism is provided, this violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script emits user-facing messages such as 压缩目录失败, 路径未找到, and other Chinese-only errors regardless of user locale. This imposes a specific language on all users without offering configuration, selection, or documenting a region-specific limitation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends the target skill package to an HTTP/API scanning service instead of performing analysis strictly locally. Because the skill’s stated purpose is scanning workspace skills, this creates a real data-exfiltration/privacy risk: local code and embedded secrets may be transmitted off-host, and the default local endpoint uses plain HTTP, which further weakens transport security if changed to a non-local host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code uploads local skill archives to a remote or configurable scan service without any visible user-facing warning at runtime. In the context of a security scanner, this is especially sensitive because users may expect local auditing, yet archives can contain proprietary code, credentials, or internal documentation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The scanner reads cloud credentials from environment variables and uses them to authenticate outbound requests. While common operationally, this is still a meaningful security concern here because the skill description does not make credential use obvious, so users may unknowingly grant a scanning tool access to cloud-linked actions and network operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Reading access key and secret key from environment variables is standard practice, but here it is done without clear disclosure in a user-facing scanning tool. In context, the hidden credential dependency increases surprise and risk because users may not expect a workspace scanner to consume cloud credentials and perform authenticated outbound operations.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

The dependency specification requests>=2.28,<3 does not pin to a specific patched version, so resolution may select a release with known vulnerabilities depending on the environment and lock state. In a security-scanning skill, network-facing libraries are especially sensitive because the tool may process attacker-controlled URLs or remote content, making dependency hygiene more important.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The docstring describes the method as if it were a simple polling helper, but the implementation constructs signed requests and repeatedly calls a remote API endpoint (L296-L311). This understates the method's real behavior and external side effects in a security-sensitive scanner.

Content

No source excerpt is available for this finding.