Skip to main content

Credential Sleuth

A rule driven library for detecting secrets and credentials within files and strings.

Simple Usage

Finding secrets in a string:

import credsleuth

data = """
Hello, world
Password=123
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
Goodbye
"""
print(credsleuth.check_string(data))

Finding secrets in a file:

import credsleuth

print(credsleuth.check_file("filename.txt"))

Command line usage

credsleuth filename.txt

Advanced Usage

Customizing configuration

import credsleuth

config = credsleuth.ConfigEngine()
config.verbose = True
config.rules_file = 'custom_rules.json'

credsleuth.check_file('filename.txt', config)

Installation

pip install --user credsleuth

Writing Rules

See rules.json for an example in extending rules definitions.

Todo

  • Add some comments to codebase
  • Add pretty output options for command line execution.
  • Write a proper read me.
  • Build model to detect credentials based upon entropy
  • Search multiple files

Release files for credsleuth 0.0.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for credsleuth 0.0.19
File Size Uploaded
credsleuth-0.0.19.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for credsleuth 0.0.19
File Interpreter ABI Platform
credsleuth-0.0.19-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / credsleuth-0.0.19.tar.gz

Download URL credsleuth-0.0.19.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6ee16a653740de484bf332d83dccf3c188255d4955e1b41d6c205b8707b13d53
BLAKE2b-256 checksum
How to use checksums
04605ff3a48fe2cb42bc8b015ac58688dde0951fec58e3ac939dd5fd61021338
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/18.5 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.10

Release files / credsleuth-0.0.19-py3-none-any.whl

Download URL credsleuth-0.0.19-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5b06698aa69e1536c87888c87cfe19c9d44be4222c583c8c58661f37e15876c
BLAKE2b-256 checksum
How to use checksums
b78e689cc93d366544cc43ebbaa947fb669fe3ab55d3a15223222241812db1cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/18.5 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.10

Release history Release notifications | RSS feed

This release

0.0.19 This release

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page