Documentation
¶
Index ¶
- Constants
- Variables
- func DownloadXrayLibPluginIfNeeded() error
- func GetLocalXrayLibExecutablePath() (xrayLibPath string, err error)
- func GetXrayLibPluginDownloadPath() (string, error)
- type Config
- type Plugin
- type Scanner
- type ScannerRPCClient
- type ScannerRPCScanRequest
- type ScannerRPCScanResponse
- type ScannerRPCServer
Constants ¶
View Source
const (
XrayLibPluginExecutableName = "xray-scan-plugin"
)
Variables ¶
View Source
var PluginHandshakeConfig = goplugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: xrayLibPluginMagicCookieKey,
MagicCookieValue: xrayLibMagicCookie,
}
Functions ¶
func DownloadXrayLibPluginIfNeeded ¶
func DownloadXrayLibPluginIfNeeded() error
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 Plugin ¶
type Plugin struct {
goplugin.NetRPCUnsupportedPlugin
Impl Scanner
}
Implementation of plugin
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
Click to show internal directories.
Click to hide internal directories.