Back to skill

Security audit

Chain Of Custody

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for generating chain-of-custody reports, but it sends highly sensitive investigation and identity data to an external API without enough privacy, retention, or minimization guidance.

Review this carefully before installing in any law-enforcement, legal, corporate investigation, or incident-response workflow. Do not submit real case details, evidence descriptions, names, email addresses, locations, hashes, or custody history unless your organization has approved this external service and its retention, deletion, access-control, logging, and data-residency practices. Prefer redacted test data or an internally hosted/local report generator for confidential matters.

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
Findings (1)

other

Warning
Location
SKILL.md:68
Finding

Unnecessary Collection and External Disclosure of Sensitive Investigation Data

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:68-73, 118-144, 191-192; openapi.json:123-160
Vulnerability Type: Excessive collection and external disclosure of sensitive data
Risk Level: Medium

Vulnerable Code Snippets

SKILL.md:68-73:

json
"sessionId": "sess-2024-001-xyz",
"userId": 42,
"timestamp": "2024-01-15T10:30:00Z",
"userEmail": "john.smith@agency.gov",
"userName": "jsmith"

SKILL.md:118-144:

text
| reportData.evidenceItems[].evidenceId | string | Yes | Unique evidence identifier |
| reportData.evidenceItems[].evidenceType | string | Yes | Category of evidence (e.g., "Hard Drive", "Mobile Device", "Documents") |
| reportData.evidenceItems[].description | string | Yes | Detailed description of the evidence |
| reportData.evidenceItems[].collectionDate | string | Yes | ISO 8601 timestamp when evidence was collected |
| reportData.evidenceItems[].collectionLocation | string | Yes | Physical or logical location where evidence was collected |
| reportData.evidenceItems[].collectedBy | string | Yes | Name of person who collected the evidence |
| reportData.evidenceItems[].hashAlgorithm | string | Yes | Hash algorithm used (e.g., "SHA-256", "MD5") |
| reportData.evidenceItems[].hashValue | string | Yes | Computed hash value for integrity verification |
| reportData.evidenceItems[].custodyChain | array | Yes | Array of CustodyEntry objects documenting evidence transfers |
| reportData.evidenceItems[].custodyChain[].person | string | Yes | Name of person handling evidence |
| reportData.evidenceItems[].custodyChain[].timestamp | string | Yes | ISO 8601 timestamp of custody event |
| reportData.evidenceItems[].custodyChain[].purpose | string | Yes | Purpose of custody transfer (e.g., "Initial collection", "Examination") |
| reportData.evidenceItems[].custodyChain[].action | string | Yes | Description of action taken |
| reportData.sessionId | string | Yes | Session iden
...[truncated 4713 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the outer userId, userEmail, and userName fields unless a documented and necessary authorization or auditing purpose exists.
  2. Eliminate duplicate session identifiers. If a session identifier is operationally required, use a short-lived, random, non-identifying value and document its purpose.
  3. Make all metadata unrelated to report rendering optional and exclude it by default.
  4. Add an explicit confirmation step that identifies the recipient and summarizes the sensitive fields before any investigation data is transmitted.
  5. Add redaction controls for names, email addresses, collection locations, case names, evidence descriptions, and other sensitive fields.
  6. Document the service operator, processing purposes, storage locations, retention period, logging policy, subprocessors, access controls, deletion mechanism, and incident-response process.
  7. Provide a self-hosted or fully local report-generation option for confidential and legally restricted evidence.
  8. Define the reviewed HTTPS endpoint explicitly in the OpenAPI servers section and ensure certificate validation is mandatory.
  9. Apply request-size and collection limits to evidence and custody arrays, and prohibit unrestricted additional properties where they are not needed.
  10. Require authentication and authorization appropriate to forensic records, while ensuring credentials are supplied through a secure integration mechanism rather than embedded in Skill files.
  11. Conduct a separate review of the server implementation, including authorization, tenant isolation, retention, audit logging, output encoding, and deletion behavior, because those controls cannot be assessed from the present package.
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 (4)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The example request contains realistic personally identifying information and sensitive investigative context, including full names, email address, case details, locations, and evidence descriptions, without any warning that the data is fictional or should be sanitized. In a forensic/legal workflow, readers may copy these examples into logs, tests, or downstream systems, increasing the risk of privacy leakage, accidental disclosure of investigative data, and normalization of unsafe data-handling practices.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
85% confidence
Finding

The skill directs users to an external API endpoint, which means potentially highly sensitive forensic and chain-of-custody data may be transmitted to a third-party service outside the user's controlled environment. Given the data types involved—case numbers, investigator identities, evidence descriptions, locations, and hashes—external transmission materially increases confidentiality, compliance, and evidentiary-handling risk if data residency, retention, authentication, or transport protections are inadequate.

Content

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

md
# References

- **Kong Route:** https://api.mkkpro.com/compliance/chain-of-custody
- **API Docs:** https://api.mkkpro.com:8115/docs

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The POST endpoint sends structured case information and optional userEmail/userName fields to a remote service, yet the endpoint description contains no user-facing warning about transmitting potentially sensitive investigative and personal data. For markdown/code warning criteria adapted to API-facing skill definitions, this is a missing disclosure about data/privacy impact.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This is a manifest/config file, so vague-trigger review applies. The operation is described only as 'Generate Custody Report' / 'Generate Chain of Custody HTML report' without scope limitations, exclusion conditions, or contextual constraints, which makes activation intent underspecified for a skill integrating from this spec.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.