mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
04a13385a8
* implemented analyzer interface with data models for HuggingFace * correct test for huggingface due to new addition of key in detection result. --------- Co-authored-by: Abdul Basit <abasit@folio3.com> |
||
---|---|---|
.. | ||
analyzers | ||
config | ||
generate_permissions | ||
pb/analyzerpb | ||
proto | ||
cli.go | ||
README.md |
Implementing Analyzers
Defining the Permissions
Permissions are defined in lower snake case as permission_name:access_level
.
The Permissions are initially defined as a yaml file.
At the top of the analyzer implementation you specify the go generate command.
You can install the generator with go install github.com/trufflesecurity/trufflehog/v3/pkg/analyzer/generate_permissions
.
Then you can run go generate ./...
to generate the Permission types for the analyzer.
The generated Permission types are to be used in the AnalyzerResult
struct when defining the Permissions
and in your code.