admin管理员组

文章数量:1188413

I'm trying to configure Trufflehog tool to use custom regexp to detect simple secrets basing on my needs, e.g. to search for passwords or access tokens. Unfortunately I've not found a way to do it.

I've found also another post about a similar issue and I've tried to apply the suggestion included within this post's discussion to search for an api key through a custom detector.

I've created the testAPIkeyConfig.yaml file with the following content:

detectors:
- name: custom api detector
  keywords:
  - api
  regex:
    adjective: "[a-zA-Z0-9]{32}"

and the testAPIkey.json with the following content:

"API key": "([a-zA-Z0-9]{32})"

and I've executed the following command:

trufflehog filesystem testAPIkey.json --config testAPIkeyConfig.yaml

The output by trufflehog is not the expected one. The API key is not highlighted by the tool; this is the output:

trufflehog filesystem testAPIkey.json --config testAPIkeyConfig.yaml

本文标签: static analysisTrufflehognot able to use regexp to through custom detectorStack Overflow