Documentation ¶
Index ¶
- func CreateIndexOn(client graphdb.Client, nodeLabel string, nodeAttribute string) error
- func NewObjectMetadata(s processor.SourceInformation) *objectMetadata
- func StoreGraph(g Graph, client graphdb.Client) error
- type ArtifactNode
- type AssemblerInput
- type AttestationForEdge
- type AttestationNode
- type BuilderNode
- type BuiltByEdge
- type ContainsEdge
- type DependsOnEdge
- type Graph
- type GuacEdge
- type GuacNode
- type IdentityForEdge
- type IdentityNode
- type MetadataForEdge
- type MetadataNode
- type PackageNode
- type VulnerabilityNode
- type VulnerableEdge
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndexOn ¶
CreateIndexOn creates database indixes in the graph database given by Client to optimize performance.
func NewObjectMetadata ¶
func NewObjectMetadata(s processor.SourceInformation) *objectMetadata
NewObjectMetadata creates a new instance to add metadata to nodes
Types ¶
type ArtifactNode ¶
ArtifactNode is a node that represents an artifact
func (ArtifactNode) IdentifiablePropertyNames ¶
func (an ArtifactNode) IdentifiablePropertyNames() []string
func (ArtifactNode) Properties ¶
func (an ArtifactNode) Properties() map[string]interface{}
func (ArtifactNode) PropertyNames ¶
func (an ArtifactNode) PropertyNames() []string
func (ArtifactNode) Type ¶
func (an ArtifactNode) Type() string
type AssemblerInput ¶
type AssemblerInput = Graph
AssemblerInput represents the inputs to add to the graph
type AttestationForEdge ¶
type AttestationForEdge struct { AttestationNode AttestationNode ForArtifact ArtifactNode ForPackage PackageNode }
AttestationForEdge is an edge that represents the fact that an `AttestationNode` is an attestation for an `ArtifactNode/PackageNode`. Only one of each side of the edge should be defined.
func (AttestationForEdge) IdentifiablePropertyNames ¶
func (e AttestationForEdge) IdentifiablePropertyNames() []string
func (AttestationForEdge) Nodes ¶
func (e AttestationForEdge) Nodes() (v, u GuacNode)
func (AttestationForEdge) Properties ¶
func (e AttestationForEdge) Properties() map[string]interface{}
func (AttestationForEdge) PropertyNames ¶
func (e AttestationForEdge) PropertyNames() []string
func (AttestationForEdge) Type ¶
func (e AttestationForEdge) Type() string
type AttestationNode ¶
type AttestationNode struct { // TODO(mihaimaruseac): Unsure what fields to store here FilePath string Digest string AttestationType string Payload map[string]interface{} NodeData objectMetadata }
AttestationNode is a node that represents an attestation
func (AttestationNode) IdentifiablePropertyNames ¶
func (an AttestationNode) IdentifiablePropertyNames() []string
func (AttestationNode) Properties ¶
func (an AttestationNode) Properties() map[string]interface{}
func (AttestationNode) PropertyNames ¶
func (an AttestationNode) PropertyNames() []string
func (AttestationNode) Type ¶
func (an AttestationNode) Type() string
type BuilderNode ¶
BuilderNode is a node that represents a builder for an artifact
func (BuilderNode) IdentifiablePropertyNames ¶
func (bn BuilderNode) IdentifiablePropertyNames() []string
func (BuilderNode) Properties ¶
func (bn BuilderNode) Properties() map[string]interface{}
func (BuilderNode) PropertyNames ¶
func (bn BuilderNode) PropertyNames() []string
func (BuilderNode) Type ¶
func (bn BuilderNode) Type() string
type BuiltByEdge ¶
type BuiltByEdge struct { ArtifactNode ArtifactNode BuilderNode BuilderNode }
BuiltByEdge is an edge that represents the fact that an `ArtifactNode` has been built by a `BuilderNode`
func (BuiltByEdge) IdentifiablePropertyNames ¶
func (e BuiltByEdge) IdentifiablePropertyNames() []string
func (BuiltByEdge) Nodes ¶
func (e BuiltByEdge) Nodes() (v, u GuacNode)
func (BuiltByEdge) Properties ¶
func (e BuiltByEdge) Properties() map[string]interface{}
func (BuiltByEdge) PropertyNames ¶
func (e BuiltByEdge) PropertyNames() []string
func (BuiltByEdge) Type ¶
func (e BuiltByEdge) Type() string
type ContainsEdge ¶
type ContainsEdge struct { PackageNode PackageNode ContainedArtifact ArtifactNode }
Contains is an edge that represents the fact that an `PackageNode` contains a `ArtifactNode`
func (ContainsEdge) IdentifiablePropertyNames ¶
func (e ContainsEdge) IdentifiablePropertyNames() []string
func (ContainsEdge) Nodes ¶
func (e ContainsEdge) Nodes() (v, u GuacNode)
func (ContainsEdge) Properties ¶
func (e ContainsEdge) Properties() map[string]interface{}
func (ContainsEdge) PropertyNames ¶
func (e ContainsEdge) PropertyNames() []string
func (ContainsEdge) Type ¶
func (e ContainsEdge) Type() string
type DependsOnEdge ¶
type DependsOnEdge struct { ArtifactNode ArtifactNode PackageNode PackageNode ArtifactDependency ArtifactNode PackageDependency PackageNode }
DependsOnEdge is an edge that represents the fact that an `ArtifactNode/PackageNode` depends on another `ArtifactNode/PackageNode` Only one of each side of the edge should be defined.
func (DependsOnEdge) IdentifiablePropertyNames ¶
func (e DependsOnEdge) IdentifiablePropertyNames() []string
func (DependsOnEdge) Nodes ¶
func (e DependsOnEdge) Nodes() (v, u GuacNode)
func (DependsOnEdge) Properties ¶
func (e DependsOnEdge) Properties() map[string]interface{}
func (DependsOnEdge) PropertyNames ¶
func (e DependsOnEdge) PropertyNames() []string
func (DependsOnEdge) Type ¶
func (e DependsOnEdge) Type() string
type Graph ¶
Graph represents a subgraph read from the database or written to it. Note: this is experimental and might change. Please refer to source code for more details about usage.
func (*Graph) AppendGraph ¶
AppendGraph appends the graph g with additional graphs
type GuacEdge ¶
type GuacEdge interface { // Type returns the type of edge Type() string // Nodes returns the (v,u) nodes of the edge // // For directional edges: v-[edge]->u. // For non-directional edges there is no guaranteed order. Nodes() (v, u GuacNode) // Properties returns the list of properties of the edge Properties() map[string]interface{} // PropertyNames returns the names of the properties of the edge. // // If a string `s` is in the list returned by `PropertyNames` then it // should also be a key in the map returned by `Properties`. PropertyNames() []string // IdentifiablePropertyNames returns a list of property names that can // that can uniquely specify a GuacEdge, as an alternative to the two // node endpoints. // // Any string found in the list returned by `IdentifiablePropertyNames` // must also be returned by `PropertyNames`. // // TODO(mihaimaruseac): We might not need this? IdentifiablePropertyNames() []string }
GuacEdge represents an edge in the GUAC graph Note: this is experimental and might change. Please refer to source code for more details about usage.
type GuacNode ¶
type GuacNode interface { // Type returns the type of node Type() string // Properties returns the list of properties of the node Properties() map[string]interface{} // PropertyNames returns the names of the properties of the node. // // If a string `s` is in the list returned by `PropertyNames` then it // should also be a key in the map returned by `Properties`. PropertyNames() []string // IdentifiablePropertyNames returns a list of property names that can // uniquely specify a GuacNode. // // Any string found in the list returned by `IdentifiablePropertyNames` // must also be returned by `PropertyNames`. IdentifiablePropertyNames() []string }
GuacNode represents a node in the GUAC graph Note: this is experimental and might change. Please refer to source code for more details about usage.
type IdentityForEdge ¶
type IdentityForEdge struct { IdentityNode IdentityNode AttestationNode AttestationNode }
IdentityForEdge is an edge that represents the fact that an `IdentityNode` is an identity for an `AttestationNode`.
func (IdentityForEdge) IdentifiablePropertyNames ¶
func (e IdentityForEdge) IdentifiablePropertyNames() []string
func (IdentityForEdge) Nodes ¶
func (e IdentityForEdge) Nodes() (v, u GuacNode)
func (IdentityForEdge) Properties ¶
func (e IdentityForEdge) Properties() map[string]interface{}
func (IdentityForEdge) PropertyNames ¶
func (e IdentityForEdge) PropertyNames() []string
func (IdentityForEdge) Type ¶
func (e IdentityForEdge) Type() string
type IdentityNode ¶
type IdentityNode struct { ID string Digest string // base64 encoded Key string KeyType string KeyScheme string NodeData objectMetadata }
IdentityNode is a node that represents an identity
func (IdentityNode) IdentifiablePropertyNames ¶
func (in IdentityNode) IdentifiablePropertyNames() []string
func (IdentityNode) Properties ¶
func (in IdentityNode) Properties() map[string]interface{}
func (IdentityNode) PropertyNames ¶
func (in IdentityNode) PropertyNames() []string
func (IdentityNode) Type ¶
func (in IdentityNode) Type() string
type MetadataForEdge ¶
type MetadataForEdge struct { // From node MetadataNode MetadataNode // To node ForArtifact ArtifactNode ForPackage PackageNode }
MetadataFor is an edge that represents the fact that an a metadata node represents metadata for an `ArtifactNode/PackageNode` Only one of each side of the edge should be defined.
func (MetadataForEdge) IdentifiablePropertyNames ¶
func (e MetadataForEdge) IdentifiablePropertyNames() []string
func (MetadataForEdge) Nodes ¶
func (e MetadataForEdge) Nodes() (v, u GuacNode)
func (MetadataForEdge) Properties ¶
func (e MetadataForEdge) Properties() map[string]interface{}
func (MetadataForEdge) PropertyNames ¶
func (e MetadataForEdge) PropertyNames() []string
func (MetadataForEdge) Type ¶
func (e MetadataForEdge) Type() string
type MetadataNode ¶
MetadataNode is a node that represents metadata about an artifact/package
func (MetadataNode) IdentifiablePropertyNames ¶
func (mn MetadataNode) IdentifiablePropertyNames() []string
func (MetadataNode) Properties ¶
func (mn MetadataNode) Properties() map[string]interface{}
func (MetadataNode) PropertyNames ¶
func (mn MetadataNode) PropertyNames() []string
func (MetadataNode) Type ¶
func (mn MetadataNode) Type() string
type PackageNode ¶
type PackageNode struct { Name string Digest []string Version string Purl string CPEs []string Tags []string NodeData objectMetadata }
PackageNode is a node that represents an artifact
func (PackageNode) IdentifiablePropertyNames ¶
func (pn PackageNode) IdentifiablePropertyNames() []string
func (PackageNode) Properties ¶
func (pn PackageNode) Properties() map[string]interface{}
func (PackageNode) PropertyNames ¶
func (pn PackageNode) PropertyNames() []string
func (PackageNode) Type ¶
func (pn PackageNode) Type() string
type VulnerabilityNode ¶
type VulnerabilityNode struct { ID string NodeData objectMetadata }
VulnerabilityNode is a node that represents a vulnerability associated with the certifier attestation
func (VulnerabilityNode) IdentifiablePropertyNames ¶
func (vn VulnerabilityNode) IdentifiablePropertyNames() []string
func (VulnerabilityNode) Properties ¶
func (vn VulnerabilityNode) Properties() map[string]interface{}
func (VulnerabilityNode) PropertyNames ¶
func (vn VulnerabilityNode) PropertyNames() []string
func (VulnerabilityNode) Type ¶
func (vn VulnerabilityNode) Type() string
type VulnerableEdge ¶
type VulnerableEdge struct { AttestationNode AttestationNode VulnerabilityNode VulnerabilityNode }
VulnerableEdge is an edge that represents the fact that an artifact is vulnerable or not based on certification attestation This edge gets created when the attestation contains vulnerabilities
func (VulnerableEdge) IdentifiablePropertyNames ¶
func (e VulnerableEdge) IdentifiablePropertyNames() []string
func (VulnerableEdge) Nodes ¶
func (e VulnerableEdge) Nodes() (v, u GuacNode)
func (VulnerableEdge) Properties ¶
func (e VulnerableEdge) Properties() map[string]interface{}
func (VulnerableEdge) PropertyNames ¶
func (e VulnerableEdge) PropertyNames() []string
func (VulnerableEdge) Type ¶
func (e VulnerableEdge) Type() string