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

Add Vulnerabilities Detection and Office 365 links to agent menu on Endpoints Summary #6983

Merged
merged 6 commits into from
Sep 11, 2024
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed an error on the command to deploy a new macOS agent that could cause the registration password had a wrong value because a `\n` could be included [#6906](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6906)
- Fixed rendering an active response as disabled when is active [#6901](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6901)
- Fixed an error on Dev Tools when using payload properties as arrays [#6908](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6908)
- Fixed missing link to Vulnerabilities detection and Office 365 in the agent menu of `Endpoints Summary` [#6983](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6983)
- Fixed missing options depending on agent operating system in the agent configuration report [#6983](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6983)

### Changed

Expand Down
9 changes: 2 additions & 7 deletions plugins/main/public/components/agents/export-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ import {
} from '@elastic/eui';

import PropTypes from 'prop-types';
import { UnsupportedComponents } from '../../utils/components-os-support';
import { WAZUH_AGENTS_OS_TYPE } from '../../../common/constants';
import { withErrorBoundary } from '../common/hocs';
import { hasAgentSupportModule } from '../../react-services';

export const ExportConfiguration = withErrorBoundary(
class ExportConfiguration extends Component {
Expand Down Expand Up @@ -57,11 +56,7 @@ export const ExportConfiguration = withErrorBoundary(
list.forEach((x, idx) => {
if (
typeof x === 'string' ||
(x.name &&
!(
UnsupportedComponents[this.props.agentPlatform] ||
UnsupportedComponents[WAZUH_AGENTS_OS_TYPE.OTHERS]
).includes(x.name))
(x.name && hasAgentSupportModule(this.props.agent, x.name))
) {
this.options.push({ id: `${idx}`, label: x.desc || x });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import { hasAgentSupportModule } from '../../../../../react-services/wz-agents';
import { WAZUH_MODULES_ID } from '../../../../../../common/constants';
import { docker as dockerApp } from '../../../../../utils/applications';

export default [
{
Expand Down Expand Up @@ -158,7 +159,7 @@ export default [
description:
'Monitor and collect the activity from Docker containers such as creation, running, starting, stopping or pausing events',
goto: 'docker-listener',
when: agent => hasAgentSupportModule(agent, WAZUH_MODULES_ID.DOCKER),
when: agent => hasAgentSupportModule(agent, dockerApp.id),
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions plugins/main/public/utils/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const vulnerabilityDetection = {
euiIconType: 'heartbeatApp',
order: 301,
showInOverviewApp: true,
showInAgentMenu: false,
showInAgentMenu: true,
redirectTo: () =>
`/overview/?tab=vuls&tabView=dashboard${
store.getState()?.appStateReducers?.currentAgentData?.id
Expand Down Expand Up @@ -475,7 +475,7 @@ export const office365 = {
euiIconType: LogoOffice365,
order: 503,
showInOverviewApp: true,
showInAgentMenu: false,
showInAgentMenu: true,
redirectTo: () =>
`/overview/?tab=office&tabView=dashboard${
store.getState()?.appStateReducers?.currentAgentData?.id
Expand Down
26 changes: 22 additions & 4 deletions plugins/main/public/utils/components-os-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,29 @@
* Find more information about this on the LICENSE file.
*/
import { WAZUH_AGENTS_OS_TYPE, WAZUH_MODULES_ID } from '../../common/constants';
import { vulnerabilityDetection, docker, office365 } from './applications';

export const UnsupportedComponents = {
[WAZUH_AGENTS_OS_TYPE.LINUX]: [],
[WAZUH_AGENTS_OS_TYPE.WINDOWS]: [WAZUH_MODULES_ID.AUDITING, WAZUH_MODULES_ID.DOCKER, WAZUH_MODULES_ID.OPEN_SCAP],
[WAZUH_AGENTS_OS_TYPE.DARWIN]: [WAZUH_MODULES_ID.AUDITING, WAZUH_MODULES_ID.DOCKER, WAZUH_MODULES_ID.OPEN_SCAP],
[WAZUH_AGENTS_OS_TYPE.SUNOS]: [WAZUH_MODULES_ID.VULNERABILITIES],
[WAZUH_AGENTS_OS_TYPE.OTHERS]: [WAZUH_MODULES_ID.AUDITING, WAZUH_MODULES_ID.DOCKER, WAZUH_MODULES_ID.OPEN_SCAP, WAZUH_MODULES_ID.VULNERABILITIES]
[WAZUH_AGENTS_OS_TYPE.WINDOWS]: [
WAZUH_MODULES_ID.AUDITING,
docker.id,
WAZUH_MODULES_ID.OPEN_SCAP,
],
[WAZUH_AGENTS_OS_TYPE.DARWIN]: [
WAZUH_MODULES_ID.AUDITING,
docker.id,
WAZUH_MODULES_ID.OPEN_SCAP,
],
[WAZUH_AGENTS_OS_TYPE.SUNOS]: [vulnerabilityDetection.id, office365.id],
[WAZUH_AGENTS_OS_TYPE.OTHERS]: [
WAZUH_MODULES_ID.AUDITING,
docker.id,
WAZUH_MODULES_ID.OPEN_SCAP,
vulnerabilityDetection.id,
office365.id,
],
};

// Office 365 is only compatible with Linux, macOS and Windows
// https://documentation.wazuh.com/4.9/user-manual/reference/ossec-conf/office365-module.html#office365
Loading