Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

canary-sr老金丝雀

Agent Skill

canary-sr 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

11,320

周安装

467

GitHub Stars

公开资料未说明

下载量

3,699
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:canary-sr(老金丝雀)
来源仓库:https://github.com/theshadowrose/canary-sr
安装命令:
openclaw skills install canary-sr
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install canary-sr

简介

用于查找、检索和筛选相关信息。canary-sr 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合在 OpenClaw 中根据关键词快速定位候选结果时使用。
  • 提供 AI 代理的安全监控和绊线检测功能。
  • 防止未经授权的文件访问、危险命令和过度活动。
  • 安装前建议检查是否会触发文件操作或系统命令执行。

SKILL.md

slug
canary-sr
name
Canary Agent Safety Tripwire System
description
Safety monitoring and tripwire detection for AI agents. Protects against unauthorized file access, dangerous commands, and excessive activity. Auto-halts on critical violations. Honeypot tripwires detect snooping.
author
@TheShadowRose
version
1.0.8
tags
["safety", "security", "tripwire", "monitoring", "honeypot", "agent-protection"]
license
MIT

Canary Agent Safety Tripwire System

Safety monitoring and tripwire detection for AI agents. Protects against unauthorized file access, dangerous commands, and excessive activity. Auto-halts on critical violations. Honeypot tripwires detect snooping.


Safety monitoring and tripwire detection for AI agents.

Protects against unauthorized file access, dangerous commands, and excessive activity. Auto-halts on critical violations. Honeypot tripwires detect snooping.


What It Does

Canary provides three layers of agent safety:

  1. Action Monitoring - Checks file paths and commands before execution
  2. Tripwire Files - Honeypot files that should never be accessed
  3. Audit Trail - Complete logs and pattern detection

Core Features

Protected Paths:

  • Block access to sensitive directories (/etc/, ~/.ssh/, etc.)
  • Customizable protection list
  • Granular operation control (read, write, delete)

Forbidden Patterns:

  • Regular expression matching for dangerous commands
  • Detects rm -rf /, chmod 777, curl | sh, etc.
  • Extensible pattern library

Rate Limiting:

  • Limit file operations, network requests, command executions
  • Configurable windows and thresholds
  • Prevents runaway agents

Auto-Halt:

  • Automatically stops agent after violation threshold
  • Prevents cascading failures
  • Requires manual review to restart

Tripwire Files:

  • Create honeypot files that should never be accessed
  • Detect modifications, deletions, or access
  • Hash verification for file integrity

Audit Trail:

  • Complete action logs
  • Violation history
  • Pattern detection (rapid violations, repeated targets, time clusters)
  • Export to JSON or Markdown

Quick Start

Install

No dependencies! Python 3.7+ stdlib only.

# Copy config example
cp config_example.json config.json

# Edit config with your protected paths
nano config.json

Basic Usage

from canary import CanaryMonitor

# Initialize monitor
canary = CanaryMonitor('config.json')

# Check path before access
is_safe, reason = canary.check_path('/etc/passwd', 'read')
if not is_safe:
    print(f"Blocked: {reason}")
    exit(1)

# Check command before execution
is_safe, reason = canary.check_command('rm -rf /')
if not is_safe:
    print(f"Blocked: {reason}")
    exit(1)

# Get status
status = canary.get_status()
print(f"Violations: {status['violation_count']}/{status['halt_threshold']}")

CLI Usage

# Check status
python3 canary.py status

# Check if path is safe
python3 canary.py check-path --path /etc/passwd --operation read

# Check if command is safe
python3 canary.py check-command --command "rm -rf /"

# Reset monitoring (clears violations)
python3 canary.py reset

Tripwire Files

Create honeypot files that should never be accessed:

# Create tripwire
python3 canary_tripwire.py create \
  --path ~/.secrets/fake-api-key.txt \
  --severity critical \
  --description "Honeypot to detect credential snooping"

# List all tripwires
python3 canary_tripwire.py list

# Check for triggered tripwires
python3 canary_tripwire.py check

# View alert history
python3 canary_tripwire.py alerts --limit 10

# Remove tripwire
python3 canary_tripwire.py remove --path ~/.secrets/fake-api-key.txt

Python API

from canary_tripwire import TripwireManager

manager = TripwireManager()

# Create tripwire
manager.create_tripwire(
    path='~/.aws/fake-credentials',
    severity='critical',
    description='Detects AWS credential access'
)

# Check all tripwires
triggered = manager.check_tripwires()
if triggered:
    print(f"⚠️  {len(triggered)} tripwire(s) triggered!")
    for alert in triggered:
        print(f"  - {alert['path']}: {alert['event']}")

Audit Reports

Analyze logs and generate safety reports:

# Summary report
python3 canary_audit.py summary

# View violations by severity
python3 canary_audit.py violations --severity critical

# Timeline of recent events
python3 canary_audit.py timeline --hours 24

# Detect suspicious patterns
python3 canary_audit.py patterns

# Export full report
python3 canary_audit.py export --output report.json --format json
python3 canary_audit.py export --output report.md --format markdown

Python API

from canary_audit import CanaryAuditor

auditor = CanaryAuditor('canary.log')

# Generate summary
summary = auditor.generate_summary_report()
print(f"Total violations: {summary['total_violations']}")

# Get critical violations
critical = auditor.get_violations_by_severity('critical')

# Detect patterns
patterns = auditor.detect_patterns()
if patterns['rapid_violations']:
    print("⚠️  Rapid violation sequence detected!")

# Export report
auditor.export_report('safety-report.md', format='markdown')

Configuration

See config_example.json for all options.

Essential Settings

{
  "protected_paths": [
    "/etc/",
    "~/.ssh/",
    "~/critical-data/"
  ],
  "forbidden_patterns": [
    "rm\\s+-rf\\s+/",
    "chmod\\s+777",
    "curl.*\\|\\s*sh"
  ],
  "halt_threshold": 5,
  "rate_limits": {
    "file_operations": {"limit": 100, "window": 60},
    "command_executions": {"limit": 20, "window": 60}
  }
}

Integration Examples

With Agent Runtime

from canary import CanaryMonitor

canary = CanaryMonitor('config.json')

def safe_file_read(path):
    """Read file with Canary check."""
    is_safe, reason = canary.check_path(path, 'read')
    if not is_safe:
        raise PermissionError(reason)
    
    with open(path, 'r') as f:
        return f.read()

def safe_command(cmd):
    """Execute command with Canary check."""
    is_safe, reason = canary.check_command(cmd)
    if not is_safe:
        raise PermissionError(reason)
    
    import subprocess
    cmd_list = cmd.split() if isinstance(cmd, str) else cmd
    return subprocess.run(cmd_list, capture_output=True)

Pre-Deployment Checks

# Before deploying agent, verify Canary setup
from canary import CanaryMonitor

canary = CanaryMonitor('config.json')

# Verify protected paths are configured
status = canary.get_status()
if status['protected_paths_count'] == 0:
    print("⚠️  No protected paths configured!")
    exit(1)

# Test tripwire detection
from canary_tripwire import TripwireManager
manager = TripwireManager()

# Create test tripwire
manager.create_tripwire('/tmp/canary-test.txt', severity='high')

# Verify it exists
triggered = manager.check_tripwires()
if not any(t['path'] == '/tmp/canary-test.txt' for t in triggered):
    print("✅ Tripwire system operational")

# Cleanup
manager.remove_tripwire('/tmp/canary-test.txt', delete_file=True)

Use Cases

1. Autonomous Agent Safety

Deploy Canary alongside autonomous agents to prevent:

  • Accidental system file deletion
  • Credential exfiltration
  • Runaway command execution

2. Multi-Agent Systems

Each agent gets its own Canary instance with custom rules:

  • Research agent: limited network access
  • Coding agent: no production deployments
  • Admin agent: full access but strict audit

3. Development/Testing

Use Canary during agent development:

  • Catch dangerous patterns early
  • Test rate limiting behavior
  • Verify safety mechanisms work

4. Production Monitoring

Run Canary in production:

  • Real-time violation alerts
  • Audit trail for compliance
  • Pattern detection for anomalies

Architecture

┌─────────────────┐
│   Your Agent    │
└────────┬────────┘
         │
         ▼
┌─────────────────┐      ┌──────────────────┐
│ CanaryMonitor   │◄────►│  config.py       │
│ (canary.py)     │      │  (your rules)    │
└────────┬────────┘      └──────────────────┘
         │
         ├─────► canary.log (action log)
         │
         ▼
┌─────────────────┐      ┌──────────────────┐
│ TripwireManager │◄────►│ .canary_tripwires│
│ (tripwire.py)   │      │ (honeypot files) │
└────────┬────────┘      └──────────────────┘
         │
         └─────► alerts.log
         
         
┌─────────────────┐
│ CanaryAuditor   │───► reports (JSON/MD)
│ (audit.py)      │
└─────────────────┘

Best Practices

Start Conservative

Begin with strict rules, relax as needed:

protected_paths = [
    '/',  # Protect entire filesystem initially
]

halt_threshold = 3  # Low threshold to catch issues early

Use Tripwires Strategically

Place tripwires in sensitive locations:

  • Fake credential files
  • Empty "secrets" directories
  • Decoy config files

Review Logs Regularly

# Daily audit
python3 canary_audit.py summary

# Weekly deep dive
python3 canary_audit.py patterns
python3 canary_audit.py export --output weekly-report.md --format markdown

Test Your Configuration

# Verify Canary blocks what it should
canary = CanaryMonitor('config.json')

# These should all be blocked
assert not canary.check_path('/etc/passwd', 'delete')[0]
assert not canary.check_command('rm -rf /')[0]
assert not canary.check_command('chmod 777 /tmp')[0]

print("✅ Canary configuration verified")

Limitations

See LIMITATIONS.md for details.

Key constraints:

  • Pattern matching is regex-based (not semantic analysis)
  • No built-in alerting (logs only)
  • Tripwires detect access, not intent
  • Rate limiting is per-session (doesn't survive restarts)

License

MIT License - See LICENSE

Author: Shadow Rose


Why This Exists

AI agents can do a lot of damage quickly:

  • One bad command can delete critical files
  • Runaway loops can exhaust resources
  • Compromised agents can exfiltrate credentials

Canary provides defense-in-depth:

  • Preventive: Block dangerous actions before they happen
  • Detective: Tripwires catch snooping behavior
  • Forensic: Complete audit trail for post-incident analysis

Simple, zero-dependency safety for autonomous agents.


⚠️ Security Note — Config File

Configuration is loaded from a JSON file. This is safe to share — no code execution.

  • Config path is validated for existence and size (1MB cap) before loading
  • Must be a .json file — CanaryMonitor raises ValueError if given a non-JSON path
  • Keep your config under version control; treat it as security policy

⚠️ Security Note — Tripwire Deployment

  • Paths are fully resolved~ and relative paths are expanded via Path.expanduser().resolve() before creation and lookup. '~/.aws/fake-credentials' will be placed in your actual home directory, not a literal ~ path.
  • Use decoy paths only — never point tripwires at real files containing sensitive data. Tripwires are honeypots; treat them as bait, not protection.
  • create_tripwire will not overwrite existing files — it checks for pre-existing files and refuses to proceed. Use dedicated empty paths for tripwires.
  • Test in a sandbox first — verify where logs, tripwires, and registry files are created before deploying. Confirm protected paths and auto-halt behavior in an isolated environment.
  • Protect log and alert directories — set filesystem permissions so alert logs are not world-readable. Canary writes plaintext logs; restrict access accordingly.
  • Canary only blocks when called — it is not an OS-level enforcement mechanism. Layer it with containers, filesystem permissions, and auditd for production deployments.

⚠️ Disclaimer

This software is provided "AS IS", without warranty of any kind, express or implied.

USE AT YOUR OWN RISK.

  • The author(s) are NOT liable for any damages, losses, or consequences arising from

the use or misuse of this software — including but not limited to financial loss, data loss, security breaches, business interruption, or any indirect/consequential damages.

  • This software does NOT constitute financial, legal, trading, or professional advice.
  • Users are solely responsible for evaluating whether this software is suitable for

their use case, environment, and risk tolerance.

  • No guarantee is made regarding accuracy, reliability, completeness, or fitness

for any particular purpose.

  • The author(s) are not responsible for how third parties use, modify, or distribute

this software after purchase.

By downloading, installing, or using this software, you acknowledge that you have read this disclaimer and agree to use the software entirely at your own risk.

SECURITY DISCLAIMER: This software provides supplementary security measures and is NOT a replacement for professional security auditing, penetration testing, or compliance frameworks. No software can guarantee complete protection against all threats. Users operating in regulated industries (healthcare, finance, legal) should consult qualified security professionals and verify compliance with applicable regulations (GDPR, HIPAA, SOC2, etc.) independently.


Support & Links

🐛 Bug ReportsTheShadowyRose@proton.me
Ko-fiko-fi.com/theshadowrose
🛒 Gumroadshadowyrose.gumroad.com
🐦 Twitter@TheShadowyRose
🐙 GitHubgithub.com/TheShadowRose
🧠 PromptBasepromptbase.com/profile/shadowrose

*Built with OpenClaw — thank you for making this possible.*


🛠️ Need something custom? Custom OpenClaw agents & skills starting at $500. If you can describe it, I can build it. → Hire me on Fiverr

📦 Install note: The slug canary was already taken on ClawHub. Install this skill using: clawhub install canary-sr

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

70.53%
按下载量换算2,609

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills