OASIS STIX 2.1 cyber threat intelligence objects, bundles, and patterning for MoonBit
pub(all) enum ComparisonExpr {
Compare(ObjectPath, CompOp, PatternValue)
In(ObjectPath, Array[PatternValue])
Like(ObjectPath, String)
Matches(ObjectPath, String)
IsSubset(ObjectPath, String)
IsSuperset(ObjectPath, String)
Exists(ObjectPath)
Not(ComparisonExpr)
And(ComparisonExpr, ComparisonExpr)
Or(ComparisonExpr, ComparisonExpr)
} derive(Eq, Debug)pub(all) enum PatternExpr {
Observation(ComparisonExpr)
And(PatternExpr, PatternExpr)
Or(PatternExpr, PatternExpr)
FollowedBy(PatternExpr, PatternExpr)
StartStop(PatternExpr, String, String)
Within(PatternExpr, String)
Repeats(PatternExpr, String)
} derive(Eq, Debug)pub(all) struct StixObject {
stix_type : String
id : String
spec_version : String
kind : ObjectKind
properties : Map[String, Json]
raw : Json
} derive(Debug)pub(all) enum ValueShape {
String
Boolean
Integer
NonNegativeInteger
Timestamp
Identifier
IdentifierOf(String)
StringList
IdentifierList
IdentifierListOf(String)
OpenVocab(String)
ClosedVocab(String)
OpenVocabList(String)
Hashes
Dictionary
ObjectList
ExternalReferences
KillChainPhases
GranularMarkings
Extensions
Pattern
HexBinary
IPv4
IPv6
Mac
Email
Url
Any
} derive(Eq, Debug)fn relationship_allowed(source_type : String, rel : String, target_type : String) -> BoolInstall
Download zipOASIS STIX 2.1 cyber threat intelligence objects, bundles, and patterning for MoonBit