Sign inSign up

secfigo/bandit

By secfigo

•Updated over 8 years ago

Bandit Container for finding security issues in python code

Image
4

10K+

secfigo/bandit repository overview

Running bandit container involves two steps:

  1. docker pull secfigo/bandit
  2. docker run --rm
    --volume $(pwd):/src \ #Present directory is scanned for issues --volume $(pwd)/report:/report \ # bandit stores the results in the /report directory secfigo/bandit:latest # run latest bandit image

This container expects two things

  1. There is a bandit.ignore file to manage false positives in the root directory of the repo.
  2. There is a report directory to store the results of the scan.

You can also using the following script for ease.

#!/bin/sh

SRC_DIRECTORY="$(pwd)"
REPORT_DIRECTORY="$SRC_DIRECTORY/report"

if [ ! -d "$REPORT_DIRECTORY" ]; then
    echo "Initially creating persistent directories"
    mkdir -p "$REPORT_DIRECTORY"
    chmod -R 777 "$REPORT_DIRECTORY"
fi

# Make sure we are using the latest version
docker pull secfigo/bandit:latest

docker run --rm \
    --volume $(pwd):/src \
    --volume "$REPORT_DIRECTORY":/report \
    secfigo/bandit:latest

Tag summary

Content type

Image

Digest

Size

17.5 MB

Last updated

over 8 years ago

docker pull secfigo/bandit