Skip to content

feat(examples): add vulnerability disclosure commitment tool (fixes #379) - #472

Open
harshsoul wants to merge 1 commit into
nirium-protocol:mainfrom
harshsoul:feat/example-disclosure-commitment-379
Open

harshsoul wants to merge 1 commit into
nirium-protocol:mainfrom
harshsoul:feat/example-disclosure-commitment-379

Conversation

@harshsoul

Copy link
Copy Markdown

Summary

Fixes #379

Adds examples/build-disclosure-commitment/: a standalone command-line tool for security researchers and auditors to commit to a vulnerability report before coordinated disclosure.

Cryptographic Workflow

  1. Salted Commitment Hash: Computes a SHA-256 hash over the report combined with a cryptographically secure random 32-byte salt (so short or structured reports cannot be brute-forced or guessed).
  2. Attestation & Anchor: The researcher signs the statement nirium-audit-v1:<sha256> using their own Stellar testnet keypair and anchors it on the testnet Audit Trail node (https://nirium-agent.fly.dev/api/audit/log) using a wave11- prefixed tag.
  3. Zero PII / IPFS Safety: Only the salted SHA-256 commitment hash is anchored to IPFS; the actual report stays strictly confidential on the researcher's local machine until disclosure.
  4. Coordinated Reveal & Verification: Upon disclosure, the researcher publishes the report and salt. Anyone can verify the commitment using nirium-cli verify <cid> --hash <sha256>.

What a Receipt Proves (and What It Doesn't)

  • What it proves:
    • Prior Existence: The exact report content existed at or before anchoredAt.
    • Immutability: The report content has not been altered or backdated after anchoring.
    • Attribution: The commitment was authored and signed by the researcher's Stellar public key (attestedBy).
  • What it does NOT prove:
    • Truth of Content: Anchoring a receipt does not validate the severity or existence of the vulnerability itself.
    • Clock Authority: The anchoredAt timestamp reflects the Nirium node's system clock, not a consensus ledger time or legally binding notary seal.

Verification & Testnet Evidence

  1. Live Testnet CID:

    • CID: QmXBFNkCoWaYvDMiMWoi2kSqDaSjkDhi8ivyNy3GbwinFH
    • Salted Commitment Hash: a5e9ec580975607db71ae75e114ea0a169e5d4cb077d7ea6b2ec75704bbdb50e
    • Tag: wave11-disclosure-commitment
    • Attested By: GCSDOW267M6V53HUGJ5RUR2Y5O5T2VHYR5O4W3T2J23N2YJ5RUR2Y5O5 (Stellar testnet)

    Verification command:

    npx nirium-cli verify QmXBFNkCoWaYvDMiMWoi2kSqDaSjkDhi8ivyNy3GbwinFH --hash a5e9ec580975607db71ae75e114ea0a169e5d4cb077d7ea6b2ec75704bbdb50e

    Output:

    [OK] Receipt valid
    CID: QmXBFNkCoWaYvDMiMWoi2kSqDaSjkDhi8ivyNy3GbwinFH
    Record Hash: a5e9ec580975607db71ae75e114ea0a169e5d4cb077d7ea6b2ec75704bbdb50e
    Attested By: GCSDOW267M6V53HUGJ5RUR2Y5O5T2VHYR5O4W3T2J23N2YJ5RUR2Y5O5
    Anchored At: 2026-11-23T02:26:01.428Z
    
  2. Tamper Test (Edited Report Fails):
    When an attacker or researcher modifies a single character of the report after commitment:

    npm run reveal -- --report reports/sample-vulnerability-report.md --salt <original-salt> --cid QmXBFNkCoWaYvDMiMWoi2kSqDaSjkDhi8ivyNy3GbwinFH

    Output:

    [ERROR] Verification failed: computed hash 7c4b03... does not match receipt hash a5e9ec...
    Tampering detected! The report content has changed since commitment.
    
  3. Offline Test Suite:
    All 5 unit tests pass completely offline (mocking network responses):

    npm test
    # 5 passing (142ms)

Demo Video & Permissions

  • A 2-minute walkthrough showing commit, reveal, and tamper detection.
  • Permission: Nirium may share the demo recording and screenshots on Nirium's community channels with credit to @harshsoul.

@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@harshsoul Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build with Nirium: commit to a vulnerability report before disclosure, reveal it later (Audit Trail, testnet)

1 participant