forked from p15670423/monkey
Merge remote-tracking branch 'upstream/feature/configuration_improvement' into feature/configuration_improvements
# Conflicts: # monkey/monkey_island/cc/ui/src/components/configuration-components/ValidationFormats.js
This commit is contained in:
commit
fd1d3404e7
|
@ -83,7 +83,7 @@ script:
|
||||||
- cd monkey_island/cc/ui
|
- cd monkey_island/cc/ui
|
||||||
- npm ci # See https://docs.npmjs.com/cli/ci.html
|
- npm ci # See https://docs.npmjs.com/cli/ci.html
|
||||||
- eslint ./src --quiet # Test for errors
|
- eslint ./src --quiet # Test for errors
|
||||||
- JS_WARNINGS_AMOUNT_UPPER_LIMIT=70
|
- JS_WARNINGS_AMOUNT_UPPER_LIMIT=25
|
||||||
- eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT # Test for max warnings
|
- eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT # Test for max warnings
|
||||||
|
|
||||||
# Build documentation
|
# Build documentation
|
||||||
|
|
|
@ -10,7 +10,6 @@ import monkey_island.cc.services.post_breach_files
|
||||||
from monkey_island.cc.database import mongo
|
from monkey_island.cc.database import mongo
|
||||||
from monkey_island.cc.encryptor import encryptor
|
from monkey_island.cc.encryptor import encryptor
|
||||||
from monkey_island.cc.network_utils import local_ip_addresses
|
from monkey_island.cc.network_utils import local_ip_addresses
|
||||||
|
|
||||||
from monkey_island.cc.services.config_schema.config_schema import SCHEMA
|
from monkey_island.cc.services.config_schema.config_schema import SCHEMA
|
||||||
|
|
||||||
__author__ = "itay.mizeretz"
|
__author__ = "itay.mizeretz"
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
from monkey_island.cc.services.config_schema.basic import BASIC
|
from monkey_island.cc.services.config_schema.basic import BASIC
|
||||||
from monkey_island.cc.services.config_schema.basic_network import BASIC_NETWORK
|
from monkey_island.cc.services.config_schema.basic_network import BASIC_NETWORK
|
||||||
from monkey_island.cc.services.config_schema.definitions.exploiter_classes import EXPLOITER_CLASSES
|
from monkey_island.cc.services.config_schema.definitions.exploiter_classes import \
|
||||||
from monkey_island.cc.services.config_schema.definitions.finger_classes import FINGER_CLASSES
|
EXPLOITER_CLASSES
|
||||||
from monkey_island.cc.services.config_schema.definitions.post_breach_actions import POST_BREACH_ACTIONS
|
from monkey_island.cc.services.config_schema.definitions.finger_classes import \
|
||||||
|
FINGER_CLASSES
|
||||||
|
from monkey_island.cc.services.config_schema.definitions.post_breach_actions import \
|
||||||
|
POST_BREACH_ACTIONS
|
||||||
from monkey_island.cc.services.config_schema.definitions.system_info_collector_classes import \
|
from monkey_island.cc.services.config_schema.definitions.system_info_collector_classes import \
|
||||||
SYSTEM_INFO_COLLECTOR_CLASSES
|
SYSTEM_INFO_COLLECTOR_CLASSES
|
||||||
from monkey_island.cc.services.config_schema.internal import INTERNAL
|
from monkey_island.cc.services.config_schema.internal import INTERNAL
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from common.data.system_info_collectors_names import (AWS_COLLECTOR,
|
from common.data.system_info_collectors_names import (AWS_COLLECTOR,
|
||||||
|
AZURE_CRED_COLLECTOR,
|
||||||
ENVIRONMENT_COLLECTOR,
|
ENVIRONMENT_COLLECTOR,
|
||||||
HOSTNAME_COLLECTOR,
|
HOSTNAME_COLLECTOR,
|
||||||
PROCESS_LIST_COLLECTOR,
|
|
||||||
MIMIKATZ_COLLECTOR,
|
MIMIKATZ_COLLECTOR,
|
||||||
AZURE_CRED_COLLECTOR)
|
PROCESS_LIST_COLLECTOR)
|
||||||
|
|
||||||
SYSTEM_INFO_COLLECTOR_CLASSES = {
|
SYSTEM_INFO_COLLECTOR_CLASSES = {
|
||||||
"title": "System Information Collectors",
|
"title": "System Information Collectors",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from common.data.system_info_collectors_names import (AWS_COLLECTOR,
|
from common.data.system_info_collectors_names import (AWS_COLLECTOR,
|
||||||
|
AZURE_CRED_COLLECTOR,
|
||||||
ENVIRONMENT_COLLECTOR,
|
ENVIRONMENT_COLLECTOR,
|
||||||
HOSTNAME_COLLECTOR,
|
HOSTNAME_COLLECTOR,
|
||||||
PROCESS_LIST_COLLECTOR, MIMIKATZ_COLLECTOR, AZURE_CRED_COLLECTOR)
|
MIMIKATZ_COLLECTOR,
|
||||||
|
PROCESS_LIST_COLLECTOR)
|
||||||
|
|
||||||
MONKEY = {
|
MONKEY = {
|
||||||
"title": "Monkey",
|
"title": "Monkey",
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
"global-strict": 0,
|
"global-strict": 0,
|
||||||
"no-underscore-dangle": 0,
|
"no-underscore-dangle": 0,
|
||||||
"no-console": 0,
|
"no-console": 0,
|
||||||
"no-unused-vars": 1,
|
"no-unused-vars": [1, {"vars": "all", "args": "all", "argsIgnorePattern": "^_", "varsIgnorePattern": "^React$" }],
|
||||||
"no-trailing-spaces": [
|
"no-trailing-spaces": [
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,7 +97,7 @@ class AppComponent extends AuthComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
redirectTo = (userPath, targetPath) => {
|
redirectTo = (userPath, targetPath) => {
|
||||||
let pathQuery = new RegExp(userPath + '[\/]?$', 'g');
|
let pathQuery = new RegExp(userPath + '[/]?$', 'g');
|
||||||
if (window.location.pathname.match(pathQuery)) {
|
if (window.location.pathname.match(pathQuery)) {
|
||||||
return <Redirect to={{pathname: targetPath}}/>
|
return <Redirect to={{pathname: targetPath}}/>
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class SideNavComponent extends React.Component {
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<NavLink to='/report/security'
|
<NavLink to='/report/security'
|
||||||
isActive={(match, location) => {
|
isActive={(_match, location) => {
|
||||||
return (location.pathname === '/report/attack'
|
return (location.pathname === '/report/attack'
|
||||||
|| location.pathname === '/report/zeroTrust'
|
|| location.pathname === '/report/zeroTrust'
|
||||||
|| location.pathname === '/report/security')
|
|| location.pathname === '/report/security')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table';
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, ScanStatus} from './Helpers';
|
import {renderMachineFromSystemData, ScanStatus} from './Helpers';
|
||||||
import MitigationsComponent from "./MitigationsComponent";
|
import MitigationsComponent from './MitigationsComponent';
|
||||||
|
|
||||||
class T1136 extends React.Component {
|
class T1136 extends React.Component {
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,18 @@ import Form from 'react-jsonschema-form-bs4';
|
||||||
import React, {useState} from 'react';
|
import React, {useState} from 'react';
|
||||||
import {Nav} from 'react-bootstrap';
|
import {Nav} from 'react-bootstrap';
|
||||||
|
|
||||||
const sectionOrder = ['network', 'monkey', 'island_server', 'logging', 'exploits', 'dropper', 'classes', 'general',
|
const sectionOrder = [
|
||||||
'kill_file', 'testing'];
|
'network',
|
||||||
|
'monkey',
|
||||||
|
'island_server',
|
||||||
|
'logging',
|
||||||
|
'exploits',
|
||||||
|
'dropper',
|
||||||
|
'classes',
|
||||||
|
'general',
|
||||||
|
'kill_file',
|
||||||
|
'testing'
|
||||||
|
];
|
||||||
const initialSection = sectionOrder[0];
|
const initialSection = sectionOrder[0];
|
||||||
|
|
||||||
export default function InternalConfig(props) {
|
export default function InternalConfig(props) {
|
||||||
|
@ -38,7 +48,7 @@ export default function InternalConfig(props) {
|
||||||
className={'config-nav'}>
|
className={'config-nav'}>
|
||||||
{sectionOrder.map(section => {
|
{sectionOrder.map(section => {
|
||||||
return (
|
return (
|
||||||
<Nav.Item>
|
<Nav.Item key={section}>
|
||||||
<Nav.Link eventKey={section}>{getNavTitle(schema, section)}</Nav.Link>
|
<Nav.Link eventKey={section}>{getNavTitle(schema, section)}</Nav.Link>
|
||||||
</Nav.Item>);
|
</Nav.Item>);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -23,8 +23,8 @@ class PbaInput extends AuthComponent {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState, snapshot) {
|
componentDidUpdate(prevProps, _prevState, _snapshot) {
|
||||||
if(prevProps.options.filename !== this.props.options.filename && this.props.options.filename === ""){
|
if(prevProps.options.filename !== this.props.options.filename && this.props.options.filename === ''){
|
||||||
this.setState({filename: this.props.options.filename})
|
this.setState({filename: this.props.options.filename})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ class PbaInput extends AuthComponent {
|
||||||
if (fileItems.length > 0) {
|
if (fileItems.length > 0) {
|
||||||
this.state.setPbaFilename(fileItems[0].file.name)
|
this.state.setPbaFilename(fileItems[0].file.name)
|
||||||
} else {
|
} else {
|
||||||
this.state.setPbaFilename("")
|
this.state.setPbaFilename('')
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>)
|
/>)
|
||||||
|
|
|
@ -11,7 +11,6 @@ export const formValidationFormats = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function buildIpRangeRegex(){
|
function buildIpRangeRegex(){
|
||||||
console.log(formValidationFormats);
|
|
||||||
return new RegExp([
|
return new RegExp([
|
||||||
'^'+ipRegex+'$|', // Single: IP
|
'^'+ipRegex+'$|', // Single: IP
|
||||||
'^'+ipRegex+'-'+ipRegex+'$|', // IP range: IP-IP
|
'^'+ipRegex+'-'+ipRegex+'$|', // IP range: IP-IP
|
||||||
|
|
|
@ -101,9 +101,9 @@ class PreviewPaneComponent extends AuthComponent {
|
||||||
.replace(/\\t/g, '\t')
|
.replace(/\\t/g, '\t')
|
||||||
.replace(/\\b/g, '\b')
|
.replace(/\\b/g, '\b')
|
||||||
.replace(/\\f/g, '\f')
|
.replace(/\\f/g, '\f')
|
||||||
.replace(/\\"/g, '\"')
|
.replace(/\\"/g, '"')
|
||||||
.replace(/\\'/g, '\'')
|
.replace(/\\'/g, '\'')
|
||||||
.replace(/\\&/g, '\&');
|
.replace(/\\&/g, '&');
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadLog(asset) {
|
downloadLog(asset) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
lastAction: 'none',
|
lastAction: 'none',
|
||||||
sections: [],
|
sections: [],
|
||||||
selectedSection: 'attack',
|
selectedSection: 'attack',
|
||||||
showAttackAlert: false,
|
showAttackAlert: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
{this.state.sections.map(section => {
|
{this.state.sections.map(section => {
|
||||||
let classProp = section.key.startsWith('basic') ? 'tab-primary' : '';
|
let classProp = section.key.startsWith('basic') ? 'tab-primary' : '';
|
||||||
return (
|
return (
|
||||||
<Nav.Item>
|
<Nav.Item key={section.key}>
|
||||||
<Nav.Link className={classProp} eventKey={section.key}>{section.title}</Nav.Link>
|
<Nav.Link className={classProp} eventKey={section.key}>{section.title}</Nav.Link>
|
||||||
</Nav.Item>);
|
</Nav.Item>);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Col} from 'react-bootstrap';
|
import {Col} from 'react-bootstrap';
|
||||||
import rainge from 'rainge';
|
import rainge from 'rainge';
|
||||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faCopyright} from "@fortawesome/free-regular-svg-icons";
|
import {faCopyright} from '@fortawesome/free-regular-svg-icons';
|
||||||
|
|
||||||
class LicensePageComponent extends React.Component {
|
class LicensePageComponent extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
|
@ -2,9 +2,9 @@ import React from 'react';
|
||||||
import {Button, Col, Container, Form, Row} from 'react-bootstrap';
|
import {Button, Col, Container, Form, Row} from 'react-bootstrap';
|
||||||
|
|
||||||
import AuthService from '../../services/AuthService';
|
import AuthService from '../../services/AuthService';
|
||||||
import Particles from "react-particles-js";
|
import Particles from 'react-particles-js';
|
||||||
import {particleParams} from "../../styles/components/particle-component/AuthPageParams";
|
import {particleParams} from '../../styles/components/particle-component/AuthPageParams';
|
||||||
import monkeyGeneral from "../../images/militant-monkey.svg";
|
import monkeyGeneral from '../../images/militant-monkey.svg';
|
||||||
|
|
||||||
class LoginPageComponent extends React.Component {
|
class LoginPageComponent extends React.Component {
|
||||||
login = (event) => {
|
login = (event) => {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {ReactiveGraph} from 'components/reactive-graph/ReactiveGraph';
|
||||||
import {getOptions, edgeGroupToColor} from 'components/map/MapOptions';
|
import {getOptions, edgeGroupToColor} from 'components/map/MapOptions';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import '../../styles/components/Map.scss';
|
import '../../styles/components/Map.scss';
|
||||||
import {faInfoCircle} from "@fortawesome/free-solid-svg-icons/faInfoCircle";
|
import {faInfoCircle} from '@fortawesome/free-solid-svg-icons/faInfoCircle';
|
||||||
|
|
||||||
class MapPageComponent extends AuthComponent {
|
class MapPageComponent extends AuthComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faClipboard} from '@fortawesome/free-solid-svg-icons/faClipboard';
|
import {faClipboard} from '@fortawesome/free-solid-svg-icons/faClipboard';
|
||||||
import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck';
|
import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck';
|
||||||
import {faSync} from '@fortawesome/free-solid-svg-icons/faSync';
|
import {faSync} from '@fortawesome/free-solid-svg-icons/faSync';
|
||||||
import {faInfoCircle} from "@fortawesome/free-solid-svg-icons/faInfoCircle";
|
import {faInfoCircle} from '@fortawesome/free-solid-svg-icons/faInfoCircle';
|
||||||
import {faExclamationTriangle} from "@fortawesome/free-solid-svg-icons/faExclamationTriangle";
|
import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons/faExclamationTriangle';
|
||||||
|
|
||||||
import {Link} from 'react-router-dom';
|
import {Link} from 'react-router-dom';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
|
|
|
@ -5,8 +5,8 @@ import AuthComponent from '../AuthComponent';
|
||||||
import StartOverModal from '../ui-components/StartOverModal';
|
import StartOverModal from '../ui-components/StartOverModal';
|
||||||
import '../../styles/pages/StartOverPage.scss';
|
import '../../styles/pages/StartOverPage.scss';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faInfoCircle} from "@fortawesome/free-solid-svg-icons/faInfoCircle";
|
import {faInfoCircle} from '@fortawesome/free-solid-svg-icons/faInfoCircle';
|
||||||
import {faCheck} from "@fortawesome/free-solid-svg-icons/faCheck";
|
import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck';
|
||||||
|
|
||||||
class StartOverPageComponent extends AuthComponent {
|
class StartOverPageComponent extends AuthComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import download from 'downloadjs';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
|
|
||||||
import '../../styles/pages/TelemetryPage.scss';
|
import '../../styles/pages/TelemetryPage.scss';
|
||||||
import {faDownload} from "@fortawesome/free-solid-svg-icons/faDownload";
|
import {faDownload} from '@fortawesome/free-solid-svg-icons/faDownload';
|
||||||
|
|
||||||
const renderJson = (val) => <JSONTree data={val} level={1} theme="eighties" invertTheme={true}/>;
|
const renderJson = (val) => <JSONTree data={val} level={1} theme="eighties" invertTheme={true}/>;
|
||||||
const renderTime = (val) => val.split('.')[0];
|
const renderTime = (val) => val.split('.')[0];
|
||||||
|
|
|
@ -48,7 +48,7 @@ class AttackReport extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onTechniqueSelect = (technique, value) => {
|
onTechniqueSelect = (technique, _) => {
|
||||||
let selectedTechnique = this.getTechniqueByTitle(technique);
|
let selectedTechnique = this.getTechniqueByTitle(technique);
|
||||||
if (selectedTechnique === false){
|
if (selectedTechnique === false){
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -473,7 +473,7 @@ class ReportPageComponent extends AuthComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
generateShellshockPathListBadges(paths) {
|
generateShellshockPathListBadges(paths) {
|
||||||
return paths.map(path => <span className="badge badge-warning" style={{margin: '2px'}}>{path}</span>);
|
return paths.map(path => <span className="badge badge-warning" style={{margin: '2px'}} key={path}>{path}</span>);
|
||||||
}
|
}
|
||||||
|
|
||||||
generateSmbPasswordIssue(issue) {
|
generateSmbPasswordIssue(issue) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, {Component} from 'react';
|
import React, {Component} from 'react';
|
||||||
import * as PropTypes from 'prop-types';
|
import * as PropTypes from 'prop-types';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faExclamationTriangle} from "@fortawesome/free-solid-svg-icons/faExclamationTriangle";
|
import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons/faExclamationTriangle';
|
||||||
|
|
||||||
export default class MonkeysStillAliveWarning extends Component {
|
export default class MonkeysStillAliveWarning extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, {Component} from 'react';
|
import React, {Component} from 'react';
|
||||||
import {NavLink} from 'react-router-dom';
|
import {NavLink} from 'react-router-dom';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faExclamationTriangle} from "@fortawesome/free-solid-svg-icons/faExclamationTriangle";
|
import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons/faExclamationTriangle';
|
||||||
|
|
||||||
export default class MustRunMonkeyWarning extends Component {
|
export default class MustRunMonkeyWarning extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { faPrint } from '@fortawesome/free-solid-svg-icons/faPrint';
|
||||||
export default class PrintReportButton extends Component {
|
export default class PrintReportButton extends Component {
|
||||||
render() {
|
render() {
|
||||||
return <div className="text-center no-print">
|
return <div className="text-center no-print">
|
||||||
<Button size="md" variant={"outline-standard"} onClick={this.props.onClick}>
|
<Button size="md" variant={'outline-standard'} onClick={this.props.onClick}>
|
||||||
<FontAwesomeIcon icon={faPrint}/> Print
|
<FontAwesomeIcon icon={faPrint}/> Print
|
||||||
Report</Button>
|
Report</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React from "react";
|
import React from 'react';
|
||||||
|
|
||||||
export let renderArray = function (val) {
|
export let renderArray = function (val) {
|
||||||
return <>{val.map(x => <div key={x}>{x}</div>)}</>;
|
return <>{val.map(x => <div key={x}>{x}</div>)}</>;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table';
|
import ReactTable from 'react-table';
|
||||||
import Pluralize from 'pluralize';
|
import Pluralize from 'pluralize';
|
||||||
import {renderArray, renderIpAddresses} from "../common/RenderArrays";
|
import {renderArray, renderIpAddresses} from '../common/RenderArrays';
|
||||||
|
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table';
|
import ReactTable from 'react-table';
|
||||||
import Pluralize from 'pluralize';
|
import Pluralize from 'pluralize';
|
||||||
import {renderIpAddresses} from "../common/RenderArrays";
|
import {renderIpAddresses} from '../common/RenderArrays';
|
||||||
|
|
||||||
let renderMachine = function (data) {
|
let renderMachine = function (data) {
|
||||||
return <div>{data.label} ( {renderIpAddresses(data)} )</div>
|
return <div>{data.label} ( {renderIpAddresses(data)} )</div>
|
||||||
|
@ -56,7 +56,7 @@ class PostBreachComponent extends React.Component {
|
||||||
});
|
});
|
||||||
let defaultPageSize = pbaMachines.length > pageSize ? pageSize : pbaMachines.length;
|
let defaultPageSize = pbaMachines.length > pageSize ? pageSize : pbaMachines.length;
|
||||||
let showPagination = pbaMachines > pageSize;
|
let showPagination = pbaMachines > pageSize;
|
||||||
const pbaCount = pbaMachines.reduce((accumulated, pbaMachine) => accumulated+pbaMachine["pba_results"].length, 0);
|
const pbaCount = pbaMachines.reduce((accumulated, pbaMachine) => accumulated+pbaMachine['pba_results'].length, 0);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table';
|
import ReactTable from 'react-table';
|
||||||
import Pluralize from 'pluralize';
|
import Pluralize from 'pluralize';
|
||||||
import {renderArray, renderIpAddresses} from "../common/RenderArrays";
|
import {renderArray, renderIpAddresses} from '../common/RenderArrays';
|
||||||
|
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
@ -32,7 +32,7 @@ class ScannedServersComponent extends React.Component {
|
||||||
let showPagination = this.props.data.length > pageSize;
|
let showPagination = this.props.data.length > pageSize;
|
||||||
|
|
||||||
const scannedMachinesCount = this.props.data.length;
|
const scannedMachinesCount = this.props.data.length;
|
||||||
const reducerFromScannedServerToServicesAmount = (accumulated, scannedServer) => accumulated + scannedServer["services"].length;
|
const reducerFromScannedServerToServicesAmount = (accumulated, scannedServer) => accumulated + scannedServer['services'].length;
|
||||||
const scannedServicesAmount = this.props.data.reduce(reducerFromScannedServerToServicesAmount, 0);
|
const scannedServicesAmount = this.props.data.reduce(reducerFromScannedServerToServicesAmount, 0);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table'
|
import ReactTable from 'react-table'
|
||||||
import {renderArray} from "../common/RenderArrays";
|
import {renderArray} from '../common/RenderArrays';
|
||||||
|
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
|
|
@ -18,11 +18,13 @@ const columns = [
|
||||||
{
|
{
|
||||||
Header: 'Events', id: 'events',
|
Header: 'Events', id: 'events',
|
||||||
accessor: x => {
|
accessor: x => {
|
||||||
return <EventsButton finding_id={x.finding_id}
|
const comp = <EventsButton finding_id={x.finding_id}
|
||||||
latest_events={x.latest_events}
|
latest_events={x.latest_events}
|
||||||
oldest_events={x.oldest_events}
|
oldest_events={x.oldest_events}
|
||||||
event_count={x.event_count}
|
event_count={x.event_count}
|
||||||
exportFilename={'Events_' + x.test_key} />;
|
exportFilename={'Events_' + x.test_key} />;
|
||||||
|
comp.displayName = 'EventsButton_' + x.finding_id;
|
||||||
|
return comp;
|
||||||
},
|
},
|
||||||
maxWidth: EVENTS_COLUMN_MAX_WIDTH
|
maxWidth: EVENTS_COLUMN_MAX_WIDTH
|
||||||
},
|
},
|
||||||
|
@ -34,7 +36,9 @@ const columns = [
|
||||||
const pillarLabels = pillars.map((pillar) =>
|
const pillarLabels = pillars.map((pillar) =>
|
||||||
<PillarLabel key={pillar.name} pillar={pillar.name} status={pillar.status}/>
|
<PillarLabel key={pillar.name} pillar={pillar.name} status={pillar.status}/>
|
||||||
);
|
);
|
||||||
return <div style={{textAlign: 'center'}}>{pillarLabels}</div>;
|
const comp = <div style={{textAlign: 'center'}}>{pillarLabels}</div>;
|
||||||
|
comp.displayName = 'PillarsLabels';
|
||||||
|
return comp;
|
||||||
},
|
},
|
||||||
maxWidth: PILLARS_COLUMN_MAX_WIDTH,
|
maxWidth: PILLARS_COLUMN_MAX_WIDTH,
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
|
|
|
@ -13,7 +13,9 @@ const columns = [
|
||||||
{
|
{
|
||||||
Header: 'Status', id: 'status',
|
Header: 'Status', id: 'status',
|
||||||
accessor: x => {
|
accessor: x => {
|
||||||
return <StatusLabel status={x.status} size="3x" showText={false}/>;
|
const comp = <StatusLabel status={x.status} size="3x" showText={false}/>;
|
||||||
|
comp.displayName = 'StatusLabel';
|
||||||
|
return comp;
|
||||||
},
|
},
|
||||||
maxWidth: MAX_WIDTH_STATUS_COLUMN
|
maxWidth: MAX_WIDTH_STATUS_COLUMN
|
||||||
},
|
},
|
||||||
|
@ -25,7 +27,9 @@ const columns = [
|
||||||
Header: 'Monkey Tests', id: 'tests',
|
Header: 'Monkey Tests', id: 'tests',
|
||||||
style: {'whiteSpace': 'unset'}, // This enables word wrap
|
style: {'whiteSpace': 'unset'}, // This enables word wrap
|
||||||
accessor: x => {
|
accessor: x => {
|
||||||
return <TestsStatus tests={x.tests}/>;
|
const comp = <TestsStatus tests={x.tests}/>;
|
||||||
|
comp.displayName = 'TestsStatus';
|
||||||
|
return comp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -14,7 +14,7 @@ class ZeroTrustReportLegend extends Component {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
open: false,
|
open: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default class SinglePillarPrinciplesStatus extends AuthComponent {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
open: false,
|
open: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ class VennDiagram extends React.Component {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Return z indices to default
|
// Return z indices to default
|
||||||
Object.keys(this.layout).forEach(function (d_, i_) {
|
Object.keys(this.layout).forEach(function (_d, i_) {
|
||||||
document.querySelector('#' + self.prefix).appendChild(document.querySelector('#' + self.prefix + 'Node_' + i_).parentNode);
|
document.querySelector('#' + self.prefix).appendChild(document.querySelector('#' + self.prefix + 'Node_' + i_).parentNode);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ class AwsRunTableComponent extends React.Component {
|
||||||
this.setState({selectAll, selection});
|
this.setState({selectAll, selection});
|
||||||
};
|
};
|
||||||
|
|
||||||
getTrProps = (s, r) => {
|
getTrProps = (_, r) => {
|
||||||
let color = 'inherit';
|
let color = 'inherit';
|
||||||
if (r) {
|
if (r) {
|
||||||
let instId = r.original.instance_id;
|
let instId = r.original.instance_id;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Card, Button} from 'react-bootstrap';
|
import {Card, Button} from 'react-bootstrap';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faQuestionCircle} from "@fortawesome/free-solid-svg-icons";
|
import {faQuestionCircle} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
|
|
||||||
function InfoPane(props) {
|
function InfoPane(props) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {Modal} from 'react-bootstrap';
|
import {Modal} from 'react-bootstrap';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {GridLoader} from 'react-spinners';
|
|
||||||
|
|
||||||
|
|
||||||
class MissingBinariesModal extends React.PureComponent {
|
class MissingBinariesModal extends React.PureComponent {
|
||||||
|
|
Loading…
Reference in New Issue