360 Secure SkillHub
360 安全技能中心

Evidence URL Verifier

该 Skill 提供 PowerShell 工作流,用于验证证据 URL 是否真实可访问:通过 HTTP HEAD/GET 检查状态码与内容类型,识别占位符内容,并验证本地 artifact 路径是否存在且非空。它列出 URL 校验、内容验证、本地文件检查步骤,并给出完成标准与隐私提示。

dalomeve
dalomeve
热度 85.90
最近更新 2026-05-17 13:03:30
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:工作流 / 自动化脚本 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add evidence-url-verifier
Metadata
name
evidence-url-verifier
description
Verify evidence URLs are real and accessible. Check that artifact links resolve to actual content, not placeholders.

Evidence URL Verifier

Verify evidence URLs are real and accessible.

Problem

Evidence links often:

  • Point to non-existent resources
  • Are placeholders (example.com)
  • Expire or get deleted
  • Don't match claimed content

Workflow

1. URL Validation

function Test-EvidenceUrl {
    param([string]$url)
    
    try {
        $response = Invoke-WebRequest -Uri $url -Method Head -TimeoutSec 10
        return @{
            Valid = $true
            Status = $response.StatusCode
            ContentType = $response.ContentType
        }
    } catch {
        return @{
            Valid = $false
            Error = $_.Exception.Message
        }
    }
}

# Usage
$result = Test-EvidenceUrl "https://example.com/artifact"
if ($result.Valid) {
    Write-Host "URL valid: $($result.Status)"
} else {
    Write-Error "URL invalid: $($result.Error)"
}

2. Content Verification

# Check URL matches claimed content type
$response = Invoke-WebRequest -Uri $url
if ($response.ContentType -notlike "text/*" -and $expectedType -eq "text") {
    Write-Warning "Content type mismatch"
}

# Check for placeholder text
$content = $response.Content
if ($content -match "lorem ipsum|placeholder|example") {
    Write-Warning "Content appears to be placeholder"
}

3. Artifact Existence

# For local paths
if (Test-Path $artifactPath) {
    $size = (Get-Item $artifactPath).Length
    if ($size -eq 0) {
        Write-Warning "Artifact file is empty"
    }
} else {
    Write-Error "Artifact not found: $artifactPath"
}

Executable Completion Criteria

Criteria Verification
URL resolves HTTP 200 response
Content matches Type matches expected
No placeholders Content is substantive
Local paths exist Test-Path returns true

Privacy/Safety

  • Don't log full URL contents
  • Redact sensitive data in responses
  • Respect rate limits (max 1 req/sec)

Self-Use Trigger

Use when:

  • Task claims evidence artifact
  • URL provided as proof
  • Before marking task complete
  • Audit of past completions

Verify evidence. Trust but confirm.