implementing-log-integrity-with-blockchain

使用 SHA-256 哈希链构建仅追加式日志完整性链以实现篡改检测。每条日志条目与前一条条目的哈希值 一起进行哈希运算,形成类似区块链的结构,修改任一条目将使后续所有哈希值失效。 实现日志摄取、链完整性验证、精确定位的篡改检测,以及定期向外部时间戳服务锚定检查点。

9 stars

Best use case

implementing-log-integrity-with-blockchain is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

使用 SHA-256 哈希链构建仅追加式日志完整性链以实现篡改检测。每条日志条目与前一条条目的哈希值 一起进行哈希运算,形成类似区块链的结构,修改任一条目将使后续所有哈希值失效。 实现日志摄取、链完整性验证、精确定位的篡改检测,以及定期向外部时间戳服务锚定检查点。

Teams using implementing-log-integrity-with-blockchain should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/implementing-log-integrity-with-blockchain/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/implementing-log-integrity-with-blockchain/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/implementing-log-integrity-with-blockchain/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How implementing-log-integrity-with-blockchain Compares

Feature / Agentimplementing-log-integrity-with-blockchainStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

使用 SHA-256 哈希链构建仅追加式日志完整性链以实现篡改检测。每条日志条目与前一条条目的哈希值 一起进行哈希运算,形成类似区块链的结构,修改任一条目将使后续所有哈希值失效。 实现日志摄取、链完整性验证、精确定位的篡改检测,以及定期向外部时间戳服务锚定检查点。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## 说明

1. 安装依赖:`pip install requests`
2. 从 syslog、JSON 或纯文本文件中摄取日志条目。
3. 对每条条目,计算 SHA-256 哈希值:previous_hash + timestamp + log_content。
4. 将链存储为 JSON 账本,包含条目索引、时间戳、内容哈希、前一哈希和链哈希。
5. 通过重新计算所有哈希值并检测断点来验证链完整性。
6. 可选择将检查点哈希锚定到外部时间戳服务。

```bash
python scripts/agent.py --log-file /var/log/syslog --chain-file log_chain.json --verify --output integrity_report.json
```

## 示例

### 链条目结构
```json
{"index": 42, "timestamp": "2024-01-15T10:30:00Z", "content_hash": "a1b2c3...",
 "prev_hash": "d4e5f6...", "chain_hash": "SHA256(prev_hash + timestamp + content_hash)"}
```

### 篡改检测
若第 42 条条目被修改,chain_hash[42] 将不匹配 SHA256(chain_hash[41] + ...),从第 42 条起的所有条目都将被标记为无效。

Related Skills

implementing-zero-trust-with-hashicorp-boundary

9
from killvxk/cybersecurity-skills-zh

使用 HashiCorp Boundary 实现具备动态凭据代理、会话录制和 Vault 集成的身份感知零信任基础设施访问管理。

implementing-zero-trust-with-beyondcorp

9
from killvxk/cybersecurity-skills-zh

使用身份感知代理(IAP,Identity-Aware Proxy)、上下文感知访问策略、设备信任验证和 Access Context Manager,部署 Google BeyondCorp Enterprise 零信任访问控制,对 GCP 资源和内部应用强制执行基于身份和安全态势的访问。

implementing-zero-trust-network-access

9
from killvxk/cybersecurity-skills-zh

通过配置身份感知代理、微分段、基于条件访问策略的持续验证,以及在 AWS、Azure 和 GCP 环境中以 BeyondCorp 风格的架构替代传统 VPN 访问,在云环境中实施零信任网络访问(ZTNA)。

implementing-zero-trust-network-access-with-zscaler

9
from killvxk/cybersecurity-skills-zh

使用 Zscaler 实施零信任网络访问(Zero Trust Network Access,ZTNA),通过 Zscaler Private Access(ZPA)配置应用分段、访问策略和连接器,替代传统 VPN 架构

implementing-zero-trust-in-cloud

9
from killvxk/cybersecurity-skills-zh

本技能指导组织按照 NIST SP 800-207 和 Google BeyondCorp 原则在云环境中实施零信任(Zero Trust)架构,涵盖以身份为中心的访问控制、微分段(Micro-Segmentation)、持续验证、设备信任评估,以及部署身份感知代理(Identity-Aware Proxy)以消除 AWS、Azure 和 GCP 环境中的隐式网络信任。

implementing-zero-trust-for-saas-applications

9
from killvxk/cybersecurity-skills-zh

使用 CASB、SSPM、条件访问策略、OAuth 应用治理和会话控制,为 SaaS 应用实施零信任访问控制, 对云托管服务强制执行身份验证、设备合规性检查和数据保护。

implementing-zero-trust-dns-with-nextdns

9
from killvxk/cybersecurity-skills-zh

将 NextDNS 实施为零信任 DNS 过滤层,提供加密解析、威胁情报阻断、隐私保护,以及跨所有端点的组织策略执行。

implementing-zero-standing-privilege-with-cyberark

9
from killvxk/cybersecurity-skills-zh

部署 CyberArk Secure Cloud Access,通过基于时间、权限和审批控制的即时访问,在混合云和多云环境中消除常设权限。

implementing-zero-knowledge-proof-for-authentication

9
from killvxk/cybersecurity-skills-zh

零知识证明(ZKP)允许证明者在不泄露秘密本身的情况下证明对某个秘密(如密码或私钥)的了解。本技能实现 Schnorr 身份识别协议和使用离散对数问题的简化 ZKPP,使服务器永远不需要获取用户密码即可完成认证。

implementing-web-application-logging-with-modsecurity

9
from killvxk/cybersecurity-skills-zh

配置带有 OWASP 核心规则集(CRS)的 ModSecurity WAF,实现 Web 应用程序日志记录, 调整规则以减少误报,分析审计日志进行攻击检测,并为应用程序特定威胁实现自定义 SecRules。 分析师配置 SecRuleEngine、SecAuditEngine 和 CRS 偏执级别,以在安全覆盖范围和运营稳定性之间取得平衡。 适用于涉及 WAF 配置、ModSecurity 规则调整、Web 应用审计日志或 CRS 部署的场景。

implementing-vulnerability-sla-breach-alerting

9
from killvxk/cybersecurity-skills-zh

为漏洞修复 SLA 违规构建自动化告警,包含基于严重程度的时间线、升级工作流和合规性报告仪表板。

implementing-vulnerability-remediation-sla

9
from killvxk/cybersecurity-skills-zh

漏洞修复 SLA(服务级别协议)根据严重程度、资产重要性和漏洞利用可用性定义修补或缓解已识别漏洞的强制时限。有效的 SLA 计划推动责任落实、确保一致的修复时间线,并为漏洞管理成熟度提供可衡量的 KPI。