All Projects → Skyscanner → Whispers

Skyscanner / Whispers

Licence: apache-2.0
Identify hardcoded secrets and dangerous behaviours

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Whispers

Cflint
Static code analysis for CFML (a linter)
Stars: ✭ 156 (+136.36%)
Mutual labels:  linter, lint, static-code-analysis
Rubberduck
Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
Stars: ✭ 1,287 (+1850%)
Mutual labels:  linter, parsing, static-code-analysis
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: ✭ 14 (-78.79%)
Mutual labels:  lint, static-code-analysis, linter
Graphql Go Tools
Tools to write high performance GraphQL applications using Go/Golang.
Stars: ✭ 96 (+45.45%)
Mutual labels:  linter, parser, parsing
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+6780.3%)
Mutual labels:  linter, lint, static-code-analysis
Njsscan
njsscan is a semantic aware SAST tool that can find insecure code patterns in your Node.js applications.
Stars: ✭ 128 (+93.94%)
Mutual labels:  linter, lint, devsecops
Misspell Fixer
Simple tool for fixing common misspellings, typos in source code
Stars: ✭ 154 (+133.33%)
Mutual labels:  linter, lint
Rats
Movie Ratings Synchronization with Python
Stars: ✭ 156 (+136.36%)
Mutual labels:  parser, parsing
Clippy Check
📎 GitHub Action for PR annotations with clippy warnings
Stars: ✭ 159 (+140.91%)
Mutual labels:  linter, lint
Command Line Api
Command line parsing, invocation, and rendering of terminal output.
Stars: ✭ 2,418 (+3563.64%)
Mutual labels:  parser, parsing
Parjs
JavaScript parser-combinator library
Stars: ✭ 145 (+119.7%)
Mutual labels:  parser, parsing
Textlint
The pluggable natural language linter for text and markdown.
Stars: ✭ 2,158 (+3169.7%)
Mutual labels:  linter, lint
Arpeggio
Parser interpreter based on PEG grammars written in Python http://textx.github.io/Arpeggio/
Stars: ✭ 204 (+209.09%)
Mutual labels:  parser, parsing
Lief
Authors
Stars: ✭ 2,730 (+4036.36%)
Mutual labels:  parser, parsing
Bento
[DEPRECATED] Find Python web-app bugs delightfully fast, without changing your workflow. 🍱
Stars: ✭ 147 (+122.73%)
Mutual labels:  linter, static-code-analysis
Rubocop
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Stars: ✭ 11,593 (+17465.15%)
Mutual labels:  linter, static-code-analysis
Passcat
Passwords Recovery Tool
Stars: ✭ 164 (+148.48%)
Mutual labels:  secrets, passwords
Eslint Config Standard
ESLint Config for JavaScript Standard Style
Stars: ✭ 2,229 (+3277.27%)
Mutual labels:  linter, static-code-analysis
Cppsharp
Tools and libraries to glue C/C++ APIs to high-level languages
Stars: ✭ 2,221 (+3265.15%)
Mutual labels:  parser, parsing
Parse Xml
A fast, safe, compliant XML parser for Node.js and browsers.
Stars: ✭ 184 (+178.79%)
Mutual labels:  parser, parsing

Whispers Whispers

"My little birds are everywhere, even in the North, they whisper to me the strangest stories." - Lord Varys

Whispers is a static code analysis tool designed for parsing various common data formats in search of hardcoded credentials and dangerous functions. Whispers can run in the CLI or you can integrate it in your CI/CD pipeline.

Detects

  • Passwords
  • API tokens
  • AWS keys
  • Private keys
  • Hashed credentials
  • Authentication tokens
  • Dangerous functions

Supported Formats

  • YAML
  • JSON
  • XML
  • .npmrc
  • .pypirc
  • .htpasswd
  • pip.conf
  • conf / ini
  • Dockerfile
  • Shell scripts
  • Python

Special Formats

  • AWS credentials files
  • JDBC connection strings
  • Jenkins config files
  • SpringFramework Beans config files

Installation

From PyPI

pip3 install whispers

From GitHub

git clone https://github.com/Skyscanner/whispers
cd whispers
make install

Usage

whispers -h
whispers source/code/fileOrDir
whispers --config config.yml source/code/fileOrDir
whispers --output /tmp/secrets.yml source/code/fileOrDir

Config

There are several configuration options available in Whispers. It’s possible to include/exclude results based on file path, key, or value. File path specifications are interpreted as globs. Keys and values accept regular expressions and several other parameters. There is a default configuration file built-in that will be used if you don't provide a custom one.

config.yml should have the following structure:

include:
  files:
    - "**/*.yml"

exclude:
  files:
    - "**/test/**/*"
    - "**/tests/**/*"
  keys:
    - ^foo
  values:
    - bar$

rules:
  starks:
    message: Whispers from the North
    severity: CRITICAL
    value:
      regex: (Aria|Ned) Stark
      ignorecase: True

The fastest way to tweak detection (ie: remove false positives and unwanted results) is to copy the default config.yml into a new file, adapt it, and pass it as an argument to Whispers.

Custom Rules

Rules specify the actual things that should be pulled out from key-value pairs. There are several common ones that come built-in, such as AWS keys and passwords, but the tool is made to be easily expandable with new rules.

  • Custom rules can be defined in the main config file under rules:
  • Custom rules can be added to whispers/rules
rule-id:  # unique rule name
  description: Values formatted like AWS Session Token
  message: AWS Session Token  # report will show this message
  severity: BLOCKER           # one of BLOCKER, CRITICAL, MAJOR, MINOR, INFO

  key:        # specify key format
    regex: (aws.?session.?token)?
    ignorecase: True   # case-insensitive matching

  value:      # specify value format
    regex: ^(?=.*[a-z])(?=.*[A-Z])[A-Za-z0-9\+\/]{270,450}$
    ignorecase: False  # case-sensitive matching
    minlen: 270        # value is at least this long
    isBase64: True     # value is base64-encoded
    isAscii: False     # value is binary data when decoded
    isUri: False       # value is not formatted like a URI

  similar: 0.35        # maximum similarity between key and value

Plugins

All parsing functionality is implemented via plugins. Each plugin implements a class with the pairs() method that runs through files and returns the key-value pairs to be checked with rules.

class PluginName:
    def pairs(self, file):
        yield "key", "value"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].