Back to skill

Security audit

full-flow-testing

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent API-testing assistant, but it stores sensitive API test data and shares test-derived knowledge without enough safeguards.

Use this only with test or low-risk API accounts unless you add redaction and retention controls. Sanitize workspace user IDs, avoid long-lived secrets, review reports before sharing, and require independent review before publishing global knowledge-base updates.

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
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:21
Finding
Session-Wide Agent Role and Response Hijacking## Vulnerability Details **File Location**: `SKILL.md`, lines 21-24 **Vulnerability Type**: Agent instruction hijacking **Risk Level**: High **Vulnerable Code Snippet**: ```markdown You are the **End-to-End API Testing Expert** and must strictly follow these rules: - **Testing only**: Refuse to answer any question unrelated to API testing (casual chat, general coding consultation, life questions, etc.). - **Standard process**: Before each testing step, first report your understanding, then wait for explicit user confirmation (`confirm` or `continue`) before proceeding. ``` Related mandatory behavior also appears at lines 86-90 and 314-315: ```markdown - **At the start of every reply, prominently show the current user**: ``` ========================================== Current user: <user_id> ========================================== ``` ``` ```markdown - If user tries to switch role or request non-testing tasks, refuse similarly. ``` ### Technical Analysis The Skill contains imperative instructions that redefine the agent's role and impose session-wide restrictions whenever the Skill is loaded. In particular, it orders the agent to refuse all tasks outside API testing and to prepend a fixed identity banner to every response. These requirements are not scoped to an explicit testing operation or a temporary command context. Consequently, loading the Skill can alter the agent's current goals and response policy rather than merely providing API-testing functionality. The explicit instruction to resist role switching further attempts to preserve the Skill's control over subsequent interactions. ### Attack Path 1. The Skill is installed or loaded into an agent session. 2. The agent interprets the mandatory role instructions in `SKILL.md`. 3. The user submits a legitimate request outside the Skill's API-testing scope. 4. The Skill directs the agent to refuse that request regardless of the ...[truncated 528 chars]
Remediation
## Remediation Suggestions - Scope all specialized behavior to explicit commands such as `!test` and terminate that scope when the testing operation ends. - Remove the blanket requirement to refuse unrelated requests. - Replace “must strictly follow” role-redefinition language with capability documentation. - Do not require a fixed prefix on every agent response; show workspace identity only when relevant to a testing operation. - Explicitly state that platform, system, developer, and current user instructions take precedence over Skill documentation. - Add a clear activation and deactivation boundary so merely loading the Skill does not alter unrelated conversation behavior.

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:49
Finding
Shared Knowledge Base Permits Persistent Cross-User Data Poisoning## Vulnerability Details **File Location**: `SKILL.md`, lines 49-50 **Vulnerability Type**: Persistent shared-state poisoning **Risk Level**: High **Vulnerable Code Snippet**: ```markdown - **Update permission**: Any user may propose updates based on newly confirmed business information during testing; updates require explicit confirmation. - **Read permission**: Any user can query the KB (via `!test query <keyword>`). ``` The persistence and synchronization flow is defined at lines 105-110: ```markdown - Before each test execution, check the latest update time of global `changelog.md`. If it is newer than the local cache, prompt: "Global knowledge base has updates. Pull latest version?" Overwrite local cache only after user confirmation. - For new business information found during testing, after mode completion summarize and ask: "New business information detected: ... Update to global knowledge base?" Options: update all / selective update / keep local only / discard. ``` The manual commit operation is defined at lines 297-301: ```markdown ## 6.2 Manual Global KB Update - Command: `!test update-knowledge` - Read local cached changes marked as "pending submission" (usually from prior confirmed items), then ask one by one whether to commit each change to global KB. ``` ### Technical Analysis The company-level knowledge base is persistent, shared among users, and used to inform later API tests. The specification permits any user to propose updates and provides a path for committing those changes into the shared store. User confirmation is not an adequate authorization boundary when the same untrusted user can supply the proposed content and approve its persistence. The design does not define authenticated writer roles, independent review, trusted provenance, schema validation, cryptographic integrity, or a quarantine area for untrusted proposals. As a result, attacker-controlled API descriptions, paramet ...[truncated 1205 chars]
Remediation
## Remediation Suggestions - Restrict global knowledge-base write access to authenticated maintainers or designated reviewers. - Store ordinary user submissions in a separate, non-authoritative proposal queue. - Require independent approval before promoting proposed data to the trusted knowledge base. - Record immutable provenance for every change, including author, reviewer, timestamp, source, and diff. - Validate submitted content against an approved schema and reject instructions or fields unrelated to API documentation. - Use version control with signed commits, protected branches, and rollback support. - Display the trust status and source of synchronized entries to downstream users. - Prevent a submitting user from being the sole approver of their own change.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:54
Finding
Unsanitized User Identifier Is Used as a Workspace Path Component## Vulnerability Details **File Location**: `SKILL.md`, lines 54-57 **Vulnerability Type**: Path traversal through user-controlled workspace identifier **Risk Level**: High **Vulnerable Code Snippet**: ```markdown ## 1.2 User Personal Workspace - **Base path**: `<USER_WORKSPACE_BASE>/<user_id>/` - `<user_id>` should use the user's provided name/employee ID if available; otherwise use `anonymous_<timestamp>`. ``` The user input is accepted directly at lines 79-84: ```markdown Please provide your username or employee ID so I can create your isolated workspace: ``` - Once the user replies, treat it as `user_id`, then **immediately** confirm and display: ```markdown Workspace created successfully. Current user: <user_id> Workspace: test_assistant_users/<user_id>/ ``` The resulting path is accessed at lines 125-127: ```markdown 2. **Create/load user workspace**: - Check `<USER_WORKSPACE_BASE>/<user_id>/`; if missing, create directory and `session_state.json` template. - Read `session_state.json` to restore previous mode and pending confirmation step (if any). ``` ### Technical Analysis The specification directs the implementation to treat the user's response as `user_id` and interpolate it into a filesystem path. No identifier validation, separator rejection, canonicalization, symbolic-link protection, or post-resolution containment check is required. If implemented literally, values containing `../`, absolute path syntax, platform-specific separators, or symbolic-link-assisted paths could resolve outside `USER_WORKSPACE_BASE`. Later operations create and read session files, temporary files, and reports beneath the resulting path, turning the defect into an arbitrary-path read/write primitive within the process account's permissions. ### Attack Path 1. The Skill asks the user for a username or employee ID. 2. The attacker supplies a path-like ...[truncated 927 chars]
Remediation
## Remediation Suggestions - Accept only identifiers matching a strict allowlist such as `[A-Za-z0-9_-]{1,64}`. - Reject absolute paths, path separators, null bytes, dot segments, control characters, and platform-specific alternate separators. - Resolve the workspace root and candidate path to canonical paths before any filesystem access. - Verify that the resolved candidate remains a strict descendant of the configured workspace root. - Open directories and files using no-follow semantics where supported to prevent symbolic-link traversal. - Assign an internal random workspace identifier rather than using the display name directly as a directory name. - Apply restrictive per-user filesystem permissions and test traversal cases on every supported operating system.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:165
Finding
Authentication Tokens and Sensitive API Data May Be Persisted Without Redaction## Vulnerability Details **File Location**: `SKILL.md`, lines 165-168 **Vulnerability Type**: Plaintext sensitive-data retention **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown 4. **Generate test report**: - Save to `<user_workspace>/test_reports/self_test_mode_<timestamp>.md`. - Report includes: summary (pass rate), per-API request/response details, failure root cause analysis. ``` Token extraction and reuse are specified at lines 217-223: ```markdown - Provide textual flow diagram: step1 -> step2 -> ... and mark API plus key parameter handoff (e.g. token, orderId). ... - Call APIs in order; auto-extract parameters from previous responses (e.g. token from login, orderId from create-order). - Record request/response and status at each step. ``` Account and token handling is specified at lines 245-248: ```markdown 3. **Run tests**: - Use provided accounts to obtain tokens and craft privilege escalation requests. - Send each security test request; analyze status code and response content. 4. **Generate test report**: - Save to `<user_workspace>/test_reports/security_audit_<timestamp>.md`. - Include: result per test item (pass/vulnerable), vulnerability details (request/response excerpt), severity (high/medium/low), remediation suggestions. ``` ### Technical Analysis The Skill explicitly handles user accounts and authentication tokens, automatically extracts values from responses, records request and response details, and saves those details in Markdown reports. It does not require the removal of authorization headers, cookies, passwords, tokens, personal information, or sensitive response fields before persistence. The optional reference to a “desensitized” shared report does not protect ordinary personal reports, local caches, state files, temporary files, or diagnostic output. Detailed transaction logging can therefore place reusable bear ...[truncated 1108 chars]
Remediation
## Remediation Suggestions - Redact `Authorization`, `Proxy-Authorization`, `Cookie`, `Set-Cookie`, API-key headers, passwords, tokens, and client secrets before logging or persistence. - Apply schema-aware redaction to sensitive request and response fields, including personal identifiers and authentication artifacts. - Log only the minimum data necessary to reproduce a result; use hashes or truncated identifiers where possible. - Never store account passwords in reports, state files, caches, or temporary files. - Store necessary short-lived secrets in an approved secret manager or protected in-memory structure. - Encrypt sensitive artifacts at rest and enforce restrictive user-specific file permissions. - Define automatic retention and secure-deletion policies for reports and temporary files. - Add tests that verify secrets cannot appear in generated reports, error messages, or diagnostic excerpts.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger phrase "testing assistant" is overly generic and could be invoked unintentionally during normal conversation about testing, causing the skill to activate without explicit user intent. In an enterprise setting, unintended activation may lead to unnecessary workspace creation, disclosure of testing context, or accidental execution of testing workflows.

Ssd 3

Medium
Confidence
93% confidence
Finding
The global knowledge accumulation feature allows test-derived business knowledge to be promoted into a company-wide shared knowledge base accessible by all users. Without strict classification, review, and redaction, this can propagate sensitive implementation details, customer data fragments, auth behavior, or internal API semantics across user boundaries, undermining the claimed isolation model.

Ssd 3

Medium
Confidence
92% confidence
Finding
The skill instructs the assistant to prominently repeat the current user's username or employee ID in every reply. Repeatedly echoing identifiers increases exposure in shared screens, logs, transcripts, copied outputs, and chat history, turning a one-time identifier submission into persistent disclosure.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The skill allows mode switching through broad natural-language phrases like 'switch to mode <number>' or 'enter <mode_name>', which can be matched from ordinary conversation or quoted text rather than an intentional command. In a tool that can run tests, query shared knowledge, or switch operational modes, ambiguous activation increases the risk of unintended actions and confusion about user intent.

Ssd 3

Medium
Confidence
95% confidence
Finding
The reporting instructions require persistent storage of detailed request/response contents and user-provided logs, which commonly contain credentials, tokens, personal data, internal endpoints, and business secrets. Persisting raw artifacts amplifies the blast radius of any workspace compromise and creates long-lived sensitive-data retention without minimization or redaction controls.

External Transmission

Medium
Category
Data Exfiltration
Content
print(f"Request payload: {json.dumps(payload, ensure_ascii=False, indent=2)}")
    
    try:
        response = requests.post(url, headers=headers, json=payload, timeout=10)
        
        print(f"\n📥 Response status code: {response.status_code}")
        print(f"⏱️  Response time: {response.elapsed.total_seconds()*1000:.0f}ms")
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The skill requires explicit user confirmation using the English keywords `confirm` or `continue`, which imposes a language constraint without opt-in or alternatives. This is a natural-language policy concern because it forces a specific language for interaction rather than offering localized choices.

Vague Triggers

Low
Confidence
80% confidence
Finding
The initialization flow states it runs on first `!test`, but the skill does not clearly define whether only the exact command `!test` activates initialization or whether similar natural-language requests also do. This lack of trigger-boundary detail can create ambiguity about when the skill should activate versus continue normal conversation.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
Several prompts instruct the user to respond with English-specific tokens like `skip`, `confirm`, `yes`, and `no` without offering localized equivalents. This creates an unnecessary language restriction that is not justified as region-specific or optional.

Static analysis

No suspicious patterns detected.