← 返回
安全合规 中文

Consent

Build cookie consent banners and track opt-in compliance status. Use when implementing GDPR consent, auditing cookies, generating privacy banners.
构建Cookie同意横幅并跟踪选择加入合规状态。用于实施GDPR同意、审计Cookie、生成隐私横幅。
bytesagain1
安全合规 clawhub v2.0.1 2 版本 99863.6 Key: 无需
★ 0
Stars
📥 732
下载
💾 1
安装
2
版本
#latest

概述

Consent

Security toolkit for managing consent records — generate tokens, check strength, rotate credentials, audit logs, store and retrieve entries, manage policies, and produce compliance reports. All data stays local.

Commands

CommandDescription
----------------------
consent generate Generate a new entry and log it
consent check-strength Check strength of a given input and record the result
consent rotate Rotate a credential or token and log the change
consent audit Record an audit entry for compliance tracking
consent store Store a value securely in the local data log
consent retrieve Retrieve a previously stored value
consent expire Mark an entry as expired
consent policy Record or update a policy entry
consent report Generate a report entry for review
consent hash Hash a value and store the result
consent verify Verify a value against stored records
consent revoke Revoke a previously granted consent or credential
consent statsShow summary statistics: entry counts, data size, first activity date
consent export Export all data in json, csv, or txt format
consent search Search across all logs for a keyword
consent recentShow the 20 most recent activity entries
consent statusHealth check: version, data dir, entry count, disk usage, last activity
consent helpShow help with all available commands
consent versionShow current version

Command Behavior

  • With arguments: Each command logs the input with a timestamp to its own dedicated log file (e.g., generate.log, audit.log)
  • Without arguments: Each command displays the 20 most recent entries from its log file

Data Storage

  • Default data directory: ~/.local/share/consent/
  • Per-command logs: $DATA_DIR/.log (e.g., generate.log, audit.log, store.log)
  • History log: $DATA_DIR/history.log — master timeline of all activity
  • Export files: $DATA_DIR/export. — generated by the export command
  • All data is local plain-text. No network calls, no cloud sync.

Requirements

  • Bash 4+ (uses set -euo pipefail)
  • No external dependencies or API keys required
  • Works entirely offline — your data stays on your machine

When to Use

  1. Tracking consent and compliance — Record who consented to what and when with store, audit, and policy for a simple compliance trail
  2. Credential rotation logging — Use rotate and expire to log when credentials were changed or invalidated
  3. Security auditing — Run audit entries and pull report data to review security posture over time
  4. Exporting compliance data — Use export json or export csv to produce machine-readable records for external auditing tools
  5. Quick lookups and verification — Search across all logs with search or verify specific entries with verify and hash

Examples

# Store a consent record
consent store "user:alice accepted terms-of-service v2.1"

# Audit a policy change
consent audit "updated data retention policy to 90 days"

# Generate a new token entry
consent generate "api-key-prod-2025"

# Rotate a credential and log it
consent rotate "db-password-main rotated"

# Check strength of a passphrase
consent check-strength "my-complex-passphrase-2025!"

# Export all data as JSON
consent export json

# Search across all logs
consent search "alice"

# View summary statistics
consent stats

# Health check
consent status

# Show recent activity
consent recent

How It Works

Each domain command (generate, audit, store, etc.) maintains its own log file in the data directory. Entries are stored as timestamp|value lines. The stats command aggregates counts across all log files. The export command merges all logs into a single file in your chosen format. Every action is also recorded in history.log as a master audit trail.

Tips

  • Run any command without arguments to see its recent entries — great for quick review
  • Use consent recent to see a timeline of all activity across all commands
  • Pipe exports to other tools: consent export csv && cat ~/.local/share/consent/export.csv | head
  • Combine search with grep for complex queries: consent search "2025" | grep "policy"
  • Run consent help at any time for the full command reference

Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

版本历史

共 2 个版本

  • v2.0.1 当前
    2026-05-01 08:50 安全 安全
  • v1.0.2
    2026-03-20 00:48 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,604

Cad

bytesagain1
CAD参考工具
★ 0 📥 2,728
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,438