Giter Club home page Giter Club logo

dockerleaks's Introduction

Dockerleaks

Go Report Card License

NOTE: This project is heavily inspired and adapted from gitleaks so be sure to check that out if you haven't already

Dockerleaks is a command-line tool designed to uncover secrets within Docker images. Secrets, which can include API keys, passwords, and access tokens, pose potential security risks if left exposed. Dockerleaks will comb through Docker images to help identify these secrets.

You can scan Docker images either located in a remote registry or stored locally. It uses different methods to investigate environment variables and build arguments, which are common places where secrets might inadvertently be embedded during image creation. Furthermore, dockerSecrets can dig deep into the filesystem within a Docker image, scanning through files for potential secret leaks.

By using this tool, you can ensure that your Docker images maintain their integrity, adhering to the best practices of sensitive information management. It's a valuable addition to any security-conscious developer or organization's toolset, assisting in preventing unauthorized access to critical services, databases, and other resources.

© 2023 Bryce Thuilot. Dockerleaks is an open-source project and comes with ABSOLUTELY NO WARRANTY. It is free software, and you are welcome to redistribute it under specific conditions.

Installation

via Homebrew

brew install bthuilot/tap/dockerleaks

via GitHub release

Navigate to the Releases tab to download the compile binary for your specific platform. Be sure to then add it to your shell's PATH

from source

git clone github.com/bthuilot/dockerleaks && cd dockerleaks
go build -o dockerleaks .
# add dockerleaks to your PATH or execute via ./dockerleaks

via Docker

A docker image containing the script is distributed via thuilot/dockerleaks. To run via docker be sure to mount the docker socket into the container such that the binary can connect to the daemon to perform scans, an example is shown below.

docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v ./dockerleaks.yml:/app/dockerleaks.yml ghcr.io/bthuilot/dockerleaks:[LATEST VERSION] analyze static -p -i [IMAGE TO SCAN] 

Usage

The tool can be used to scan both remote and local built docker images. For example, to static analyze a remote image named my-image, you could use the following command:

dockerleaks analyze static -i my-image:latest -p

This command would pull my-image:latest from its remote source and scan it for leaked secrets.

Configuration

The application can be configured via a file named dockerleaks.yml located in the same directory the tool is run from, the directory $HOME/.dockerleaks, or the folder /etc/dockerleaks.

Checkout the file dockerleaks.example.yml located in the root of this repository for more information

Support the project

"Buy Me A Coffee"

dockerleaks's People

Watchers

 avatar  avatar

dockerleaks's Issues

check for docker running on init

Currently, the tool will fail on retrieving info from the image when the docker daemon is not running.

In order to provide better error messaging when the daemon is not running, the tool should first check if it is running and if not
display the error message could not connect to docker daemon, please ensure it is running on your machine

build base config file into dockerleaks

Currently a configuration file is required to run the application.

The base configuration for dockerleaks should be built into the application and the configuration file should serve only to either enable new detection or remove/update existing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.