-
Notifications
You must be signed in to change notification settings - Fork 194
[backend/frontend] feat(stix): introduce platform affinity (#4517) #4685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Signed-off-by: Antoine MAZEAS <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4685 +/- ##
============================================
+ Coverage 50.57% 50.74% +0.17%
- Complexity 3708 3737 +29
============================================
Files 903 908 +5
Lines 26819 26936 +117
Branches 2012 2018 +6
============================================
+ Hits 13563 13669 +106
- Misses 12437 12445 +8
- Partials 819 822 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }) | ||
| public class AssetGroup implements Base { | ||
|
|
||
| public Map<Endpoint.PLATFORM_TYPE, Map<Endpoint.PLATFORM_ARCH, String>> wellKnown() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unused.
| @Transient | ||
| private final ResourceType resourceType = ResourceType.TAG_RULE; | ||
|
|
||
| public void setTag(Tag tag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit odd to block a parent entity based on a child entity. Just a personal impression.
| @Table(name = "tag_rules") | ||
| @EntityListeners(ModelBaseListener.class) | ||
| public class TagRule implements Base { | ||
| public static Set<String> RESERVED_TAG_NAMES = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relative to the Tag, so it should be placed on the Tag entity, right?
| @RequiredArgsConstructor | ||
| public class InitStarterPackCommandLineRunner implements CommandLineRunner { | ||
| @Slf4j | ||
| public class V20260101_Starter_pack extends DataPack { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is our new way to run starter pack feature right ?
| ResourcePatternResolver resolver) { | ||
| super(dataPackService); | ||
| this.settingRepository = settingRepository; | ||
| this.tagRuleRepository = tagRuleRepository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unused.
| } | ||
| } | ||
| // Force opencti tag | ||
| labels.add(OPENCTI_TAG_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep OpenCTI as the source for security coverage ?
| assetGroup.setName("All %s %s".formatted(platform.toString(), arch.toString())); | ||
| assetGroup.setDynamicFilter(filterGroup); | ||
|
|
||
| AssetGroup saved = this.assetGroupService.createAssetGroup(assetGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unused.
Proposed changes
Testing Instructions
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...