Back to skill

Security audit

Returns Reverse Logistics

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent returns-operations reference, but users should apply privacy controls and human approval before acting on refunds, fraud holds, or customer data.

Install is reasonable for teams handling retail returns, but treat it as decision support. Verify recipients, minimize or mask customer data, keep fraud notes internal, follow regional law and company policy, and require human approval before issuing refunds, denying claims, suspending sellers, reporting customers, or running the eval script.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Error
Location
evals/run_evals.py:7
Finding
Unverified External Python Module Import Enables Arbitrary Code Execution## Vulnerability Details **File Location**: `evals/run_evals.py:7-10` **Vulnerability Type**: Unsafe external dependency loading through Python path manipulation **Risk Level**: High **Vulnerable Code**: ```python REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parent sys.path.insert(0, str(REPO_ROOT / "shared")) from eval_framework import main ``` ### Technical Analysis The evaluation runner computes a directory outside the audited project, prepends its `shared` subdirectory to `sys.path`, and imports `eval_framework` from that search path. Python executes a module's top-level code when importing it. The imported dependency is not included in the audited project and is not constrained by a package version, trusted installation location, lockfile, signature, or cryptographic integrity check. Prepending the directory gives it priority over later module search locations. Consequently, a malicious or compromised `eval_framework.py` or equivalent importable package in the computed `shared` directory would execute automatically when the evaluation runner starts. Exploitation requires an attacker to control or modify the external `shared` directory or its deployment contents. The audit did not establish that this directory is attacker-writable, so this prerequisite is environment-dependent. ### Attack Path 1. The attacker gains write access to the `shared` directory derived four parent levels above `evals/run_evals.py`. 2. The attacker creates or replaces `eval_framework.py`, or an equivalent importable `eval_framework` package, with malicious top-level Python code. 3. A user or automated service executes `python evals/run_evals.py`. 4. The script inserts the attacker-controlled directory at index zero of `sys.path`. 5. Python resolves `from eval_framework import main` to the attacker's module. 6. The malicious top-level code executes with the privileges and environment of the evaluation process before `main() ...[truncated 586 chars]
Remediation
## Remediation Suggestions 1. Package `eval_framework` as a normal, trusted dependency and pin its exact version and hashes in a lockfile or requirements file. 2. Prefer an audited dependency installed into an isolated virtual environment rather than modifying `sys.path` at runtime. 3. If the framework is project-specific, vendor its reviewed source within the repository and import it through an explicit package structure. 4. If loading from an external directory is unavoidable: - Resolve and validate the canonical module path before execution. - Restrict the source directory to a trusted, administrator-controlled location. - Verify the module against a cryptographic digest or signature. - Reject symlinks and unexpected package layouts where applicable. 5. Run the evaluator in a least-privileged sandbox with no unnecessary credentials, restricted filesystem access, and limited network access. 6. Add CI checks that fail when imports resolve outside approved dependency roots.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (21)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
"weight": 0.25,
          "rating": "pass",
          "score": 1.0,
          "reasoning": "Agent approves the RMA without hesitation, correctly identifying all key factors: within 30-day window (12 days), valid return reason, high-value customer ($4,200 LTV), and acceptable return rate (12%). Provides clear next steps including RMA label and return instructions, and communicates expected refund timeline (3-5 business days). No inappropriate fraud flags despite the subjective return reason."
        },
        {
          "criterion": "restocking_fee",
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
"weight": 0.25,
          "rating": "pass",
          "score": 1.0,
          "reasoning": "Agent approves the RMA without hesitation, correctly identifying all key factors: within 30-day window (12 days), valid return reason, high-value customer ($4,200 LTV), and acceptable return rate (12%). Provides clear next steps including RMA label and return instructions, and communicates expected refund timeline (3-5 business days). No inappropriate fraud flags despite the subjective return reason."
        },
        {
          "criterion": "restocking_fee",
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
"weight": 0.25,
          "rating": "pass",
          "score": 1.0,
          "reasoning": "Agent approves the RMA without hesitation, correctly identifying all key factors: within 30-day window (12 days), valid return reason, high-value customer ($4,200 LTV), and acceptable return rate (12%). Provides clear next steps including RMA label and return instructions, and communicates expected refund timeline (3-5 business days). No inappropriate fraud flags despite the subjective return reason."
        },
        {
          "criterion": "restocking_fee",
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
"weight": 0.25,
          "rating": "pass",
          "score": 1.0,
          "reasoning": "Agent approves the RMA without hesitation, correctly identifying all key factors: within 30-day window (12 days), valid return reason, high-value customer ($4,200 LTV), and acceptable return rate (12%). Provides clear next steps including RMA label and return instructions, and communicates expected refund timeline (3-5 business days). No inappropriate fraud flags despite the subjective return reason."
        },
        {
          "criterion": "restocking_fee",
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
"weight": 0.25,
          "rating": "pass",
          "score": 1.0,
          "reasoning": "Agent approves the RMA without hesitation, correctly identifying all key factors: within 30-day window (12 days), valid return reason, high-value customer ($4,200 LTV), and acceptable return rate (12%). Provides clear next steps including RMA label and return instructions, and communicates expected refund timeline (3-5 business days). No inappropriate fraud flags despite the subjective return reason."
        },
        {
          "criterion": "restocking_fee",
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
"weight": 0.25,
          "rating": "pass",
          "score": 1.0,
          "reasoning": "Agent approves the RMA without hesitation, correctly identifying all key factors: within 30-day window (12 days), valid return reason, high-value customer ($4,200 LTV), and acceptable return rate (12%). Provides clear next steps including RMA label and return instructions, and communicates expected refund timeline (3-5 business days). No inappropriate fraud flags despite the subjective return reason."
        },
        {
          "criterion": "restocking_fee",
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
"criterion": "return_processing",
          "weight": 0.25,
          "rubric": {
            "pass": "Process the return. All items are within the 30-day window. Grade A items (12): full refund, no restocking fee (tags on = restockable). Grade B items (3): full refund — tags removed on apparel within window is accepted by most retailers; makeup on collar is a try-on hazard, not intentional damage. Grade C shoes (1): apply restocking fee — outdoor sole wear goes beyond trying on. Net refund: ~$2,595 (full refund minus ~$35 restocking on the shoes). Do NOT refuse the return or apply blanket fees as retaliation for the content creation pattern.",
            "fail": "Refuses the entire return. Applies punitive restocking fees across all 16 items. Alternatively, accepts everything including the worn shoes without any restocking fee."
          }
        },
Confidence
85% confidence
Finding
Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The manifest description says to use the skill when handling product returns, refund decisions, fraud detection, or warranty claims, but it does not define specific trigger phrases, boundaries, or exclusions. In a markdown/manifest context, this is broad enough to overlap with many ordinary customer-service conversations and may cause unintended invocation.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The file recommends monitoring a named customer's social media after a policy change, which introduces privacy-sensitive surveillance behavior without consent, minimization, or a defined legal basis. In a returns/fraud workflow, normalizing off-platform monitoring can lead to over-collection of personal data, discriminatory profiling, and compliance issues under privacy laws and internal acceptable-use policies.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**refund_decision:** The response grants the exception and provides a refund, which is correct, but deducts $150 for 'refurbishment cost' resulting in a net refund of $2,345 instead of the full $2,495. While it mentions this is a 'standard refund' and acknowledges the compelling medical circumstances, the deduction seems inappropriate for a compassionate medical exception with documented hospitalization. The rubric expects full refund to original payment method without restocking fees for such compelling circumstances. The response does document the exception rationale adequately.

**subscription_and_logistics:** The response thoroughly addresses both subscription and logistics issues. It recommends immediate cancellation of the Peloton subscription with prorated refund calculation (~$117 for 3 months of unused service during hospitalization), acknowledging the customer was paying for unused service. For logistics, it arranges 'white-glove pickup at no charge' and mentions this normally costs $250, appropriately handling the 140 lb bike return without asking the customer to transport it herself.

**disposition:** The response properly addresses disposition by routing the bike to 'certified pre-owned program at $1,995-2,195 (80-88% of retail)' which aligns with the strong Peloton resale market. It mentions refurbishment including 'deep clean, inspection, minor wear from 4 uses' and provides realistic recovery calculations. While it doesn't explicitly mention de-linking the customer's account, the overall disposition strategy is sound for a Grade A-B Peloton Bike+ with minimal usage.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**refund_decision:** The response grants the exception and provides a refund, which is correct, but deducts $150 for 'refurbishment cost' resulting in a net refund of $2,345 instead of the full $2,495. While it mentions this is a 'standard refund' and acknowledges the compelling medical circumstances, the deduction seems inappropriate for a compassionate medical exception with documented hospitalization. The rubric expects full refund to original payment method without restocking fees for such compelling circumstances. The response does document the exception rationale adequately.

**subscription_and_logistics:** The response thoroughly addresses both subscription and logistics issues. It recommends immediate cancellation of the Peloton subscription with prorated refund calculation (~$117 for 3 months of unused service during hospitalization), acknowledging the customer was paying for unused service. For logistics, it arranges 'white-glove pickup at no charge' and mentions this normally costs $250, appropriately handling the 140 lb bike return without asking the customer to transport it herself.

**disposition:** The response properly addresses disposition by routing the bike to 'certified pre-owned program at $1,995-2,195 (80-88% of retail)' which aligns with the strong Peloton resale market. It mentions refurbishment including 'deep clean, inspection, minor wear from 4 uses' and provides realistic recovery calculations. While it doesn't explicitly mention de-linking the customer's account, the overall disposition strategy is sound for a Grade A-B Peloton Bike+ with minimal usage.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The templates normalize inclusion of personal and transactional data such as customer names, emails, order numbers, payment method details, serial numbers, and claim identifiers, but provide no privacy or recipient-verification guardrails. In an operational setting, this increases the chance that users send unnecessary sensitive data to the wrong recipient or through inappropriate channels, creating avoidable data exposure risk.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The fraud-review section contains highly sensitive internal investigative data, including fraud score, signals, customer LTV, review actions, and operational instructions. Although labeled as an internal companion note, it lacks strong handling warnings or structural safeguards, so it could be copied into customer-facing communications or shared externally, exposing detection logic and sensitive customer profiling data.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The vendor and manufacturer claim templates encourage sharing customer identifiers, order references, and serial numbers with third parties without any instruction to confirm contractual, legal, or policy authorization for that disclosure. In returns and warranty workflows, this can lead to over-sharing of personal or device-linked data beyond what is necessary for claim processing.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The reference states that all thresholds, timelines, and cost assumptions reflect US retail and e-commerce operations. Because this is a general reference file and not clearly constrained to a US-only skill or workflow, it effectively forces a locale-specific framework without opt-in or explicit applicability checks.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Customer initiates return on website/app
  │
  ├── Automated policy check (within window? excluded category? customer in good standing?)
  │     ├── Auto-approve → Generate RMA + prepaid return label
  │     ├── Auto-deny → Display denial reason + alternatives
  │     └── Manual review queue → Agent reviews within 4 hours
  │
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**Key timing targets:**
| Step | Target | Stretch Goal |
|------|--------|-------------|
| RMA generation (auto-approve) | < 5 minutes | Instant |
| Return label delivery to customer | Immediate (email) | Immediate |
| Customer ship-back | < 7 days from RMA | < 5 days |
| Receiving scan at return centre | Day of delivery | Same as carrier delivery scan |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**Key timing targets:**
| Step | Target | Stretch Goal |
|------|--------|-------------|
| RMA generation (auto-approve) | < 5 minutes | Instant |
| Return label delivery to customer | Immediate (email) | Immediate |
| Customer ship-back | < 7 days from RMA | < 5 days |
| Receiving scan at return centre | Day of delivery | Same as carrier delivery scan |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
```
Return shipping cost estimate > 40% of product value?
  ├── Yes → Evaluate returnless refund
  │     ├── Product value < $50 → Auto-approve returnless refund
  │     ├── Product value $50-100 → Supervisor auto-approve
  │     ├── Product value $100-200 → Manager review (consider partial return — just the defective component)
  │     └── Product value > $200 → Case-by-case (may justify return shipping for high-value)
Confidence
85% confidence
Finding
Automatically approving returnless refunds for items under a value threshold can be exploited for fraud, especially if the decision is made solely from estimated shipping cost and product value. In this skill context, the workflow is explicitly intended to drive customer-facing refund decisions, so unsafe automation can directly cause financial loss at scale.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
The chargeback has regulatory timelines: Visa requires the merchant to respond within 20 days or the chargeback auto-closes in the cardholder's favour. The return has no such external deadline. This asymmetry means the chargeback demands attention first.

**Common Mistake:**
Processing the return refund without checking for an active chargeback. This is the #1 source of double-refund losses in e-commerce. The second mistake: immediately assuming fraud and antagonising a customer who may simply be confused about the process.

**Expert Approach:**
1. HALT the RMA process immediately. Add a "chargeback hold" flag to the RMA. Do not process a return refund while a chargeback is active.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
This JSON file includes a customer communication template addressing the customer as "Dear Mr. Park,". Using a specific honorific and inferred gender without confirming the customer's preference can violate language/locale or personalization policy expectations, especially when no opt-in or preference source is stated.

Static analysis

No suspicious patterns detected.