[go: nahoru, domu]

Skip to content
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

[backend] Change external reference resolution for OpenBAS integration #7233

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

RomuDeuxfois
Copy link
Member
@RomuDeuxfois RomuDeuxfois commented Jun 5, 2024

Proposed changes

OpenCTI should get the latest ended simulation based on scenarios instead of the latest simulation based on the first scenario.

Related issues

Testing

  • Generate a scenario from OpenCTI to OpenBAS
  • Launch a simulation with some expectations
  • Wait for the end of this simulation
  • Go to opencti and checked that the security posture is the same as that on OpenBAS
  • Re launch the simulation, change the expectation result and verify the new posture in both platform

OpenBAS PR -> OpenBAS-Platform/openbas#1048

@RomuDeuxfois RomuDeuxfois added the filigran team use to identify PR from the Filigran team label Jun 5, 2024
@RomuDeuxfois RomuDeuxfois linked an issue Jun 5, 2024 that may be closed by this pull request
@@ -176,19 +175,11 @@ export const getScenarioResult = async (id: string) => {
}
const httpClient = buildXTmOpenBasHttpClient();
try {
const { data: scenario } = await httpClient.get(`/scenarios/external_reference/${id}`);
if (!scenario || !scenario.scenario_id) {
const { data: exercise } = await httpClient.get(`/scenarios/external_reference/${id}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to understand: this openBAS API has changed its signature and returns now an exercise instead of a scenario, right ?
So if openBAS and openCTI are not both updated to the latest version, this code will fail I guess ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, we need to have a good synchronisation between the two products

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we write somewhere which version of octi is compatible with which version of obas?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are thinking about a robuste plan to handle this.
Good point :)

Copy link
codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 67.55%. Comparing base (803c52c) to head (1e12f6a).

Files Patch % Lines
...-platform/opencti-graphql/src/database/xtm-obas.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7233   +/-   ##
=======================================
  Coverage   67.54%   67.55%           
=======================================
  Files         561      561           
  Lines       68754    68745    -9     
  Branches     5837     5837           
=======================================
- Hits        46441    46440    -1     
+ Misses      22313    22305    -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member
@SouadHadjiat SouadHadjiat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally

@RomuDeuxfois RomuDeuxfois merged commit aaaec63 into master Jun 6, 2024
5 checks passed
@RomuDeuxfois RomuDeuxfois deleted the issue/7223 branch June 6, 2024 14:15
daimyo007 pushed a commit to fbicyber/opencti__opencti that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security Posture on OpenCTI
3 participants