A proof-of-concept tool for scanning Docker Hub images to detect sensitive credential leaks in configuration files.
This tool helps identify security vulnerabilities in Docker images where developers may have unknowingly included sensitive credentials in configuration files (like .env files). It operates as a set of stateless microservices using Redis queues to coordinate the scanning process.
This project is inspired by GitHub’s security practices specifically how they periodically scan for security leaks or exposed files (like .env) and notify the repository owner to ensure data remains secure.
- Learning Asynchronous Messaging or Event-Driven Architecture
- Understanding Atomicity in Redis cache.
- Presenting a Proof of Concept (POC) to improve security checks.
https://github.com/uditrajput03/docker-security-poc/releases/tag/0.0.1/demo.mp4

The system works through a pipeline of microservices:
- Keyword Scanner: (Depreciated Not included in this repo)
- Username Scanner: Retrieves image names for each username
- Image Scanner: Extracts available tags for each image
- Tag Scanner: Pulls image
.tarfiles and scans for sensitive files - Alert System: Sends notifications when credentials are detected (currently via Telegram)
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Username │ │ Image │ │ Tag │ │ Alert │
│ Scanner │───►│ Scanner │───►│ Scanner │───►│ System │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌───────────────────────────────────────────────────────────────────────
│ Redis Queues │
└───────────────────────────────────────────────────────────────────────
- Images are discovered for each username
- Tags are extracted for each image
- Images are pulled and scanned for sensitive files
- Alerts are sent when credentials are detected
src/getImages.ts: Retrieves images for a given usernamesrc/getTags.ts: Retrieves available tags for an imagesrc/getRedis.ts: Handles Redis queue operationssrc/logger.ts: Manages logging and alertssrc/index.ts: Main application entry point
- Clone the repository
- Install dependencies:
npm install - Configure Redis connection in your environment
- Set up Telegram webhook (optional)
- Provide Your username to the index.js
- Start the service:
npm start - Install
skopeofor downloading image for worker
Create a .env file with the following variables:
REDIS_URL=your_redis_connection_string
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
IMPORTANT: This tool is provided as a proof-of-concept for educational and security research purposes only. It should be used exclusively to scan your own Docker images or those you have explicit permission to scan. Unauthorized scanning of third-party Docker images may violate terms of service, privacy laws, and computer fraud statutes.
The authors of this tool are not responsible for any misuse or damage caused by this software. Use responsibly and ethically.
- Always obtain proper authorization before scanning any Docker images
- Do not use this tool to access, download, or expose sensitive information from third parties
- Report vulnerabilities responsibly to the image owners
- Follow responsible disclosure practices
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.

