Skip to content
Skillpedia
Deploy & cloud (DevOps)35k · #8070

implementing-log-integrity-with-blockchain

What it does

This tool creates a secure, tamper-proof log. Each new entry in the log contains a unique code (hash) of the previous entry, ensuring any modification is easily detected.

When to use it

  • ✓To reliably store security logs.
  • ✓When you need to prove a record hasn't been altered.
  • ✓For audits and forensic investigations.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-log-integrity-with-blockchain/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-log-integrity-with-blockchain/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Create a secure log for my web server logs and check if they have been tampered with.”

5 new skills a week. 1 minute to read.

How it works

The tool takes each new piece of information (log), adds a unique code from the previous information and a timestamp, and generates a new code. If someone tries to change something, the codes won't match anymore, revealing the tampering.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Implementing Log Integrity with Blockchain

When to Use

  • When deploying or configuring implementing log integrity with blockchain capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Familiarity with security operations concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Instructions

  1. Install dependencies: pip install requests
  2. Ingest log entries from syslog, JSON, or plain text files.
  3. For each entry, compute SHA-256 hash of: previous_hash + timestamp + log_content.
  4. Store the chain as a JSON ledger with entry index, timestamp, content hash, previous hash, and chain hash.
  5. Verify chain integrity by recomputing all hashes and detecting breaks.
  6. Optionally anchor checkpoint hashes to an external timestamping service.
python scripts/agent.py --log-file /var/log/syslog --chain-file log_chain.json --verify --output integrity_report.json

Examples

Chain Entry Structure

{"index": 42, "timestamp": "2024-01-15T10:30:00Z", "content_hash": "a1b2c3...",
 "prev_hash": "d4e5f6...", "chain_hash": "SHA256(prev_hash + timestamp + content_hash)"}

Tamper Detection

If entry 42 is modified, chain_hash[42] will not match SHA256(chain_hash[41] + ...), and all entries from 42 onward will be flagged as invalid.

FAQ

What is a 'hash'?

It's like a unique fingerprint for each piece of information. Even a tiny change in the text generates a completely different fingerprint.

Why use 'blockchain' here?

It's not a full blockchain, but it uses the idea of chaining information with codes. This makes the log very secure against changes, like a chain where each link depends on the previous one.

How do I know if something was changed?

The tool compares the calculated codes with the original codes. If there's a difference at any point in the chain, it warns that the log has been tampered with from that point onwards.

Details

Original description by the author

Builds an append-only log integrity chain using SHA-256 hash chaining, where each entry incorporates the previous entry's hash so tampering invalidates all subsequent hashes; covers log ingestion (syslog/JSON/plain text), chain verification, pinpoint tamper detection, and checkpoint anchoring to external timestamping services. Use for tamper-evident log storage for compliance or forensics, or to v

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#8070
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills