Skip to main content

deadfall test

Run verification tests on your Deadfall setup to confirm everything is operational.

Usage

deadfall test [options]

Description

The test command runs a comprehensive verification of your honeypot system:
  1. Trap files — Confirms trap files exist and contain valid tokens
  2. MCP handler — Verifies the handler would respond correctly to trap triggers
  3. Alert system — Tests that the log file can be written
  4. Desktop notifications — Checks notification availability (optional)
Use this command after initial setup to confirm your honeypot is operational.

Options

OptionDescription
--no-notifySkip desktop notification test (useful for CI/CD)
--token <string>Test a specific trap token
--verboseShow detailed output for each test
--jsonOutput results in JSON format

Examples

Run All Tests

deadfall test
Output:
┌─────────────────────────────────────────────────────────────────────┐
│ Deadfall Verification Tests                                         │
├─────────────────────────────────────────────────────────────────────┤
│ ✓ Trap Files:          2 traps registered                           │
│ ✓ MCP Handler:         Would respond correctly                      │
│ ✓ Alert System:        Log file writable                            │
│ ✓ Notifications:       Desktop notifications available              │
├─────────────────────────────────────────────────────────────────────┤
│ ✓ All 4 tests passed. Your honeypot system is operational.          │
│   Duration: 12ms                                                    │
└─────────────────────────────────────────────────────────────────────┘

Skip Notification Test (CI/CD)

deadfall test --no-notify
Useful when running in headless environments like CI pipelines.

Test Specific Token

deadfall test --token df_abc123
Validates that a specific trap token would trigger correctly.

JSON Output

deadfall test --json
{
  "all_passed": true,
  "passed": 4,
  "failed": 0,
  "skipped": 0,
  "duration": "12ms",
  "results": [
    {"name": "Trap Files", "passed": true, "message": "2 traps registered"},
    {"name": "MCP Handler", "passed": true, "message": "Would respond correctly"},
    {"name": "Alert System", "passed": true, "message": "Log file writable"},
    {"name": "Notifications", "passed": true, "message": "Desktop available"}
  ]
}

Exit Codes

CodeMeaning
0All tests passed
1One or more tests failed

When to Use

  • After running deadfall init to verify setup
  • Before deploying traps to production
  • In CI/CD pipelines to validate configuration
  • When troubleshooting alert delivery issues