-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to config the Observed Data Generator
- Loading branch information
1 parent
616aaac
commit 8779449
Showing
26 changed files
with
379 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
288 changes: 126 additions & 162 deletions
288
...e/stix/faker/StixFakeDataGenerator.groovy → ...e/stix/faker/StixMockDataGenerator.groovy
Large diffs are not rendered by default.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
src/main/groovy/io/digitalstate/stix/faker/configs/ObservedDataGeneratorConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package io.digitalstate.stix.faker.configs | ||
|
||
import io.digitalstate.stix.faker.configs.sdo.observeddata.* | ||
|
||
import java.time.Instant | ||
import java.time.LocalDate | ||
|
||
class ObservedDataGeneratorConfig { | ||
|
||
Instant DEFAULT_LOWER_DATE = Instant.ofEpochMilli(LocalDate.of(2000, 1, 1).toEpochDay()) | ||
Instant DEFAULT_UPPER_DATE = Instant.now() | ||
int DEFAULT_DATE_SUBSECOND_PRECISION = 3 | ||
|
||
int propCreatedProbability = 50 | ||
Instant propCreatedLowerDate = DEFAULT_LOWER_DATE | ||
Instant propCreatedUpperDate = DEFAULT_UPPER_DATE | ||
int propCreatedDateSubsecondPrecision = DEFAULT_DATE_SUBSECOND_PRECISION | ||
|
||
int propModifiedProbability = 50 | ||
Instant propModifiedLowerDate = propCreatedUpperDate | ||
Instant propModifiedUpperDate = DEFAULT_UPPER_DATE | ||
int propModifiedSubsecondPrecision = DEFAULT_DATE_SUBSECOND_PRECISION | ||
|
||
int propRevokedProbability = 50 | ||
|
||
int propCreatedByRefProbability = 50 | ||
|
||
int propCustomPropsProbability = 50 | ||
|
||
Instant propFirstObservedLowerDate = DEFAULT_LOWER_DATE | ||
Instant propFirstObservedUpperDate = DEFAULT_UPPER_DATE | ||
int propFirstObservedSubsecondPrecision = DEFAULT_DATE_SUBSECOND_PRECISION | ||
|
||
Instant propLastObservedUpperDate = DEFAULT_UPPER_DATE | ||
int propLastObservedSubsecondPrecision = DEFAULT_DATE_SUBSECOND_PRECISION | ||
|
||
int propNumberObservedUpperCount = 999999999 | ||
int propNumberObservedLowerCount = 1 | ||
|
||
ObservedData_ArtifactCooConfig artifactCoo = new ObservedData_ArtifactCooConfig() | ||
ObservedData_AutonomousSystemCooConfig autonomousSystemCoo = new ObservedData_AutonomousSystemCooConfig() | ||
ObservedData_DirectoryCooConfig directoryCoo = new ObservedData_DirectoryCooConfig() | ||
ObservedData_DomainNameCooConfig domainNameCoo = new ObservedData_DomainNameCooConfig() | ||
ObservedData_EmailAddressCooConfig emailAddressCoo = new ObservedData_EmailAddressCooConfig() | ||
ObservedData_EmailMessageCooConfig emailMessageCoo = new ObservedData_EmailMessageCooConfig() | ||
ObservedData_FileCooConfig fileCoo = new ObservedData_FileCooConfig() | ||
ObservedData_Ipv4AddressCooConfig ipv4AddressCoo = new ObservedData_Ipv4AddressCooConfig() | ||
ObservedData_Ipv6AddressCooConfig ipv6AddressCoo = new ObservedData_Ipv6AddressCooConfig() | ||
ObservedData_MacAddressCooConfig macAddressCoo = new ObservedData_MacAddressCooConfig() | ||
ObservedData_MutexCooConfig mutexCoo = new ObservedData_MutexCooConfig() | ||
ObservedData_NetworkTrafficCooConfig networkTrafficCoo = new ObservedData_NetworkTrafficCooConfig() | ||
ObservedData_ProcessCooConfig processCoo = new ObservedData_ProcessCooConfig() | ||
ObservedData_SoftwareCooConfig softwareCoo = new ObservedData_SoftwareCooConfig() | ||
ObservedData_UrlCooConfig urlCoo = new ObservedData_UrlCooConfig() | ||
ObservedData_UserAccountCooConfig userAccountCoo = new ObservedData_UserAccountCooConfig() | ||
ObservedData_WindowsRegistryKeyCooConfig windowsRegisteryKeyCoo = new ObservedData_WindowsRegistryKeyCooConfig() | ||
ObservedData_X509CertificateCooConfig x509CertificateCoo = new ObservedData_X509CertificateCooConfig() | ||
|
||
|
||
ObservedData_ExternalReferencesConfig externalReferences = new ObservedData_ExternalReferencesConfig() | ||
|
||
ObservedData_GranularMarkingConfig granuarMarkings = new ObservedData_GranularMarkingConfig() | ||
|
||
ObservedData_ObjectMarkingsConfig objectMarkings = new ObservedData_ObjectMarkingsConfig() | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
...io/digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_ArtifactCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_ArtifactCooConfig{ | ||
int occurrence_probability = 100 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...alstate/stix/faker/configs/sdo/observeddata/ObservedData_AutonomousSystemCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_AutonomousSystemCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...o/digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_DirectoryCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_DirectoryCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
.../digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_DomainNameCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_DomainNameCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...igitalstate/stix/faker/configs/sdo/observeddata/ObservedData_EmailAddressCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_EmailAddressCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...igitalstate/stix/faker/configs/sdo/observeddata/ObservedData_EmailMessageCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_EmailMessageCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...talstate/stix/faker/configs/sdo/observeddata/ObservedData_ExternalReferencesConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_ExternalReferencesConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...ovy/io/digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_FileCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_FileCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...igitalstate/stix/faker/configs/sdo/observeddata/ObservedData_GranularMarkingConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_GranularMarkingConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_Ipv4AddressCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_Ipv4AddressCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_Ipv6AddressCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_Ipv6AddressCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
.../digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_MacAddressCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_MacAddressCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...vy/io/digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_MutexCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_MutexCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...italstate/stix/faker/configs/sdo/observeddata/ObservedData_NetworkTrafficCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_NetworkTrafficCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_ObjectMarkingsConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_ObjectMarkingsConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
.../io/digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_ProcessCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_ProcessCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...io/digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_SoftwareCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_SoftwareCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...oovy/io/digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_UrlCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_UrlCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...digitalstate/stix/faker/configs/sdo/observeddata/ObservedData_UserAccountCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_UserAccountCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...state/stix/faker/configs/sdo/observeddata/ObservedData_WindowsRegistryKeyCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_WindowsRegistryKeyCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
7 changes: 7 additions & 0 deletions
7
...talstate/stix/faker/configs/sdo/observeddata/ObservedData_X509CertificateCooConfig.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.digitalstate.stix.faker.configs.sdo.observeddata | ||
|
||
class ObservedData_X509CertificateCooConfig { | ||
int occurrence_probability = 10 | ||
int occurs_count_lower = 1 | ||
int occurs_count_upper = 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters