Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New options #19

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

New options #19

wants to merge 5 commits into from

Conversation

ebardie
Copy link

@ebardie ebardie commented Jul 22, 2020

Thank you for gittyleaks, it's been useful here.

I've added a some changes which others may / may not find a use for too. More info in each commit message.

The three main commits add commandline options for:

  • Displaying/manipulating the default search terms
  • Displaying line numbers with matches
  • Allowing terms to match without either beginning a line or follwoing one of [ ._-]

The other two commits are code tidies.

Change from anti-pattern:

  if not no_feature:

to:

  if feature:
Display and/or manipulate the default keywords from the commandline.

e.g:

$ gittyleaks --list-keys
keys : ['api', 'key', 'username', 'user', 'uname', 'pw', 'password',
'pass', 'email', 'mail', 'credentials', 'credential', 'login', 'token',
'secret']

$ gittyleaks --list-keys --ignore-keys "*" --add-keys pw pass passwd password
keys : ['pw', 'pass', 'passwd', 'password']
Adding the '-n' or '--line-numbers' on the command line will change the display from:

    :roles/gitlab/tasks/main.ymlth/to/file:    user: "root"

to:

    :roles/gitlab/tasks/main.ymlth/to/file.txt: 1969:    user: "root"

or from:

    ----------------------------------------
    file: path/to/file.txt
    what: password
    value: infelicitous
    match:
	    important_password: "infelicitous"
    num_of_revisions: 1
    ----------------------------------------

instead of:

    ----------------------------------------
    file: path/to/file.txt
    what: password
    value: infelicitous
    match:
	1970:    important_password: "infelicitous"
    num_of_revisions: 1
    ----------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants