Documentation
¶
Index ¶
- Constants
- Variables
- func DownloadXrayLibPluginIfNeeded() error
- func GetLocalXrayLibExecutablePath() (xrayLibPath string, err error)
- func GetXrayLibPluginDownloadPath() (string, error)
- func NewHclogToJfrogAdapter() hclog.Logger
- type Config
- type HclogToJfrogAdapter
- func (a *HclogToJfrogAdapter) Debug(msg string, args ...interface{})
- func (a *HclogToJfrogAdapter) Error(msg string, args ...interface{})
- func (a *HclogToJfrogAdapter) GetLevel() hclog.Level
- func (a *HclogToJfrogAdapter) ImpliedArgs() []interface{}
- func (a *HclogToJfrogAdapter) Info(msg string, args ...interface{})
- func (a *HclogToJfrogAdapter) IsDebug() bool
- func (a *HclogToJfrogAdapter) IsError() bool
- func (a *HclogToJfrogAdapter) IsInfo() bool
- func (a *HclogToJfrogAdapter) IsTrace() bool
- func (a *HclogToJfrogAdapter) IsWarn() bool
- func (a *HclogToJfrogAdapter) Log(level hclog.Level, msg string, args ...interface{})
- func (a *HclogToJfrogAdapter) Name() string
- func (a *HclogToJfrogAdapter) Named(name string) hclog.Logger
- func (a *HclogToJfrogAdapter) ResetNamed(name string) hclog.Logger
- func (a *HclogToJfrogAdapter) SetLevel(level hclog.Level)
- func (a *HclogToJfrogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (a *HclogToJfrogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
- func (a *HclogToJfrogAdapter) Trace(msg string, args ...interface{})
- func (a *HclogToJfrogAdapter) Warn(msg string, args ...interface{})
- func (a *HclogToJfrogAdapter) With(args ...interface{}) hclog.Logger
- type Plugin
- type Scanner
- type ScannerRPCClient
- type ScannerRPCScanRequest
- type ScannerRPCScanResponse
- type ScannerRPCServer
Constants ¶
const (
XrayLibPluginExecutableName = "xray-scan-plugin"
)
Variables ¶
var PluginHandshakeConfig = goplugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: xrayLibPluginMagicCookieKey,
MagicCookieValue: xrayLibMagicCookie,
}
Functions ¶
func DownloadXrayLibPluginIfNeeded ¶
func DownloadXrayLibPluginIfNeeded() error
func NewHclogToJfrogAdapter ¶
NewHclogToJfrogAdapter creates a new adapter that implements hclog.Logger using JFrog's logger
Types ¶
type Config ¶
type Config struct {
// The BOMRef of the scanned target, will be used at the Metadata and considered the Root.
BomRef string `json:"bom-ref,omitempty"`
// The component type of the target ("application" / "library" / "file"...), will be used at the Metadata component.
Type string `json:"type,omitempty"`
// The name of the target, will be used at the Metadata component.
Name string `json:"name,omitempty"`
// [Optional] The version of the target, will be used at the Metadata component.
Version string `json:"version,omitempty"`
// [Optional] Patterns (git ignore like) to ignore when scanning the target.
IgnorePatterns []string `json:"ignorePatterns,omitempty"`
}
Config holds the configuration for Xray plugin library options.
type HclogToJfrogAdapter ¶
type HclogToJfrogAdapter struct {
// contains filtered or unexported fields
}
HclogToJfrogAdapter adapts hclog.Logger interface to use JFrog's logger
func (*HclogToJfrogAdapter) Debug ¶
func (a *HclogToJfrogAdapter) Debug(msg string, args ...interface{})
Debug implements hclog.Logger.Debug
func (*HclogToJfrogAdapter) Error ¶
func (a *HclogToJfrogAdapter) Error(msg string, args ...interface{})
Error implements hclog.Logger.Error
func (*HclogToJfrogAdapter) GetLevel ¶
func (a *HclogToJfrogAdapter) GetLevel() hclog.Level
GetLevel implements hclog.Logger.GetLevel
func (*HclogToJfrogAdapter) ImpliedArgs ¶
func (a *HclogToJfrogAdapter) ImpliedArgs() []interface{}
ImpliedArgs implements hclog.Logger.ImpliedArgs
func (*HclogToJfrogAdapter) Info ¶
func (a *HclogToJfrogAdapter) Info(msg string, args ...interface{})
Info implements hclog.Logger.Info
func (*HclogToJfrogAdapter) IsDebug ¶
func (a *HclogToJfrogAdapter) IsDebug() bool
IsDebug implements hclog.Logger.IsDebug
func (*HclogToJfrogAdapter) IsError ¶
func (a *HclogToJfrogAdapter) IsError() bool
IsError implements hclog.Logger.IsError
func (*HclogToJfrogAdapter) IsInfo ¶
func (a *HclogToJfrogAdapter) IsInfo() bool
IsInfo implements hclog.Logger.IsInfo
func (*HclogToJfrogAdapter) IsTrace ¶
func (a *HclogToJfrogAdapter) IsTrace() bool
IsTrace implements hclog.Logger.IsTrace
func (*HclogToJfrogAdapter) IsWarn ¶
func (a *HclogToJfrogAdapter) IsWarn() bool
IsWarn implements hclog.Logger.IsWarn
func (*HclogToJfrogAdapter) Log ¶
func (a *HclogToJfrogAdapter) Log(level hclog.Level, msg string, args ...interface{})
Log implements hclog.Logger.Log
func (*HclogToJfrogAdapter) Name ¶
func (a *HclogToJfrogAdapter) Name() string
Name implements hclog.Logger.Name
func (*HclogToJfrogAdapter) Named ¶
func (a *HclogToJfrogAdapter) Named(name string) hclog.Logger
Named implements hclog.Logger.Named
func (*HclogToJfrogAdapter) ResetNamed ¶
func (a *HclogToJfrogAdapter) ResetNamed(name string) hclog.Logger
ResetNamed implements hclog.Logger.ResetNamed
func (*HclogToJfrogAdapter) SetLevel ¶
func (a *HclogToJfrogAdapter) SetLevel(level hclog.Level)
SetLevel implements hclog.Logger.SetLevel
func (*HclogToJfrogAdapter) StandardLogger ¶
func (a *HclogToJfrogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
StandardLogger implements hclog.Logger.StandardLogger
func (*HclogToJfrogAdapter) StandardWriter ¶
func (a *HclogToJfrogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
StandardWriter implements hclog.Logger.StandardWriter
func (*HclogToJfrogAdapter) Trace ¶
func (a *HclogToJfrogAdapter) Trace(msg string, args ...interface{})
Trace implements hclog.Logger.Trace
func (*HclogToJfrogAdapter) Warn ¶
func (a *HclogToJfrogAdapter) Warn(msg string, args ...interface{})
Warn implements hclog.Logger.Warn
func (*HclogToJfrogAdapter) With ¶
func (a *HclogToJfrogAdapter) With(args ...interface{}) hclog.Logger
With implements hclog.Logger.With
type Plugin ¶
type Plugin struct {
goplugin.NetRPCUnsupportedPlugin
Impl Scanner
}
Implementation of plugin
type Scanner ¶
type ScannerRPCClient ¶
type ScannerRPCClient struct {
// contains filtered or unexported fields
}
type ScannerRPCScanRequest ¶
Plugin Implementation that talks over rpc
type ScannerRPCScanResponse ¶
type ScannerRPCServer ¶
type ScannerRPCServer struct {
Impl Scanner
}
RPC Server that ScanPluginRPC talks to
func (*ScannerRPCServer) Scan ¶
func (s *ScannerRPCServer) Scan(args ScannerRPCScanRequest, resp *ScannerRPCScanResponse) error