UI: Add info box for "Scan Agent's networks" option in configuration

This commit is contained in:
Shreya Malviya 2022-09-27 18:08:36 +05:30
parent 688a41a11e
commit 085883d3a6
2 changed files with 14 additions and 9 deletions

View File

@ -60,7 +60,7 @@ export default function UiSchema(props) {
}, },
network_scan: { network_scan: {
targets: { targets: {
info_box: { info_box_general: {
'ui:field': InfoBox 'ui:field': InfoBox
}, },
blocked_ips: { blocked_ips: {
@ -73,6 +73,9 @@ export default function UiSchema(props) {
classNames: 'config-template-no-header' classNames: 'config-template-no-header'
} }
}, },
info_box_scan_my_networks: {
'ui:field': InfoBox
},
subnets: { subnets: {
items: { items: {
classNames: 'config-template-no-header' classNames: 'config-template-no-header'

View File

@ -2,9 +2,9 @@ const SCAN_TARGET_CONFIGURATION_SCHEMA = {
'title': 'Network', 'title': 'Network',
'type': 'object', 'type': 'object',
'properties': { 'properties': {
'info_box': { 'info_box_general': {
'info': 'The Monkey scans for machines on each of the network interfaces of the ' + 'info': 'The Monkey scans for machines on each of the network interfaces of the ' +
'machine it is running on if "Scan Agent\'s networks" is checked. ' + 'machine it is running on, if "Scan Agent\'s networks" is checked. ' +
'Additionally, the Monkey scans machines according to "Scan target list". ' 'Additionally, the Monkey scans machines according to "Scan target list". '
}, },
'blocked_ips': { 'blocked_ips': {
@ -41,15 +41,17 @@ const SCAN_TARGET_CONFIGURATION_SCHEMA = {
'\tDefine a segment using an subnet IP mask: "192.168.0.5/24"\n' + '\tDefine a segment using an subnet IP mask: "192.168.0.5/24"\n' +
'\tDefine a single-host segment: "printer.example"' '\tDefine a single-host segment: "printer.example"'
}, },
'info_box_scan_my_networks': {
'info': 'If "Scan Agent\'s networks" is enabled, the Agent will go over all network ' +
'interfaces and will scan their networks, ' +
'in addition to the IPs that are configured manually in the "Scan target list". ' +
'Note: If the Agent runs on a machine within a public network, ' +
'this setting will cause scanning and exploitation attempts on that network.'
},
'scan_my_networks': { 'scan_my_networks': {
'title': 'Scan Agent\'s networks', 'title': 'Scan Agent\'s networks',
'type': 'boolean', 'type': 'boolean',
'default': false, 'default': false
'description': 'If enabled, the Agent will go over all network interfaces and ' +
'will scan their networks,' +
' in addition to the IPs that are configured manually in the "Scan target list". ' +
'Note: If the Agent runs on a machine within a public network,' +
' this setting will cause scanning and exploitation attempts on that network.'
}, },
'subnets': { 'subnets': {
'title': 'Scan target list', 'title': 'Scan target list',