Skip to content

Commit

Permalink
Merge branch 'master' into release/6.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHassine committed Jan 27, 2025
1 parent 7fa79c9 commit fcf2a9c
Show file tree
Hide file tree
Showing 73 changed files with 1,236 additions and 1,020 deletions.
10 changes: 5 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ steps:
- npm install -g jfrog-cli-v2-jf
# Collect git info
- jf rt bag $JFROG_BUILD_NAME $DRONE_BUILD_NUMBER
# Archive and upload each artefact that we need
- tar -czvf frontend-test-results-$DRONE_BUILD_NUMBER.tar.gz opencti-platform/opencti-front/test-results
- jf rt u frontend-test-results-$DRONE_BUILD_NUMBER.tar.gz $JFROG_REPOSITORY --build-name=$JFROG_BUILD_NAME --build-number=$DRONE_BUILD_NUMBER --url=$JFROG_URL --access-token=$JFROG_TOKEN
- tar -czvf backend-test-results-$DRONE_BUILD_NUMBER.tar.gz opencti-platform/opencti-graphql/test-results
- jf rt u backend-test-results-$DRONE_BUILD_NUMBER.tar.gz $JFROG_REPOSITORY --build-name=$JFROG_BUILD_NAME --build-number=$DRONE_BUILD_NUMBER --url=$JFROG_URL --access-token=$JFROG_TOKEN
# Archive and upload each artefact that we need, if folder are present.
- test -d opencti-platform/opencti-front/test-results && tar -czvf frontend-test-results-$DRONE_BUILD_NUMBER.tar.gz opencti-platform/opencti-front/test-results
- test -d opencti-platform/opencti-front/test-results && jf rt u frontend-test-results-$DRONE_BUILD_NUMBER.tar.gz $JFROG_REPOSITORY --build-name=$JFROG_BUILD_NAME --build-number=$DRONE_BUILD_NUMBER --url=$JFROG_URL --access-token=$JFROG_TOKEN
- test -d opencti-platform/opencti-graphql/test-results && tar -czvf backend-test-results-$DRONE_BUILD_NUMBER.tar.gz opencti-platform/opencti-graphql/test-results
- test -d opencti-platform/opencti-graphql/test-results && jf rt u backend-test-results-$DRONE_BUILD_NUMBER.tar.gz $JFROG_REPOSITORY --build-name=$JFROG_BUILD_NAME --build-number=$DRONE_BUILD_NUMBER --url=$JFROG_URL --access-token=$JFROG_TOKEN
# Next line should be done only once at the end: it's recording and gathering build info
- jf rt bp $JFROG_BUILD_NAME $DRONE_BUILD_NUMBER --url=$JFROG_URL --access-token=$JFROG_TOKEN --build-url=$DRONE_BUILD_LINK
# Cleaning up old build in JFrog
Expand Down
27 changes: 13 additions & 14 deletions opencti-platform/opencti-front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
"dompurify": "3.2.1",
"extract-files": "13.0.0",
"filigran-icon": "0.11.0",
"filigran-ui": "0.25.2",
"filigran-ui": "0.25.3",
"formik": "2.4.6",
"formik-mui": "5.0.0-alpha.0",
"formik-mui-lab": "1.0.0",
"graphiql": "3.8.3",
"graphql": "16.9.0",
"graphql-ws": "5.16.1",
"graphql-ws": "5.16.2",
"html-react-parser": "5.2.2",
"html-to-image": "1.11.11",
"html-to-pdfmake": "2.5.13",
Expand All @@ -56,7 +56,7 @@
"marked": "15.0.3",
"mdi-material-ui": "7.9.1",
"moment": "2.30.1",
"moment-timezone": "0.5.45",
"moment-timezone": "0.5.46",
"pdfmake": "0.2.13",
"prop-types": "15.8.1",
"qrcode": "1.5.4",
Expand All @@ -65,7 +65,7 @@
"react-apexcharts": "1.7.0",
"react-color": "2.19.3",
"react-compound-slider": "3.4.0",
"react-cookie": "7.2.0",
"react-cookie": "7.2.2",
"react-csv": "2.2.2",
"react-dom": "18.3.1",
"react-draggable": "4.4.6",
Expand All @@ -74,15 +74,15 @@
"react-grid-layout": "1.5.0",
"react-intl": "6.8.9",
"react-leaflet": "4.2.1",
"react-markdown": "9.0.1",
"react-markdown": "9.0.3",
"react-material-ui-carousel": "3.4.2",
"react-mde": "11.5.0",
"react-otp-input": "3.1.1",
"react-pdf": "9.2.1",
"react-rectangle-selection": "1.0.4",
"react-relay": "17.0.0",
"react-relay-network-modern": "6.2.2",
"react-router-dom": "6.28.0",
"react-router-dom": "6.28.2",
"react-syntax-highlighter": "15.6.1",
"react-virtualized": "9.22.5",
"react-wordcloud": "1.2.7",
Expand All @@ -93,8 +93,7 @@
"remark-gfm": "4.0.0",
"remark-parse": "11.0.0",
"rxjs": "7.8.1",
"three-spritetext": "1.9.3",
"unified": "11.0.4",
"three-spritetext": "1.9.4",
"use-analytics": "1.1.0",
"uuid": "11.0.3",
"yup": "1.6.1"
Expand All @@ -105,7 +104,7 @@
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.0",
"@testing-library/user-event": "14.6.1",
"@types/d3-scale": "4.0.8",
"@types/html-to-pdfmake": "2.4.4",
"@types/node": "20.17.14",
Expand Down Expand Up @@ -136,18 +135,18 @@
"eslint-plugin-custom-rules": "link:packages/eslint-plugin-custom-rules",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-import-newlines": "1.4.0",
"eslint-plugin-react": "7.37.3",
"express": "4.21.0",
"eslint-plugin-react": "7.37.4",
"express": "4.21.2",
"fs-extra": "11.3.0",
"http-proxy-middleware": "3.0.3",
"i18n-auto-translation": "1.10.0",
"i18n-auto-translation": "1.10.1",
"jsdom": "25.0.1",
"monocart-reporter": "2.4.5",
"react-test-renderer": "18.3.1",
"relay-compiler": "17.0.0",
"relay-test-utils": "17.0.0",
"typescript": "5.7.2",
"vite": "5.4.8",
"typescript": "5.7.3",
"vite": "5.4.12",
"vite-plugin-relay": "2.1.0",
"vite-plugin-static-copy": "2.2.0",
"vitest": "2.0.5"
Expand Down
29 changes: 12 additions & 17 deletions opencti-platform/opencti-front/src/components/MarkdownDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Markdown from 'react-markdown';
import Markdown, { Options as MarkdownProps } from 'react-markdown';
import remarkParse from 'remark-parse';
import remarkFlexibleMarkers from 'remark-flexible-markers';
import { useTheme } from '@mui/styles';
import { PluggableList } from 'react-markdown/lib';
import React, { FunctionComponent, SyntheticEvent, useState } from 'react';
import remarkGfm from 'remark-gfm';
import type { Theme } from './Theme';
Expand Down Expand Up @@ -55,7 +54,7 @@ interface MarkdownWithRedirectionWarningProps {
commonmark?: boolean;
removeLinks?: boolean;
removeLineBreaks?: boolean;
remarkPlugins?: PluggableList;
remarkPlugins?: MarkdownProps['remarkPlugins'];
emptyStringIfUndefined?: boolean;
disableWarningAtLinkClick?: boolean;
}
Expand Down Expand Up @@ -119,13 +118,11 @@ MarkdownWithRedirectionWarningProps
return (
<Markdown
className="markdown"
remarkPlugins={
[
remarkGfm,
remarkFlexibleMarkers,
[remarkParse, { commonmark: !!commonmark }],
] as PluggableList
}
remarkPlugins={[
remarkGfm,
remarkFlexibleMarkers,
[remarkParse, { commonmark: !!commonmark }],
]}
components={MarkDownComponents(theme)}
disallowedElements={disallowedElements}
unwrapDisallowed={true}
Expand All @@ -137,13 +134,11 @@ MarkdownWithRedirectionWarningProps
return (
<Markdown
className="markdown"
remarkPlugins={
[
remarkGfm,
remarkFlexibleMarkers,
[remarkParse, { commonmark: !!commonmark }],
] as PluggableList
}
remarkPlugins={[
remarkGfm,
remarkFlexibleMarkers,
[remarkParse, { commonmark: !!commonmark }],
]}
disallowedElements={disallowedElements}
unwrapDisallowed={true}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class ListLines extends Component {
<ToggleButtonGroup
size="small"
color="secondary"
value={currentView || 'lines'}
value={(!enableEntitiesView && currentView === 'entities') ? 'relationships' : currentView || 'lines'}
exclusive={true}
onChange={(_, value) => {
if (value && value === 'export') {
Expand Down Expand Up @@ -311,7 +311,7 @@ class ListLines extends Component {
</Tooltip>
</ToggleButton>
)}
{enableEntitiesView && (
{(enableEntitiesView || (!enableEntitiesView && currentView === 'entities') || currentView === 'relationships') && (
<ToggleButton
value="relationships"
aria-label="relationships"
Expand All @@ -320,21 +320,20 @@ class ListLines extends Component {
<RelationManyToMany
fontSize="small"
color={
currentView === 'relationships' || !currentView
currentView === 'relationships' || (!enableEntitiesView && currentView === 'entities') || !currentView
? 'secondary'
: 'primary'
}
/>
</Tooltip>
</ToggleButton>
)}
{typeof handleChangeView === 'function'
&& !enableEntitiesView && (
<Tooltip title={t('Lines view')}>
<ToggleButton value="lines" aria-label="lines">
<FiligranIcon icon={ListViewIcon} color='secondary' size='small'/>
</ToggleButton>
</Tooltip>
{typeof handleChangeView === 'function' && !enableEntitiesView && currentView !== 'relationships' && currentView !== 'entities' && (
<Tooltip title={t('Lines view')}>
<ToggleButton value="lines" aria-label="lines">
<FiligranIcon icon={ListViewIcon} color='secondary' size='small'/>
</ToggleButton>
</Tooltip>
)}
{typeof handleChangeView === 'function' && enableGraph && (
<ToggleButton value="graph" aria-label="graph">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const GroupingCreationForm: FunctionComponent<GroupingFormProps> = ({
fullWidth={true}
multiline={true}
rows="4"
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
askAi={true}
/>
<Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ MalwareAnalysisFormProps
label={t_i18n('Report name')}
required={mandatoryAttributes.includes('result_name')}
fullWidth={true}
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
/>
<Field
component={TextField}
name="version"
label={t_i18n('Version of the product')}
required={mandatoryAttributes.includes('version')}
fullWidth={true}
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
/>
<Field
component={DateTimePickerField}
Expand All @@ -250,7 +250,7 @@ MalwareAnalysisFormProps
textFieldProps={{
label: t_i18n('Submission date'),
fullWidth: true,
style: { marginTop: 20 },
style: { ...fieldSpacingContainerStyle },
required: mandatoryAttributes.includes('submitted'),
}}
/>
Expand All @@ -275,26 +275,26 @@ MalwareAnalysisFormProps
<CreatedByField
name="createdBy"
required={mandatoryAttributes.includes('createdBy')}
style={{ marginTop: 20, width: '100%' }}
style={fieldSpacingContainerStyle}
setFieldValue={setFieldValue}
/>
<ObjectLabelField
name="objectLabel"
required={mandatoryAttributes.includes('objectLabel')}
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
setFieldValue={setFieldValue}
values={values.objectLabel}
/>
<ObjectMarkingField
name="objectMarking"
required={mandatoryAttributes.includes('objectMarking')}
style={{ marginTop: 20, width: '100%' }}
style={fieldSpacingContainerStyle}
setFieldValue={setFieldValue}
/>
<ExternalReferencesField
name="externalReferences"
required={mandatoryAttributes.includes('externalReferences')}
style={{ marginTop: 20, width: '100%' }}
style={fieldSpacingContainerStyle}
setFieldValue={setFieldValue}
values={values.externalReferences}
/>
Expand All @@ -305,15 +305,15 @@ MalwareAnalysisFormProps
required={mandatoryAttributes.includes('configuration_version')}
label={t_i18n('Configuration version')}
fullWidth
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
/>
<Field
component={DateTimePickerField}
name="analysis_started"
textFieldProps={{
label: t_i18n('Analysis started'),
fullWidth: true,
style: { marginTop: 20 },
style: { ...fieldSpacingContainerStyle },
required: mandatoryAttributes.includes('analysis_started'),
}}
/>
Expand All @@ -323,7 +323,7 @@ MalwareAnalysisFormProps
textFieldProps={{
label: t_i18n('Analysis ended'),
fullWidth: true,
style: { marginTop: 20 },
style: { ...fieldSpacingContainerStyle },
required: mandatoryAttributes.includes('analysis_ended'),
}}
/>
Expand All @@ -333,15 +333,15 @@ MalwareAnalysisFormProps
required={mandatoryAttributes.includes('analysis_engine_version')}
label={t_i18n('Analysis engine version')}
fullWidth
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
/>
<Field
component={TextField}
name="analysis_definition_version"
required={mandatoryAttributes.includes('analysis_definition_version')}
label={t_i18n('Analysis definition version')}
fullWidth
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
/>
<Field
component={TextField}
Expand All @@ -351,7 +351,7 @@ MalwareAnalysisFormProps
fullWidth
multiline
rows="4"
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
/>
<div className={classes.buttons}>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export const ReportCreationForm: FunctionComponent<ReportFormProps> = ({
required: mandatoryAttributes.includes('published'),
variant: 'standard',
fullWidth: true,
style: { marginTop: 20 },
style: { ...fieldSpacingContainerStyle },
}}
/>
<OpenVocabField
Expand Down Expand Up @@ -281,7 +281,7 @@ export const ReportCreationForm: FunctionComponent<ReportFormProps> = ({
fullWidth={true}
multiline={true}
rows="4"
style={{ marginTop: 20 }}
style={fieldSpacingContainerStyle}
askAi={true}
/>
<Field
Expand Down
Loading

0 comments on commit fcf2a9c

Please sign in to comment.