import { useEffect, useState } from 'react'; import { Shield, Copy, Download, CheckCircle2 } from 'lucide-react'; import { CodeBlock } from '../components/CodeBlock'; interface FileChecksum { sha256: string; size: number; url: string; } interface ChecksumsData { version: string; generated_at: string; repository: string; files: Record; } export default function Checksums() { const [checksums, setChecksums] = useState(null); const [loading, setLoading] = useState(true); const [copied, setCopied] = useState(null); useEffect(() => { fetch('./checksums.json') .then(res => { if (!res.ok) throw new Error('Not found'); return res.json(); }) .then(data => { setChecksums(data); setLoading(false); }) .catch(() => { setLoading(false); }); }, []); const copyToClipboard = (text: string, id: string) => { navigator.clipboard.writeText(text); setCopied(id); setTimeout(() => setCopied(null), 2000); }; const fileDescriptions: Record = { 'SKILL.md': 'Main ClawSec skill documentation', 'heartbeat.md': 'Heartbeat monitoring and update instructions', 'reporting.md': 'Security incident reporting guidelines', 'skill.json': 'Skill metadata and configuration', 'feed.json': 'Community security advisory feed' }; return ( <>
{/* Header */}

File Checksums

Verify the integrity of ClawSec files before use

{loading ? (

Loading checksums...

) : checksums ? ( <> {/* Version Info */}
Version
{checksums.version}
Generated
{new Date(checksums.generated_at).toLocaleString()}
Repository
{checksums.repository}
{/* Files Table */}
{(Object.entries(checksums.files) as [string, FileChecksum][]).map(([filename, data]) => ( ))}
File Size SHA256 Checksum Actions
{filename}
{fileDescriptions[filename] || 'ClawSec file'}
{(data.size / 1024).toFixed(1)} KB
{data.sha256}
{/* Verification Instructions */}

Verification Instructions

Always verify file integrity before using ClawSec files. Here's how:

1. Download a file

2. Generate its checksum

3. Compare with the checksum above

The output should exactly match the SHA256 value shown in the table.

Security Warning: Never use files with mismatched checksums. This could indicate tampering or a compromised download.

) : (

Checksums not available. Create a release to generate checksums.

)}
); }