Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NoErrorCode means the error code hasn't been set NoErrorCode = iota // CloneError means we were unable to successfully clone the resource CloneError // ScanError means there was some issue scanning the cloned resource ScanError // ResourceCleanupError means we couldn't remove the resources that were cloned after a scan ResourceCleanupError )
View Source
const ( GeneralResultKind = "General" GitCommitResultKind = "GitCommit" JSONDataResultKind = "JSONData" ContainerLayerResultKind = "ContainerLayer" ContainerMetdataResultKind = "ContainerMetdata" )
In the future we might have things like GitCommitMessage GithubPullRequest, etc
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorCode ¶
type ErrorCode int
ErrorCode defined sthe set of error codes that can be set on a LeakTKError
type LeakTKError ¶
type LeakTKError struct { Fatal bool `json:"fatal"` Code ErrorCode `json:"code"` Message string `json:"message"` }
LeakTKError expands a normal error to provide additional meta data
func (LeakTKError) Error ¶
func (e LeakTKError) Error() string
Error is defined to implement the error interface
func (LeakTKError) String ¶
func (e LeakTKError) String() string
String provides a string representation of the error
type Location ¶
type Location struct { // This can be things like a commit or some other version control identifier Version string `json:"version"` Path string `json:"path"` // If the start column isn't available it will be zero. Start Point `json:"start"` // If the end information isn't available it will be the same as the // start information but the column will be the end of the line End Point `json:"end"` }
Location in the specific resource being scanned
type Response ¶
type Response struct { ID string `json:"id"` Logs []logger.Entry `json:"logs"` RequestID string `json:"request_id"` Results []*Result `json:"results"` }
Response from the scanner with the scan results
type Result ¶
type Result struct { ID string `json:"id"` Kind string `json:"kind"` Secret string `json:"secret"` Match string `json:"match"` Context string `json:"context"` Entropy float32 `json:"entropy"` Date string `json:"date"` Rule Rule `json:"rule"` Contact Contact `json:"contact"` Location Location `json:"location"` Notes map[string]string `json:"notes"` }
Result of a scan
Click to show internal directories.
Click to hide internal directories.