GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - klezVirus/codegrepper: Pure python, self-contained, silly implementation of a SAST tool

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
codegrepper.py
codegrepper.py
 
 

Repository files navigation

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:

  • Matthias Endler - https://endler.dev/awesome-static-analysis/
  • Wireghoul - http://www.justanotherhacker.com
  • Ajin Araham - https://ajinabraham.com

About

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

Topics

codescansaststatic-analysis

Resources

Readme
LGPL-3.0 license
Activity

Stars

9 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.