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

[frontend] Tools entity version are not fillable (#9330) #9525

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion opencti-platform/opencti-front/lang/front/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
"entity_Payment-Card": "Zahlungskarte",
"entity_Persona": "Persona",
"entity_Phone-Number": "Telefonnummer",
"entity_Playbook": "Spielbuch",
"entity_Position": "Position",
"entity_Process": "Prozess",
"entity_Public-Dashboard": "Öffentliches Dashboard",
Expand Down Expand Up @@ -2091,7 +2092,6 @@
"Platform under construction, subscribe to update!": "Plattform im Aufbau, Update abonnieren!",
"Platforms": "Plattformen",
"Playbook": "Spielbuch",
"entity_Playbook": "Spielbuch",
"Playbook is running": "Playbook wird ausgeführt",
"Playbook is stopped": "Playbook ist gestoppt",
"Playbook successfully completed.": "Playbook erfolgreich abgeschlossen.",
Expand Down Expand Up @@ -2798,6 +2798,7 @@
"Tool types": "Werkzeug-Typen",
"Tool usage": "Verwendung des Tools",
"Tool version": "Werkzeugversion",
"Tool Version": "Werkzeug-Version",
"Tools": "Werkzeuge",
"Tools versions": "Versionen der Werkzeuge",
"Top 10": "Top 10",
Expand Down
3 changes: 2 additions & 1 deletion opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
"entity_Payment-Card": "Payment card",
"entity_Persona": "Persona",
"entity_Phone-Number": "Phone number",
"entity_Playbook": "Playbook",
"entity_Position": "Position",
"entity_Process": "Process",
"entity_Public-Dashboard": "Public Dashboard",
Expand Down Expand Up @@ -2091,7 +2092,6 @@
"Platform under construction, subscribe to update!": "Platform under construction, subscribe to update!",
"Platforms": "Platforms",
"Playbook": "Playbook",
"entity_Playbook": "Playbook",
"Playbook is running": "Playbook is running",
"Playbook is stopped": "Playbook is stopped",
"Playbook successfully completed.": "Playbook successfully completed.",
Expand Down Expand Up @@ -2798,6 +2798,7 @@
"Tool types": "Tool types",
"Tool usage": "Tool usage",
"Tool version": "Tool version",
"Tool Version": "Tool Version",
"Tools": "Tools",
"Tools versions": "Tools versions",
"Top 10": "Top 10",
Expand Down
3 changes: 2 additions & 1 deletion opencti-platform/opencti-front/lang/front/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
"entity_Payment-Card": "Tarjeta bancaria",
"entity_Persona": "Persona",
"entity_Phone-Number": "Número de teléfono",
"entity_Playbook": "Playbook",
"entity_Position": "Posición",
"entity_Process": "Proceso",
"entity_Public-Dashboard": "Cuadro de mandos público",
Expand Down Expand Up @@ -2091,7 +2092,6 @@
"Platform under construction, subscribe to update!": "Plataforma en construcción, ¡suscríbete para estar al día!",
"Platforms": "Plataformas",
"Playbook": "Playbook",
"entity_Playbook": "Playbook",
"Playbook is running": "Playbook se está ejecutando",
"Playbook is stopped": "Playbook está parado",
"Playbook successfully completed.": "Playbook completado con éxito.",
Expand Down Expand Up @@ -2798,6 +2798,7 @@
"Tool types": "Tipos de herramienta",
"Tool usage": "Uso de la herramienta",
"Tool version": "Versión de la herramienta",
"Tool Version": "Versión de la herramienta",
"Tools": "Herramientas",
"Tools versions": "Versiones de las herramientas",
"Top 10": "Top 10",
Expand Down
5 changes: 3 additions & 2 deletions opencti-platform/opencti-front/lang/front/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
"entity_Payment-Card": "Carte de paiement",
"entity_Persona": "Persona",
"entity_Phone-Number": "Numéro de téléphone",
"entity_Playbook": "Playbook",
"entity_Position": "Position",
"entity_Process": "Processus",
"entity_Public-Dashboard": "Tableau de bord public",
Expand Down Expand Up @@ -2091,7 +2092,6 @@
"Platform under construction, subscribe to update!": "Plateforme en cours de construction, abonnez-vous pour être mis à jour !",
"Platforms": "Systèmes d'exploitation",
"Playbook": "Playbook",
"entity_Playbook": "Playbook",
"Playbook is running": "Le Playbook est en cours d'exécution",
"Playbook is stopped": "Playbook est arrêté",
"Playbook successfully completed.": "Playbook terminé avec succès.",
Expand Down Expand Up @@ -2798,6 +2798,7 @@
"Tool types": "Types d'outil",
"Tool usage": "Utilisation de cet outil",
"Tool version": "Version de l'outil",
"Tool Version": "Version de l'outil",
"Tools": "Outils",
"Tools versions": "Versions des outils",
"Top 10": "Top 10",
Expand Down Expand Up @@ -3130,7 +3131,7 @@
"You must provide at least one external reference for this type of entity": "Vous devez fournir au moins une référence externe pour ce type d'entité",
"You need a confidence level to edit objects in the platform.": "Vous avez besoin d'un niveau de confiance pour éditer des objets sur la plateforme.",
"You need to activate a two-factor authentication. Please type the code generated in your application.": "Vous devez activer une authentification à deux facteurs. Veuillez saisir le code généré dans votre application.",
"You need to activate OpenCTI Enterprise Edition to use this feature.": "Vous devez activer activer l'édition Enterprise d'OpenCTI pour utiliser cette fonctionnalité.",
"You need to activate OpenCTI enterprise edition to use this feature.": "Vous devez activer OpenCTI enterprise edition pour utiliser cette fonctionnalité.",
"You need to validate your two-factor authentication. Please type the code generated in your application": "Vous devez valider votre authentification à deux facteurs. Veuillez saisir le code généré dans votre application.",
"You see only marking definitions that can be shared (defined by the admin)": "Vous ne voyez que les définitions de marquage qui peuvent être partagées (définies par l'administrateur)",
"You will be automatically logged out at end of the timer.": "Vous serez automatiquement déconnecté à la fin du décompte.",
Expand Down
3 changes: 2 additions & 1 deletion opencti-platform/opencti-front/lang/front/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
"entity_Payment-Card": "クレジットカード番号",
"entity_Persona": "ペルソナ",
"entity_Phone-Number": "電話番号",
"entity_Playbook": "プレイブック",
"entity_Position": "位置",
"entity_Process": "プロセス",
"entity_Public-Dashboard": "パブリック・ダッシュボード",
Expand Down Expand Up @@ -2091,7 +2092,6 @@
"Platform under construction, subscribe to update!": "プラットフォームは構築中です!",
"Platforms": "プラットフォーム",
"Playbook": "プレイブック",
"entity_Playbook": "プレイブック",
"Playbook is running": "プレイブック実行中",
"Playbook is stopped": "プレイブック停止中",
"Playbook successfully completed.": "プレイブックは正常に終了しました。",
Expand Down Expand Up @@ -2798,6 +2798,7 @@
"Tool types": "ツール種別",
"Tool usage": "ツールの使い方",
"Tool version": "ツールバージョン",
"Tool Version": "ツールバージョン",
"Tools": "ツール",
"Tools versions": "ツールバージョン",
"Top 10": "トップ10",
Expand Down
3 changes: 2 additions & 1 deletion opencti-platform/opencti-front/lang/front/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
"entity_Payment-Card": "결제 카드",
"entity_Persona": "entity_Persona",
"entity_Phone-Number": "전화번호",
"entity_Playbook": "플레이북",
"entity_Position": "위치",
"entity_Process": "프로세스",
"entity_Public-Dashboard": "공개 대시보드",
Expand Down Expand Up @@ -2091,7 +2092,6 @@
"Platform under construction, subscribe to update!": "플랫폼이 구축 중입니다. 업데이트를 구독하세요!",
"Platforms": "플랫폼",
"Playbook": "플레이북",
"entity_Playbook": "플레이북",
"Playbook is running": "플레이북이 실행 중입니다",
"Playbook is stopped": "플레이북이 중지되었습니다",
"Playbook successfully completed.": "플레이북이 성공적으로 완료되었습니다.",
Expand Down Expand Up @@ -2798,6 +2798,7 @@
"Tool types": "도구 유형",
"Tool usage": "도구 사용",
"Tool version": "도구 버전",
"Tool Version": "도구 버전",
"Tools": "도구",
"Tools versions": "도구 버전",
"Top 10": "상위 10",
Expand Down
3 changes: 2 additions & 1 deletion opencti-platform/opencti-front/lang/front/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
"entity_Payment-Card": "支付卡",
"entity_Persona": "人格面具",
"entity_Phone-Number": "电话号码",
"entity_Playbook": "剧本",
"entity_Position": "位置",
"entity_Process": "进程",
"entity_Public-Dashboard": "公共仪表板",
Expand Down Expand Up @@ -2091,7 +2092,6 @@
"Platform under construction, subscribe to update!": "平台正在建设中,请订阅更新!",
"Platforms": "平台",
"Playbook": "剧本",
"entity_Playbook": "剧本",
"Playbook is running": "剧本正在运行",
"Playbook is stopped": "剧本已停止",
"Playbook successfully completed.": "播放簿已成功完成。",
Expand Down Expand Up @@ -2798,6 +2798,7 @@
"Tool types": "工具类型",
"Tool usage": "工具用法",
"Tool version": "工具版本",
"Tool Version": "工具版本",
"Tools": "攻击工具",
"Tools versions": "工具版本",
"Top 10": "前十名",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Tool: React.FC<ToolProps> = ({ toolData }) => {
case 'details':
return (
<Grid key={key} item xs={width}>
<ToolDetails tool={tool} />
<ToolDetails tools={tool} />
</Grid>
);
case 'basicInformation':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import BulkTextModal from '../../../../components/fields/BulkTextField/BulkTextM
import ProgressBar from '../../../../components/ProgressBar';
import BulkTextField from '../../../../components/fields/BulkTextField/BulkTextField';
import BulkTextModalButton from '../../../../components/fields/BulkTextField/BulkTextModalButton';
import TextField from '../../../../components/TextField';

const toolMutation = graphql`
mutation ToolCreationMutation($input: ToolAddInput!) {
Expand All @@ -59,6 +60,7 @@ interface ToolAddInput {
objectLabel: Option[]
externalReferences: { value: string }[]
tool_types: string[]
tool_version: string
confidence: number | null
file: File | null
}
Expand Down Expand Up @@ -94,6 +96,7 @@ export const ToolCreationForm: FunctionComponent<ToolFormProps> = ({
description: Yup.string().nullable(),
confidence: Yup.number().nullable(),
tool_types: Yup.array().nullable(),
tool_version: Yup.string().nullable(),
};
const toolValidator = useSchemaCreationValidation(TOOL_TYPE, basicShape);

Expand Down Expand Up @@ -137,6 +140,7 @@ export const ToolCreationForm: FunctionComponent<ToolFormProps> = ({
killChainPhases: (values.killChainPhases ?? []).map(({ value }) => value),
objectLabel: values.objectLabel.map((v) => v.value),
tool_types: values.tool_types,
tool_version: values.tool_version,
confidence: parseInt(String(values.confidence), 10),
externalReferences: values.externalReferences.map(({ value }) => value),
file: values.file,
Expand Down Expand Up @@ -169,6 +173,7 @@ export const ToolCreationForm: FunctionComponent<ToolFormProps> = ({
objectLabel: [],
externalReferences: [],
tool_types: [],
tool_version: '',
confidence: defaultConfidence ?? null,
file: null,
},
Expand Down Expand Up @@ -260,6 +265,13 @@ export const ToolCreationForm: FunctionComponent<ToolFormProps> = ({
containerStyle={fieldSpacingContainerStyle}
onChange={setFieldValue}
/>
<Field
component={TextField}
name="tool_version"
label={t_i18n('Tool Version')}
fullWidth={true}
style={{ marginTop: 20 }}
/>
<ExternalReferencesField
name="externalReferences"
style={fieldSpacingContainerStyle}
Expand Down

This file was deleted.

Loading
Loading