Skip to main content

Bandit plugin to scan for AWS keys

Project description

This is a Bandit plugin to scan for strings in your source code that look like AWS keys.

Usage

Bandit plugins are automatically activated once they are installed. To use this plugin, you simply need to install the plugin:

$ pip install bandit-aws

To verify the installation, display the bandit help text:

$ bandit --help

It will display a list of tests that were discovered and loaded. Verify that you see “C100 - hardcoded_aws_key” in the list.

You can then run bandit in the normal way. For example:

$ bandit -r myproject/

If any strings that look like AWS keys are found, they will be reported:

>> Issue: [C100:hardcoded_aws_key] Possible hardcoded AWS secret access key: 'JalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY'
   Severity: Medium   Confidence: Medium
   Location: myproject/example.py:11
   More Info: https://bandit.readthedocs.io/en/latest/plugins/c100_hardcoded_aws_key.html
10  AWS_ACCESS_KEY_ID = "AKIAIOSFODNN7EXAMPLE"
11  AWS_SECRET_ACCESS_KEY = "JalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY"
12
13
14  class MyClass:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

bandit_aws-0.0.20200212081240-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file bandit_aws-0.0.20200212081240-py3-none-any.whl.

File metadata

  • Download URL: bandit_aws-0.0.20200212081240-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for bandit_aws-0.0.20200212081240-py3-none-any.whl
Algorithm Hash digest
SHA256 f568a632bb43c677d1c6749ad23d81d03f23c5a4d24fd7b08cfce9a95e475ba2
MD5 7522f91b351ad2155ad580bb713e2f0d
BLAKE2b-256 3637588298a20ea1dcb82b51f27195e877c6af328b00b75fcd4312b4a3dbaa8f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page