数字取证链上存证,合规审计全程留痕
简介
为执法、法务及安全团队提供符合证据链规范的媒体文件取证处理,支持不可篡改存储、完整性校验与合规审计追踪。
原始描述
Forensic media triage with chain of custody. Use when receiving images, videos, audio, PDFs, or documents that need evidence-grade handling, integrity verifi...
通过你的 Agent 添加
安装目录:evidenceops/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
EvidenceOps 综合评估
核心用法
EvidenceOps 是一套面向数字取证场景的专业级媒体文件处理框架,设计目标是建立从接收、存储到归档的全链路证据链(Chain of Custody)。其标准工作流程涵盖八个环节:接收媒体文件→创建或选择案件→只读阶段暂存→提取元数据→生成衍生文件→录入证据库→更新案件清单→返回收据凭证。系统支持图片、视频、音频、PDF 及通用文档格式,自动计算 SHA-256 哈希值,并将原件以追加只读方式存入加密保管库,确保任何后续操作均不触碰原始证据。
显著优点
- 合规性设计:内置 LGPD/GDPR 数据保护考量,支持敏感标签、保留期限配置及数据主体访问请求流程,满足跨国法律合规要求。
- 防篡改架构:采用哈希链式审计日志(JSONL 格式),所有操作(案件创建、证据录入、导出、访问)均留痕,支持完整性校验与溯源。
- 灵活存储后端:默认本地文件系统驱动,可选 S3 兼容对象存储,支持对象锁定(Object Lock)与跨区域容灾。
- 通道安全控制:通过白名单机制限制证据来源(如 WhatsApp、Telegram、邮件等),支持配对验证,阻断公共频道自动录入,降低社会工程学攻击面。
- 路径与输入净化:强制路径规范化,禁止目录遍历、空字节及主目录简写,违规操作触发审计日志并返回
E_PATH_TRAVERSAL错误。
潜在缺点与局限性
- 单点依赖:核心功能依赖
@openclaw/evidence-vault插件,若插件未初始化或版本不兼容,整个工作流将中断。 - 存储成本敏感:默认 7 年保留期(2555 天)及 500MB 单文件上限,对大规模视频取证场景可能产生显著存储开销。
- 功能边界模糊:虽然声明「绝不执行未信任代码」,但系统仍调用
Bash工具进行元数据提取,若输入文件本身为恶意构造(如畸形 EXIF 或 PDF 解析漏洞),存在潜在利用面。 - 离线验证局限:完整性校验依赖本地哈希比对,若底层存储(如 S3)密钥泄露或管理员权限滥用,哈希链本身无法检测高级持续性威胁(APT)对存储层的篡改。
适合人群
- 执法机构数字取证单元:需符合证据链规范的刑事案件电子证据采集。
- 企业法务与合规团队:内部调查、员工不当行为取证及监管报送。
- 安全运营中心(SOC):高可信度安全事件证据固化与威胁情报存档。
- 第三方审计与律所:客户案件材料的安全托管与跨组织证据交换。
常规风险
- 配置误用:若管理员关闭
requirePairing或放宽channelAllowlist,攻击者可伪造证据来源,破坏证据链可信度。 - 元数据泄露:EXIF 地理坐标、设备序列号等敏感信息在提取后若未脱敏,可能导致隐私合规事件。
- 长期密钥管理:S3 后端若未启用对象锁定或密钥轮换策略,存在凭证泄露后证据被静默删除或覆盖的风险。
- 社会工程学绕过:即使技术控制严格,攻击者仍可能通过诱骗授权用户(已配对设备)提交篡改文件,需配合用户培训与操作日志人工复核。
技能正文
name: evidenceops description: Forensic media triage with chain of custody. Use when receiving images, videos, audio, PDFs, or documents that need evidence-grade handling, integrity verification, and audit trails. version: 1.0.0 author: OpenClaw Community metadata: openclaw: emoji: "🔬" tools: - evidence.ingest - evidence.verify - evidence.manifest - evidence.export - evidence.access_log - Read - Write - Bash install: npm: "@openclaw/evidence-vault" os: - darwin - linux - win32 categories: - forensics - security - compliance tags: - evidence - chain-of-custody - forensic - integrity - audit
EvidenceOps - Forensic Media Triage
What It Does
EvidenceOps provides forensic-grade handling of media files with complete chain of custody:
- Media Intake - Accept images, videos, audio, PDFs, and documents from any channel
- Immutable Storage - Store originals in append-only vault with cryptographic hashes
- Metadata Extraction - Extract EXIF, file properties, and media information without altering originals
- Derivative Generation - Create thumbnails, transcripts, previews in separate folders
- Chain of Custody - Maintain tamper-evident audit trail with hash chain
- Integrity Verification - Verify evidence hasn't been modified post-ingest
- Audit Trail - Complete JSONL audit log for compliance
What It NEVER Does
- NEVER modifies original evidence files after ingest
- NEVER stores secrets, API keys, or credentials in manifests or logs
- NEVER accepts unsanitized paths from user input
- NEVER executes untrusted code or downloads remote scripts
- NEVER exfiltrates data to external services without explicit configuration
- NEVER bypasses channel allowlists or pairing requirements
- NEVER stores real personal data in example files
Prerequisites
Before using this skill, ensure:
- Plugin
@openclaw/evidence-vaultis installed and initialized - Vault storage directory is configured with appropriate permissions
- Channel allowlist is configured for trusted sources only
- Retention policies comply with your legal requirements
Workflow
Step 1: Receive Media
When media is received via any channel:
User sends: [image/video/document]
Required Information:
- File content (from attachment)
- Original filename
- Source channel (whatsapp, telegram, email, etc.)
- Sender identifier
- Message ID (if available)
Step 2: Create or Select Case
IF user specifies existing caseId:
USE that caseId
ELSE IF user requests new case:
CREATE case with format: case-{YYYY}-{NNN}
EXAMPLE: case-2026-001
ELSE:
ASK user: "Should I create a new case or add to existing case [case-2026-XXX]?"
Case ID Format: case-{year}-{sequence}
- Must match pattern:
^case-[a-zA-Z0-9_-]+$ - Examples:
case-2026-001,case-incident-alpha,case-legal-2026-q1
Step 3: Stage Original (Read-Only)
Before ingest:
- Save received file to temporary staging area
- Calculate SHA-256 hash immediately
- Record file size and MIME type
- DO NOT modify the file
# Staging directory structure
/tmp/evidence-staging/
├── {caseId}/
│ └── {timestamp}-{filename}
Step 4: Extract Metadata
Extract metadata WITHOUT modifying original:
For Images:
- EXIF data (camera, GPS, timestamps)
- Dimensions
- Color profile
For Videos:
- Duration
- Codec information
- Resolution
For Audio:
- Duration
- Sample rate
- Codec
For PDFs:
- Page count
- Author (if embedded)
- Creation date
# Use Read tool or appropriate extraction commands
# NEVER write back to original file
Step 5: Generate Derivatives (Optional)
Create derivative artifacts in SEPARATE folder:
derivatives/
├── thumbnails/
│ └── {evidenceId}-thumb.jpg
├── transcripts/
│ └── {evidenceId}-transcript.txt
└── previews/
└── {evidenceId}-preview.pdf
Derivative Types:
thumbnail- Reduced resolution image/video previewtranscript- Speech-to-text for audio/videopreview- PDF or text representationocr- Extracted text from images
Step 6: Ingest to Vault
Call the evidence.ingest tool:
{
"filePath": "/path/to/staged/file",
"filename": "original-filename.jpg",
"caseId": "case-2026-001",
"channel": "whatsapp",
"sender": "user@example.com",
"messageId": "msg-abc123",
"retentionDays": 2555,
"metadata": {
"exif": { ... },
"extracted": { ... }
}
}
Response:
{
"success": true,
"evidenceId": "ev-abc123...",
"sha256": "a1b2c3...",
"vaultUrl": "file:///vault/cases/case-2026-001/originals/ev-abc123.jpg",
"timestamp": "2026-02-17T10:30:00.000Z"
}
Step 7: Update Manifest
The manifest is automatically updated by the ingest operation.
Manifest Location: {vault}/cases/{caseId}/manifest.json
Manifest Contents:
- Case metadata
- Evidence items with hashes
- Derivatives
- Chain of custody entries
- Retention policy
Step 8: Return Receipt
Provide user with evidence receipt:
📋 EVIDENCE RECEIPT
Case ID: case-2026-001
Evidence ID: ev-abc123...
File: original-filename.jpg
SHA-256: a1b2c3d4e5f6...
Size: 1.2 MB
Received: 2026-02-17 10:30:00 UTC
Vault: file:///vault/cases/case-2026-001/originals/ev-abc123.jpg
✅ Chain of custody established
✅ Original preserved immutably
✅ Audit trail active
Tool Reference
evidence.ingest
Ingest a file into the evidence vault.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| filePath | string | Yes | Path to the staged file |
| filename | string | Yes | Original filename |
| caseId | string | Yes | Case identifier |
| channel | string | No | Source channel |
| sender | string | No | Sender identifier |
| messageId | string | No | Message ID from source |
| retentionDays | number | No | Retention period |
| metadata | object | No | Additional metadata |
Returns: { evidenceId, sha256, vaultUrl, timestamp }
evidence.verify
Verify evidence integrity.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| evidenceId | string | Yes | Evidence to verify |
| caseId | string | No | Limit search to case |
Returns: { verified, details: { originalIntact, hashMatch, lastVerifiedAt } }
evidence.manifest
Get case manifest.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| caseId | string | Yes | Case identifier |
Returns: Complete case manifest with all items
evidence.export
Export case as archive.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| caseId | string | Yes | Case identifier |
| format | string | No | 'zip' or 'tar' (default: zip) |
Returns: { exportPath, sha256, size, itemCount }
evidence.access_log
Get audit trail.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| caseId | string | Yes | Case identifier |
| limit | number | No | Max events (default: 100) |
Returns: { events: [ ... ], count }
SECURITY POSTURE
Channel Allowlist Configuration
Configure which channels can submit evidence:
# ~/.openclaw/openclaw.json
{
"plugins": {
"evidence-vault": {
"channelAllowlist": ["whatsapp", "telegram", "email"],
"channelDenylist": ["public-discord"],
"requirePairing": true
}
}
}
Pairing Requirements
For Direct Messages (DMs):
- REQUIRE pairing before accepting evidence
- BLOCK unpaired DMs by default
- LOG rejected ingestion attempts
For Group Channels:
- VERIFY channel is in allowlist
- REJECT evidence from untrusted channels
- NEVER auto-ingest from public channels
Path Sanitization Rules
ALL paths are validated:
- No path traversal -
../sequences rejected - No null bytes -
\0rejected - No home directory -
~/rejected - Canonicalization - Paths resolved before validation
- Base path check - Must be within vault directory
Violations result in: E_PATH_TRAVERSAL error + audit log entry
Destructive Action Confirmation
Before any potentially destructive operation:
- EXPORT - Confirm export destination
- RETENTION DELETE - Require explicit confirmation (if enabled)
- LEGAL HOLD RELEASE - Require explicit confirmation
Confirmation format:
⚠️ DESTRUCTIVE ACTION
You are about to: [describe action]
Case: [caseId]
Items affected: [count]
Type "CONFIRM" to proceed:
Secrets Handling
NEVER include in logs or manifests:
- API keys
- Passwords
- Tokens
- Credit card numbers
- Email addresses (redacted)
- Phone numbers (redacted)
- SSN (redacted)
Redaction is automatic via regex patterns.
Troubleshooting
Error: E_PATH_TRAVERSAL
Cause: Filename or path contains disallowed characters
Solution:
- Filenames are automatically sanitized
- If error persists, check for unusual characters
- Original filename is preserved in manifest metadata
Error: E_INVALID_MIME
Cause: File type not in allowed list
Solution:
- Check
allowedMimeTypesconfiguration - Add MIME type to allowlist if appropriate
- Verify file is not corrupted
Error: E_SIZE_LIMIT
Cause: File exceeds maximum size
Solution:
- Check
maxFileSizeBytesconfiguration - Split large files if appropriate
- Compress before ingest (note in metadata)
Error: E_CHANNEL_BLOCKED
Cause: Evidence from blocked or non-allowlisted channel
Solution:
- Verify channel in allowlist
- Check if pairing is required
- Review security configuration
Error: E_HASH_MISMATCH
Cause: Evidence file modified after ingest
Solution:
- This indicates potential tampering
- Review access logs for case
- Escalate per incident response procedures
Verification Fails
Symptoms: verified: false in verify response
Diagnostic steps:
- Check if original file exists
- Compare current hash with manifest hash
- Review audit log for modifications
- Check filesystem permissions
Configuration Example
# openclaw.yaml
plugins:
evidence-vault:
driver: filesystem # or s3
basePath: /var/evidence-vault
maxFileSizeBytes: 524288000 # 500MB
defaultRetentionDays: 2555 # 7 years
allowedMimeTypes:
- image/jpeg
- image/png
- video/mp4
- audio/mpeg
- application/pdf
channelAllowlist:
- whatsapp
- telegram
- slack
requirePairing: true
# S3 driver options (if driver: s3)
s3:
endpoint: https://s3.example.com
bucket: evidence-vault
region: us-east-1
objectLock: true
Legal and Compliance Notes
LGPD/GDPR Considerations
- Tag sensitive data with
sensitivityTag - Configure appropriate retention periods
- Never store real personal data in examples
- Implement data subject access request procedures
Retention Policies
| Sensitivity | Default Retention |
|---|---|
| public | 365 days |
| internal | 1825 days (5 years) |
| confidential | 2555 days (7 years) |
| restricted | Legal hold |
Audit Requirements
All operations logged to JSONL audit file:
- Case creation/deletion
- Evidence ingest
- Verification attempts
- Export operations
- Access requests
Audit log retention: Same as case retention
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。