Giter Site home page Giter Site logo

codegrepper's Introduction

Codegrepper

Pure python, self-contained, silly implementation of a SAST tool.

Codegrepper is a very simple python script designed to grep a codebase searching for known vulnerabilities, or custom regex by choice. Due to its very limited functionalities, it can be seen as an extension of the standard unix grep tool, with the addition of a set of known signatures to spot common vulnerabilities, or indicators of such vulnerabilities.

The main advantage of the tool is that it is just a single file, so very light, and python based, so it can be freely run on whatever platform.

Usage

Codegrepper has a bunch of options that can be used to ease the scan of the codebase, below:

usage: codegrepper.py [-h] [-d DIRECTORY] [-f FILTER] [-r REGEX] [-c CATEGORY]
                      [-s SUBCATEGORY] [-i]

Codegrepper - A simple code auditor by d3adc0de

optional arguments:
  -h, --help            show this help message and exit
  -d DIRECTORY, --directory DIRECTORY
                        Directory to start enumeration
  -f FILTER, --filter FILTER
                        File extension filter
  -r REGEX, --regex REGEX
                        Custom regex
  -c CATEGORY, --category CATEGORY
                        Category [# to get category list]
  -s SUBCATEGORY, --subcategory SUBCATEGORY
                        Subcategories [# to get subcategory list]
  -i, --insensitive     Case insensitive search

A few things to notice:

  • Extension filtering is done on a whitelist approach (-f php will scan only .php files)
  • Regex may be whatever Python re based regex
  • Category is one of dotnet, java, perl, php, nodejs, python, ruby or owasp (more will be added in future)
  • Subcategory may vary depending on the choosen language

Contributing

In the unlikely event you would like to contribute, please fork the repository at https://github.com/klezVirus/codegrepper and use that. Any help is very welcome.

If you want to get in touch with me github is your best choice.

Credits

Most of the signatures are taken as is or refined by other tools, so many thanks to:

codegrepper's People

Contributors

klezvirus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

skyn9ne sec-js

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.