Cyber Bot is a Node.js project that helps users enhance their cybersecurity skills through automated Telegram messages. The bot runs on a VPS (OVH) and leverages AI (Mistral or Claude) to generate cybersecurity-related content.
- Telegram: @bot_cyber_fr
- Bluesky: @calebpr.bsky.social
- Website: www.cyberhub.blog
- Documentation: koadt.github.io/cyber-bot
npm run cron -- -c sendTHM
npm run cron -- -c sendTHMCTF
Sends curated notes from a GitHub repository, enhanced by AI.
npm run cron -- -c sendGithubNotes
Aggregates and summarizes news from our curated RSS feed.
npm run cron -- -c sendNewsResume
Fetches and analyzes the latest CVE (Common Vulnerabilities and Exposures) entries.
npm run cron -- -c sendCve
Provides summaries of the latest Darknet Diaries podcast episodes.
npm run cron -- -c sendDarknetDiariesResume
Provides summaries of the latest Snyk podcast episodes.
npm run cron -- -c sendSnykResume
Provides summaries of the latest Security Now podcast episodes.
npm run cron -- -c sendSecurityNowResume
Provides summaries of the latest The Cyber Show podcast episodes.
npm run cron -- -c sendCyberShowResume
Fetches and summarizes posts from specified cybersecurity subreddit.
npm run cron -- -c sendRedditPost
Summarizes the latest videos from specified channels.
npm run cron -- -c sendYoutubeResume -y https://www.youtube.com/[channel-name]
Shares relevant short-form videos based on customizable parameters (search period, queries, and blacklisted terms). Configure settings in the sendShort.js script.
npm run cron -- -c sendShort
- Node.js 18+
- Telegram Bot Token (BotFather)
- AI Provider API Key: Mistral AI or Claude (Anthropic)
- VPS (recommended)
- Clone and Initialize
git clone git@github.com:kOaDT/cyber-bot.git
cd cyber-bot
# Create tracking files
mkdir -p assets
touch assets/processedNotes.json # GithubNotes tracking
touch assets/processedArticles.json # News tracking
touch assets/processedShorts.json # Shorts tracking
touch assets/processedDD.json # Darknet Diaries Podcast tracking
touch assets/processedSnyk.json # Snyk Podcast tracking
touch assets/processedYt.json # YouTube tracking
touch assets/processedReddit.json # Reddit post tracking
touch assets/processedCTF.json # CTF tracking
touch assets/processedSecurityNow.json # Security Now Podcast tracking
touch assets/processedCyberShow.json # The Cyber Show Podcast tracking- Install Dependencies
npm install- Configure Environment
Create a .env file with the following variables:
# GitHub Settings
GITHUB_SECRET=
GITHUB_USERNAME=
GITHUB_REPO=
# Optional
EXCLUDED_GITHUB_FILES=
# Telegram Settings
TELEGRAM_BOT_TOKEN=
CHAT_ID=
# Optional Topic IDs for message organization
TELEGRAM_TOPIC_THM=
TELEGRAM_TOPIC_NEWS=
TELEGRAM_TOPIC_YOUTUBE=
TELEGRAM_TOPIC_PODCAST=
TELEGRAM_TOPIC_GITHUB=
TELEGRAM_TOPIC_REDDIT=
TELEGRAM_TOPIC_CVE=
# AI Provider Settings
AI_PROVIDER=mistral # Choose: 'mistral' (default) or 'claude'
# Mistral AI Settings (required if AI_PROVIDER=mistral)
MISTRAL_API_KEY=
# Optional Mistral parameters
MISTRAL_MODEL=mistral-large-2411
MISTRAL_TEMPERATURE=0.1
MISTRAL_MAX_TOKENS=2000
# Claude AI Settings (required if AI_PROVIDER=claude)
CLAUDE_API_KEY=
# Optional Claude parameters
CLAUDE_MODEL=claude-opus-4-20250514
CLAUDE_TEMPERATURE=0.1
CLAUDE_MAX_TOKENS=2000
# Optional, comma-separated
AUTHORIZED_LANGUAGES=
# AssemblyAI - Text-to-Speech
ASSEMBLYAI_API_KEY=
# YouTube Settings
YOUTUBE_API_KEY=
# Reddit
REDDIT_SUBREDDITS=
REDDIT_DAYS_LOOKBACK=
REDDIT_CLIENT_ID=
REDDIT_CLIENT_SECRET=
# CVE
CVSS_SEVERITY_THRESHOLD= # Default >= 7.0
HOURS_DELAY= # Default 24 hours
ENABLE_CVE_STATS=false # Enable historical stats (requires Cve table in DB)
# Optional Database Settings
MYSQL_HOST=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=
I_WANT_TO_SAVE_MESSAGES_IN_DB=true # Enable message logging in database
# Optional Slack Logging
SLACK_LOGGING_ENABLED=false # Set to true to enable Slack log forwarding
SLACK_WEBHOOK_URL_INFO= # Webhook URL for info level logs
SLACK_WEBHOOK_URL_WARN= # Webhook URL for warn level logs
SLACK_WEBHOOK_URL_ERROR= # Webhook URL for error level logsNote: This project is designed to work without a database by default. However, you can enable message logging in a MySQL database by setting
I_WANT_TO_SAVE_MESSAGES_IN_DB=trueand configuring the database connection variables defined in/config/dbConfig.js. The database should contain aTelegramLogstable with at least two columns:messageanddateAdd. This feature uses themysql2package.
Note: CVE statistics (historical trends, year-over-year comparisons) require a
Cvetable in your database with columns:cveId,cvss,published. SetENABLE_CVE_STATS=trueto enable this feature. Without it, the CVE report shows only the daily summary.
Note: Slack logging is optional and disabled by default. To enable it, set
SLACK_LOGGING_ENABLED=trueand provide the appropriate webhook URLs for each log level (info, warn, error). If a webhook URL is missing for a specific level, logs of that level will still be logged locally but won't be sent to Slack. Slack webhook failures are handled gracefully and won't affect the application's operation.
- Optional: Customize AI provider parameters
/crons/config/providers/mistral.js # Mistral configuration
/crons/config/providers/claude.js # Claude configuration
- Optional: Modify bot prompts
/crons/utils/prompts
npm run cron -- -c <CRON_NAME>npm run cron -- -c <CRON_NAME> -l <language>Note: Content language is restricted by the
AUTHORIZED_LANGUAGESenvironment variable to avoid prompt injection. Default is English.
The project includes a versioned deployment script at scripts/deploy.sh. On push to main, the CI pipeline:
- Runs tests and checks coverage
- Copies
scripts/deploy.shto the VPS via SCP - Executes the script remotely via SSH
The deploy script performs:
- Branch validation (ensures
mainis checked out) - Fast-forward-only
git pull origin main - Production dependency install (
npm ci --omit=dev)
Required GitHub secrets: VPS_HOST, VPS_USERNAME, VPS_SSH_KEY.
We welcome contributions! Feel free to:
- Report issues
- Submit pull requests
- Suggest new features
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
This means you are free to share and adapt this work for non-commercial purposes, as long as you provide appropriate attribution. More information: LICENSE
