تخطَّ إلى المحتوى
أمرمستورد

verify-receipt

Verify a single Ed25519-signed receipt file against the signer's public key. Returns exit 0 if valid, 1 if tampered, 2 if malformed or the key is missing.

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

الملفات: 1 · الحجم: 4.4 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.

  • لهذا المشروع

    يوضع في: .claude/commands/

    mkdir -p .claude/commands && unzip ~/Downloads/protect-mcp-verify-receipt.zip -d .claude/commands

  • لحسابك على الجهاز كله

    يوضع في: ~/.claude/commands/

    mkdir -p ~/.claude/commands && unzip ~/Downloads/protect-mcp-verify-receipt.zip -d ~/.claude/commands

التعليمات

Verify Receipt

Verify an Ed25519 signed receipt produced by protect-mcp with @veritasacta/verify from npm. The check itself makes no network requests and needs no vendor lookup. npx downloads @veritasacta/verify@0.11.1 the first time it runs. For an offline machine, install it in the project first with npm install --no-save @veritasacta/verify@0.11.1, and npx then runs the local copy without network access.

Usage

/verify-receipt ./receipt.json

protect-mcp 0.32.4 appends receipts to ./receipts/receipts.jsonl, one per line. Save one line to its own file first, e.g., the newest one with tail -n 1 ./receipts/receipts.jsonl > receipt.json. Use /audit-chain to verify the whole file.

What This Command Does

  1. Reads the receipt JSON file
  2. Validates the structure (required fields, correct types)
  3. Takes the public key from the second argument, or from the publicKey value in ./protect-mcp.key (do not trust the embedded key on its own)
  4. Reconstructs the canonical form (JCS, RFC 8785)
  5. Verifies the Ed25519 signature over the canonical bytes
  6. Reports the result

Implementation

Run this in a shell:

PUB="${2:-$(node -p 'JSON.parse(require("fs").readFileSync("./protect-mcp.key")).publicKey')}"
npx @veritasacta/verify@0.11.1 "$1" --key "$PUB"

Where $1 is the receipt path provided by the user, and $2 is an optional public key in hex.

Expected exit codes

ExitMeaningAction
0Valid receipt, signature verifiedReport: "Verified. Receipt authentic."
1Signature mismatch — receipt tamperedReport: "TAMPERED. Signature does not match payload."
2Malformed receipt or missing keyReport: "Undecidable. The receipt is malformed or no public key was given."

What to Show the User

For a valid receipt:

Verified ✓

Request:     tu-1790427588265-c8x5
Tool:        Read
Decision:    allow
Signed at:   2026-09-26T12:59:48.265Z
Key ID:      generated

For a tampered receipt:

TAMPERED ✗

The signature does not match the payload. This receipt has been modified
since it was signed.

Request ID:  tu-1790427588265-c8x5
Checked against key: 0faf558a90dfbf88...

Possible causes:
- A field was edited after signing (most common)
- The signature was copied from a different receipt
- The wrong public key was given

Compare this receipt against a known-good copy to identify the altered field.

For a malformed receipt:

MALFORMED ✗

The file is not a valid Veritas Acta receipt. Missing or invalid fields:
<list the specific structural issues>

A protect-mcp 0.32.4 receipt includes `payload` and an object `signature`.
The payload includes `type`, `tool_name`, `decision`, `reason`, `issued_at`,
`issuer_id`, and `public_key`; the signature includes `alg`, `kid`, and `sig`.

References

الملفات

  • LICENSE1 ك.ب
  • verify-receipt.md3.3 ك.ب

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • أمرمستورد

    ai-assistant

    Build AI assistant application with NLU, dialog management, and integrations

    MITالملفات: 1

  • أمرمستورد

    create-docker-mcp-tunnel

    Stand up an Anthropic MCP tunnel locally with Docker Compose so Claude can call a private MCP server (manual-credentials quickstart).

    Apache-2.0الملفات: 1

  • أمرمستورد

    finetune

    Run the eval-gated fine-tuning lifecycle end to end — eval harness, method selection, data, environment, training, checkpoint gate, export

    MITالملفات: 1

  • أمرمستورد

    github-issues

    Create, update, and manage GitHub issues using MCP tools. Use this skill when users want to create bug reports, feature requests, or task issues, update existing issues, add labels/assignees/milestones, or manage issue workflows. Triggers o

    MITالملفات: 1

  • أمرمستورد

    langchain-agent

    Create LangGraph-based agent with modern patterns

    MITالملفات: 1

  • أمرمستورد

    list-pending

    List the review actions that the review-governance policy blocked in this session. protect-mcp 0.32.4 writes no receipt for a denied call, so the list comes from the session, not from ./review-receipts/.

    MITالملفات: 1