Giter Club home page Giter Club logo

github-secret-scan's Introduction

Hi ๐Ÿ‘‹, I'm Avinash Jain a.k.a logicbomb

I am an information security researcher working at Microsoft and earlier built complete end-to-end information security in a couple of startups.

logicbomb_1

  • Iโ€™m interested in infrastructure and application security, automation, finding vulnerabilities in application, and compliance.

  • ๐ŸŒฑ Iโ€™m currently learning K8s and K8s security.

  • ๐Ÿ“ I regularly write articles on https://logicbomb.medium.com/

  • ๐Ÿ’ฌ Ask me about Application and Infrastructure Security

  • ๐Ÿ“ซ How to reach me [email protected]

  • ๐Ÿ“„ Know more about me https://logicbomb.in/

Connect with me:

logicbomb_1 avinashjain619 @logicbomb

github-secret-scan's People

Contributors

logicbomb-1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

avinashjain619

github-secret-scan's Issues

Add tests and CI pipeline using travis CI

Add some tests so that the functionality of gss can be tested.

Also, add a CI pipeline using travis to do the following:

  • Run pep8 linter as the first check
  • Run tests

Also, add the following things in your repo:

  • Enable deepsource for code quality checks
  • Run security checks using checkmarx (you are a security guy :P )
  • enable dependabot

Some other code improvements

Function names

Function names are supposed to be verbs and not nouns. Counsider this for example - https://github.com/logicbomb-1/github-secret-scan/blob/master/gss.py#L102

user_repo is not a good function name because it is a noun. From what I understand, a better name for this would be get_user_repo_list

Exception Handling

Printing exceptions is not really much of exception handling. See this - https://github.com/logicbomb-1/github-secret-scan/blob/master/gss.py#L97. What do you want to do if this error comes? Just continue? Why not fail?

Also, it is important to treat the stdin stream for what it is meant for. The stdin stream must be used to print only things that are not errors because it makes it hard to pipe the response to another command for further processing. The right way to print this to the console would be to print it to stderr. Use click to do this.

Global Variables

Dont use global variables unless you really have to. https://github.com/logicbomb-1/github-secret-scan/blob/master/gss.py#L29

Better command line support

Firstly, prefer using click. It is cross platform and is generally a much better library to use than argparse.

Also, add support for the following options:

  • --help for the CLI. Click has support for this.
  • --username - so that a user can be scanned
  • --repo - what about scanning only one repo? It is possible that someone wants to scan only one or more of their repos. It should be possible to do that.

access_token should be more specific to github and in all caps

Make it more specific because there are other services that also use the term access token. Call it something like gh_access_token.

Also, environment variables are better when they are in all caps. That's the general convention. So call it something like GH_ACCESS_TOKEN

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.