Giter VIP home page Giter VIP logo

trufflehogregexes's People

Contributors

coffeetocode avatar dxa4481 avatar hex052 avatar jfowl avatar joelpagliuca avatar stephenmenton avatar surbhishah avatar thez3ro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trufflehogregexes's Issues

Improve generic Regex

Hi,

I have this secret token in my Repo in the archive foo.json:
{
"client_id" : "0afae57f3ccfd9d7f5767067bc48b30f719e271ba470488056e37ab35d4b6506",
"client_secret" : "6da89121079f8xxxxb6acccf8219ea982c3d79bccc3e9c6a85856480661f8fde",
"response_type" : "id_token"
}

It is not found default regex ... so would like to contribute the following:

"Generic Secret": "[sS][eE][cC][rR][eE][tT].*['|\"][0-9a-zA-Z]{32,45}['|\"]",

better:

(?i)sEcRet.*['|\"]([0-9a-zA-Z]+)['|\"]

What would be the best to contribute this?

Ralf

line continuations in truffleHogRegexes/regexes.json

What version of the json library are you using in what environment.

I am using latest brew for python3. Does not seem to like the multiline strings.

Traceback (most recent call last):
File "", line 2, in
File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 4 column 66 (char 205)

Google OAuth Secret

I am trying to find a spec on Google OAuth Secrets. I am looking at a file with AWS IDs of various types.
"[0-9a-zA-Z\-_]{24}" - creates many false positives.

Improve detection of slack tokens

Current regex for slack tokens seems to be to narrow to handle all slack tokens. I did check three leaked slack tokens (just search for xoxa or xoxp in all github issues), one of them obfuscated, others seem to be a correct ones which does not match the regex.

Also current regex does not match refresh tokens starting with xoxr (https://api.slack.com/docs/token-types).

Update for newer GitHub token format?

If https://github.com/dxa4481/truffleHogRegexes/blob/master/truffleHogRegexes/regexes.json really is the base rule set for TruffleHog as stated on: https://github.com/trufflesecurity/truffleHog#customizing, then it should have a new entry that accommodates updated GitHub tokens.

Per https://github.blog/changelog/2021-03-31-authentication-token-format-updates-are-generally-available/

It seems like the existing GitHub regex uses the right charset. However, it doesn’t account for the new prefixes or length up to 255.

regexCheckrs.py

Hi,

I'm running into an issue when I run truffleHog --regex --entropy=False file:///Users/example/example

It returns the following message /usr/local/lib/python3.7/site-packages/truffleHogRegexes/regexChecks.py:9: FutureWarning: Possible nested set at position 33 and some results. Can you assist?

This is what I have in my regexCheckrs.py

import re
import json
import os

with open(os.path.join(os.path.dirname(__file__), "regexes.json"), 'r') as f:
    regexes = json.loads(f.read())

for key in regexes:
    regexes[key] = re.compile(regexes[key])

Specific secret keys identification in source code

I would like to check specific set of credentials/keys are defined in source code or not. As i am defining for example this regex.json file and i have also committed the same in my source code for testing purpose.
{
"API key": "ABEFDSPUEPPDUEDE"
"API key": "ABEFDSPUEPPDUasds"
"API key": "ABEFDSPUEasdsdsdef"
}

I executed this command to figure out the trufflehog output with above API keys but i haven't received any of them in output. Please help on it

trufflehog --rules regex.json --entropy=False githuburl

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.