How thinkst/canarytokens works
Canarytokens is a deception and activity-monitoring platform: operators create and manage many kinds of tokens, place them in systems or documents, and receive alerts when they are triggered. The graph emphasizes the frontend/API, token records and persistence, alert delivery, and the AWS infrastructure workflow. Several relationships are supported only by the SOURCE INDEX import references; unsampled subsystems are represented by their exact enclosing directories, and uncertain runtime wiring is omitted.
Main entry points: app.py Frontend API · canarydrop.py Canarydrop records · data_generation.py Asset generation · plan_generation.py Plan generation
Components 19
Token product
- Frontend API
frontend/app.py - Token models
canarytokens/models - Token lifecycle
canarytokens/tokens.py - Canarydrop records
canarytokens/canarydrop.py - Query layer
canarytokens/queries.py - Redis store
canarytokens/redismanager.py - Runtime settings
canarytokens/settings.py
AWS decoys
- AWS workflows
canarytokens/aws_infra/operations.py - Plan generation
canarytokens/aws_infra/plan_generation.py - Asset generation
canarytokens/aws_infra/data_generation.py - AWS state
canarytokens/aws_infra/state_management.py - AWS queries
canarytokens/aws_infra/db_queries.py
Trigger and alerting
- Email alerts
canarytokens/channel_output_email.py - Webhook alerts
canarytokens/channel_output_webhook.py - Webhook formatting
canarytokens/webhook_formatting.py
External services
- AWS ID service
- Zendesk
- Exposed-key checker
aws-exposed-key-checker-infra/lambda_source/exposed_key_checker
Other components
- Operator
Connections 22
- Operator → Frontend API: uses API
frontend/app.py - Frontend API → Canarydrop records: creates records
frontend/app.py - Frontend API → Token models: validates requests
frontend/app.py - Frontend API → AWS workflows: routes AWS work
frontend/app.py - Frontend API → Asset generation: requests generation
frontend/app.py - Frontend API → Email alerts: uses email channel
frontend/app.py - Canarydrop records → Query layer: reads and writes
canarytokens/canarydrop.py - Canarydrop records → Token models: validates history
canarytokens/canarydrop.py - Query layer → Redis store: uses connection
- Runtime settings → Token models: imports models
canarytokens/settings.py - Runtime settings → Redis store: configures connection
- Plan generation → Asset generation: generates names
canarytokens/aws_infra/plan_generation.py - Plan generation → AWS queries: queries assets
canarytokens/aws_infra/plan_generation.py - Plan generation → AWS state: uses state
canarytokens/aws_infra/plan_generation.py - Asset generation → AWS queries: queries assets
canarytokens/aws_infra/data_generation.py - Asset generation → Canarydrop records: uses token record
canarytokens/aws_infra/data_generation.py - AWS state → AWS workflows: uses AWS operations
canarytokens/aws_infra/state_management.py - AWS state → Canarydrop records: uses token record
canarytokens/aws_infra/state_management.py - Webhook alerts → Webhook formatting: formats payloads
canarytokens/channel_output_webhook.py - Webhook alerts → Canarydrop records: reads trigger data
canarytokens/channel_output_webhook.py - Exposed-key checker → Zendesk: manages tickets
- Frontend API → AWS ID service: calls configured API