Back to skill

Security audit

NaviOffice Skill

Security checks for vulnerabilities and agentic risk

Overview

This NaviOffice integration is mostly purpose-aligned, but it gives broad access to sensitive business systems and its raw API clients can send the user's API token to unintended destinations.

Install only after reviewing whether this skill should have access to live NaviOffice HR, finance, CRM, inventory, and production data. Use a least-privilege, revocable API token; avoid production tokens until raw requests are restricted to trusted HTTPS NaviOffice hosts; and do not use the shell script with an untrusted or automatically generated .env file.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/navioffice.py:231
Finding

API Token Forwarding to Arbitrary Destinations Through Raw Requests

Content
View full analysis
str: """Execute a raw API call.""" if path.startswith("http"): url = path else: url = f"{NAVI_OFFICE_API_URL}{path}" return api(method, url) ``` JavaScript implementation: ```javascript let fullUrl = rawUrl; if (!rawUrl.startsWith('http://') && !rawUrl.startsWith('https://')) { fullUrl = config.domain + rawUrl; } const parsedUrl = new URL(fullUrl); const options = { hostname: parsedUrl.hostname, port: parsedUrl.port || (parsedUrl.protocol === 'https:' ? 443 : 80), path: parsedUrl.pathname + parsedUrl.search, method: method.toUpperCase(), headers: { 'X-Api-Token': config.apiToken, 'Content-Type': contentType } }; ``` ```javascript async function rawAPI(method, path, extraArgs = []) { const params = {}; for (let i = 0; i < extraArgs.length; i++) { const arg = extraArgs[i]; if (arg.startsWith('-')) { if (i + 1 < extraArgs.length && !extraArgs[i + 1].startsWith('-')) { const key = arg.replace(/^-+/, ''); params[key === 'X' ? 'X-Custom' : key] = extraArgs[i + 1]; i++; } } else if (arg.includes('=')) { const [key, value] = arg.split('='); params[key] = value; } } return api(method.toUpperCase(), path, params, null); } ``` Shell implementation: ```bash curl -s -X "$method" "$url" \ -H "X-Api-Token: ${NAVI_OFFICE_API_TOKEN}" \ -H "Content-Ty ...[truncated 2391 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/navioffice.js:128
Finding

API Credentials May Be Transmitted Over Plaintext HTTP

Content
View full analysis
None: """Validate the API domain; only the official domain is allowed by default.""" try: hostname = parse.urlparse(NAVI_OFFICE_API_URL).hostname or "" except Exception: die("NAVI_OFFICE_API_URL has an invalid format") allow_custom = str(NAVI_OFFICE_ALLOW_CUSTOM_DOMAIN).lower() == "true" if not allow_custom and hostname != "https://oa.teredy.com/api": die("NAVI_OFFICE_API_URL is not the official domain") ``` The token is then attached to the request: ```python headers = { "X-Api-Token": NAVI_OFFICE_API_TOKEN, "Content-Type": content_type } ``` The JavaScript implementation explicitly supports both HTTPS and plaintext HTTP: ```javascript const options = { hostname: parsedUrl.hostname, port: parsedUrl.port || (parsedUrl.protocol === 'https:' ? 443 : 80), path: parsedUrl.pathname + parsedUrl.search, method: method.toUpperCase(), headers: { 'X-Api-Token': config.apiToken, 'Content-Type': contentType } }; const client = parsedUrl.protocol === 'https:' ? https : http; ``` The shell implementation similarly sends the credential through `curl` without requiring an HTTPS URL: ```bash curl -s -X "$method" "$url" \ -H "X-Api-Token: ${NAVI_OFFICE_API_TOKEN}" \ -H "Content-Type: $content_type" \ "$@" ``` ### Technical Analysis When `NAVI_OFFICE_ALLOW_CUSTOM_DOMAIN=true`, the implementations do not restrict the custom endpoint to HTTPS. A value such as `http://office.example/api` is therefore accepted. The API token is an ...[truncated 1679 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/navioffice.sh:10
Finding

Shell Script Executes Skill Environment File as Arbitrary Code

Content
View full analysis
Remediation
View remediation
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (53)

Tainted flow: 'req' from os.environ.get (line 126, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The request destination is influenced by environment-controlled configuration and can result in authenticated network requests being sent to an attacker-controlled endpoint. Because the code always attaches the X-Api-Token header, misconfiguration or abuse of the raw path handling can disclose credentials and sensitive business data to an external host.

Content

Scanner excerpt · scripts/navioffice.py (reported line 132)May include surrounding context.

python
headers=headers,
            method=method.upper()
        )
        with request.urlopen(req) as response:
            charset = response.headers.get_content_charset() or "utf-8"
            return response.read().decode(charset, errors="replace")
    except HTTPError as e:

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the implementation contains an undeclared generic raw API feature, the documented module list materially understates the reachable surface area. In an enterprise OA context handling HR, finance, CRM, and inventory data, arbitrary API-path access can expose sensitive records or permit unauthorized business actions far beyond the advertised interface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the implementation contains an undeclared generic raw API feature, the documented module list materially understates the reachable surface area. In an enterprise OA context handling HR, finance, CRM, and inventory data, arbitrary API-path access can expose sensitive records or permit unauthorized business actions far beyond the advertised interface.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the implementation contains an undeclared generic raw API feature, the documented module list materially understates the reachable surface area. In an enterprise OA context handling HR, finance, CRM, and inventory data, arbitrary API-path access can expose sensitive records or permit unauthorized business actions far beyond the advertised interface.

Content

No source excerpt is available for this finding.

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 · scripts/navioffice.js (reported line 15)May include surrounding context.

js
// ── 常量定义 ───────────────────────────────────────────────────────

const ENV_FILE = '.env';
const DEFAULT_DOMAIN = 'https://oa.teredy.com/api';

// ── 全局变量 ───────────────────────────────────────────────────────

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The raw command allows arbitrary authenticated API requests to any path, which exceeds the stated CRM/business-module use case and effectively turns the skill into a general-purpose OA API client. In a skill context, this broad capability can be abused to access sensitive administrative, HR, finance, or configuration endpoints using the stored API token.

Content

No source excerpt is available for this finding.

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 · scripts/navioffice.js (reported line 36)May include surrounding context.

js
try:
    from dotenv import load_dotenv
except ImportError:
    # 如果没有 python-dotenv,提供简单的 .env 加载实现
    def load_dotenv(dotenv_path=None):
        if dotenv_path and os.path.exists(dotenv_path):
            with open(dotenv_path) as f:

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 · scripts/navioffice.py (reported line 19)May include surrounding context.

python
try:
    from dotenv import load_dotenv
except ImportError:
    # 如果没有 python-dotenv,提供简单的 .env 加载实现
    def load_dotenv(dotenv_path=None):
        if dotenv_path and os.path.exists(dotenv_path):
            with open(dotenv_path) as f:

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The generic raw API command permits arbitrary authenticated access to backend endpoints beyond the declared CRM command set. In a skill context, this bypasses intended guardrails and can be used to reach administrative, HR, finance, or other sensitive OA APIs with the user's token.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The raw API command accepts absolute URLs and sends the authentication token automatically, without a clear warning that this can disclose credentials to third parties. This is particularly dangerous for an agent skill because a user may believe they are only invoking internal OA functionality while the tool can be steered to external destinations.

Content

No source excerpt is available for this finding.

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 · scripts/navioffice.py (reported line 34)May include surrounding context.

python
SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
SKILL_DIR="$(dirname "$SCRIPT_DIR")"
ENV_FILE="${SKILL_DIR}/.env"

# ── 加载环境变量 ──────────────────────────────────────────────────────
if [[ -f "$ENV_FILE" ]]; then

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 · scripts/navioffice.sh (reported line 8)May include surrounding context.

sh
SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
SKILL_DIR="$(dirname "$SCRIPT_DIR")"
ENV_FILE="${SKILL_DIR}/.env"

# ── 加载环境变量 ──────────────────────────────────────────────────────
if [[ -f "$ENV_FILE" ]]; then

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares environment variables, network access, and executable CLI scripts, but does not define an explicit permission scope such as allowed tools or operational boundaries. In practice, that leaves consumers without a machine-readable restriction model and increases the chance that the skill can make external requests or invoke shell-backed behavior more broadly than expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Line L09 documents attendance_queryAllRecords for querying all employees' attendance records and labels it for administrators, but the file provides no user-facing warning about the privacy sensitivity of accessing other employees' data. For markdown files, descriptions should warn when behavior could affect user privacy or expose sensitive personnel information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Lines L28-L39 document attendance_applyLeave, which submits a leave request using user-provided details, but there is no warning that the action creates or modifies attendance/leave records. Markdown skill descriptions should disclose behaviors that can affect user data or system state so users understand the consequences before invoking the action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation exposes a state-changing business operation that creates commission records but does not clearly warn the agent or end user that invoking it will modify production OA data. In an MCP/agent setting, missing side-effect disclosure increases the chance of accidental execution, unauthorized record creation, or workflow corruption through prompt-induced tool use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This operation creates a new commission from an existing sales order, which can directly alter business records and downstream processes, yet the skill text provides no warning about side effects or need for explicit approval. Because it chains from queryable sales orders to a write action, an agent could more easily be induced to perform unintended business transactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file explains how to query CRM records and use raw API requests, including leads, accounts, opportunities, contracts, invoices, and follow-up records. Those operations can expose customer and business data, but the document provides no privacy, authorization, or data-handling warning to the user.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document explicitly tells users they can arbitrarily combine requests and manually provide bodies and headers via navioffice raw. Because raw API access can bypass higher-level safeguards and may retrieve or affect sensitive CRM data, the markdown should disclose that risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents creation of CRM customer records containing personal and financial data such as phone numbers, email, address, tax number, bank name, bank account, and credit terms, but provides no warning that these operations persist sensitive data or may require user confirmation. In an agent setting, this increases the risk of inadvertent privacy-impacting writes, over-collection, or unauthorized record creation based on ambiguous user prompts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The opportunity creation flow writes sales pipeline records and links them to customers and orders, yet the documentation does not warn that invoking this tool changes business state and can affect forecasting, reporting, and pipeline integrity. In an autonomous or semi-autonomous agent workflow, missing write-impact disclosure makes accidental or unauthorized manipulation of commercial records more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This documentation exposes multiple finance record creation operations for receivables, payables, and expenses, but provides no warning that these actions modify accounting data or require elevated authorization and human confirmation. In an agentic context, that omission increases the chance that an LLM-driven assistant will execute state-changing financial actions from ambiguous or manipulated prompts, potentially causing fraudulent entries, accounting errors, or business process abuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation exposes create/update HR operations for highly sensitive employee data, including identity numbers, bank card numbers, salary access, and employment status changes, without any explicit warning, consent guidance, or authorization checks in the skill description. In an agent setting, this increases the risk of unsafe automation, unauthorized record modification, and mishandling of PII because the model may treat these operations as routine administrative actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document exposes inventory-mutating operations such as material creation, inbound creation, and outbound creation without any warning that these actions change business records and stock levels. In an agent setting, this increases the chance of unsafe or unintended execution, which can cause inventory inaccuracies, fraudulent-looking transactions, or operational disruption if a user or downstream agent invokes the tools without explicit confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This is a markdown file, so SQP-2 applies to omissions in user-facing warnings. The sections for mes_createProductionOrder and mes_createWorkOrder describe creating manufacturing records but provide no warning that these actions will create or alter live MES data, which could affect scheduling, inventory, or downstream operations.

Content

No source excerpt is available for this finding.