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

Merge 4.10.0 into 4.10.1 #7140

Merged
merged 20 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
966f5f1
Bump 4.10.0 rev 03 (#7110)
Desvelao Oct 18, 2024
576a403
Substitute warning icon in events view (#7057)
JuanGarriuz Oct 21, 2024
5fb561b
Fix scroll in vulnerabilities inventory table (#7118)
asteriscos Oct 23, 2024
9157e9a
Fix ability to filter form FIM details (#7119)
Desvelao Oct 24, 2024
e74b7ed
Remove processes state column in macOS agents (#7122)
guidomodarelli Oct 24, 2024
5d9046f
Fix agents chart loading state (#7120)
asteriscos Oct 24, 2024
1fa58e7
Create agents management menu and move sections (#7112)
chantal-kelm Oct 25, 2024
b87b026
Bump 4.9.2 rev 00 (#7126)
Desvelao Oct 25, 2024
632f493
Fix vulnerability inventory table scroll (#7128)
asteriscos Oct 25, 2024
9ea8940
Fixed border on cells in events disappear (#7075)
JuanGarriuz Oct 28, 2024
713f4a6
Bump 4.9.2 rev01 (#7134)
Desvelao Oct 28, 2024
1287cdf
Redesign inventory, stats and configuration page to use tabs (#7089)
guidomodarelli Oct 29, 2024
8fd557d
Add filter by value to document details fields (#7081)
guidomodarelli Oct 29, 2024
bd44194
Agent view Mitre ATT&CK exception (#7116)
chantal-kelm Oct 29, 2024
11cb294
Add vulnerability detection card in agent overview (#7085)
Machi3mfl Oct 29, 2024
85a0ea1
merge: merge 4.9.2 into 4.10.0
Desvelao Nov 5, 2024
26bae3d
Merge 4.9.2 into 4.10.0 (#7138)
Desvelao Nov 5, 2024
17f798c
Remove duplicated entry was included in a previous version (#7139)
Desvelao Nov 5, 2024
2e0c67d
merge: merge 4.10.0 into 4.10.1
Desvelao Nov 5, 2024
31c7244
chore: update imposter specification reference
Desvelao Nov 5, 2024
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
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ All notable changes to the Wazuh app project will be documented in this file.

- Support for Wazuh 4.10.1

## Wazuh v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 02
## Wazuh v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 03

### Added

- Support for Wazuh 4.10.0
- Added sample data for YARA [#6964](https://github.com/wazuh/wazuh-dashboard-plugins/issues/6964)
- Added a custom filter and visualization for vulnerability.under_evaluation field [#6968](https://github.com/wazuh/wazuh-dashboard-plugins/issues/6968) [#7044](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7044) [#7046](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7046)
- Add vulnerabilities card to agent details page [#7058](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7058)
- Added an "Agents management" menu and moved the sections: "Endpoint Groups" and "Endpoint Summary" which changed its name to "Summary".[#7112](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7112)
- Added ability to filter from File Integrity Monitoring registry inventory [#7119](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7119)
- Added new field columns and ability to select the visible fields in the File Integrity Monitoring Files and Registry tables [#7119](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7119)
- Added filter by value to document details fields [#7081](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7081)

### Changed

Expand All @@ -25,24 +30,42 @@ All notable changes to the Wazuh app project will be documented in this file.
- Changed the agents summary in overview with no results to an agent deployment help message. [#7041](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7041)
- Changed malware feature description [#7036](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7036)
- Changed the font size of the kpi subtitles and the features descriptions [#7033](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7033)
- Changed the warning icon in events view to a info icon [#7057](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7057)
- Changed feature container margins to ensure consistent separation and uniform design. [#7034](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7034)
- Changed the initial width to the default columns on each selected field [#7059](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7059)
- Changed inventory, stats and configuration page to use tabs [#7089](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7089)

### Fixed

- Fixed the filter are displayed cropped on screens of 575px to 767px in vulnerability detection module [#7047](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7047)
- Fixed read-only users could not access to Statistics application [#7001](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7001)
- Fixed no-agent-alert spawn with selected agent in agent-welcome view [#7029](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7029)
- Fixed loading state of the agents status chart in the home overview [#7120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7120)
- Fixed security policy exception when it contained deprecated actions [#7042](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7042)
- Fixed border on cells in events that disappear when clicked [#7075](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7075)
- Fixed export formatted csv data with special characters from tables [#7048](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7048)
- Fixed column reordering feature [#7072](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7072)
- Fixed filter management to prevent hiding when adding multiple filters [#7077](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7077)
- Fixed the Mitre ATT&CK exception in the agent view, the redirections of ID, Tactics, Dashboard Icon and Event Icon in the drop-down menu and the card not displaying information when the flyout was opened [#7116](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7116)
- Fixed the filter are displayed cropped on screens of 575px to 767px in vulnerability detection module [#7047](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7047)
- Fixed ability to filter from files inventory details flyout of File Integrity Monitoring [#7119](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7119)

### Removed

- Removed agent RBAC filters from dashboard queries [#6945](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6945)
- Removed GET /elastic/statistics API endpoint [#7001](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7001)
- Removed VirusTotal application in favor of Malware Detection [#7038](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7038)
- Removed processes state column in macOS agents [#7122](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7122)

## Wazuh v4.9.2 - OpenSearch Dashboards 2.13.0 - Revision 01

### Added

- Support for Wazuh 4.9.2

### Fixed

- Fixed vulnerabilities inventory table scroll [#7128](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7128)

## Wazuh v4.9.1 - OpenSearch Dashboards 2.13.0 - Revision 04

Expand Down
2 changes: 1 addition & 1 deletion docker/imposter/wazuh-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
plugin: openapi
specFile: https://raw.githubusercontent.com/wazuh/wazuh/master/api/api/spec/spec.yaml
specFile: https://raw.githubusercontent.com/wazuh/wazuh/4.10.1/api/api/spec/spec.yaml
system:
stores:
# this store is preloaded from file
Expand Down
5 changes: 5 additions & 0 deletions plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,8 @@ export const OSD_URL_STATE_STORAGE_ID = 'state:storeInSessionStorage';

export const APP_STATE_URL_KEY = '_a';
export const GLOBAL_STATE_URL_KEY = '_g';

export enum FilterStateStore {
APP_STATE = 'appState',
GLOBAL_STATE = 'globalState',
}
31 changes: 22 additions & 9 deletions plugins/main/common/services/wz_agent_status.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import { UI_COLOR_AGENT_STATUS, UI_LABEL_NAME_AGENT_STATUS, API_NAME_AGENT_STATUS } from '../constants';
import {
UI_COLOR_AGENT_STATUS,
UI_LABEL_NAME_AGENT_STATUS,
API_NAME_AGENT_STATUS,
} from '../constants';

type TAgentStatus = typeof API_NAME_AGENT_STATUS[keyof typeof API_NAME_AGENT_STATUS];
export type TAgentStatus =
(typeof API_NAME_AGENT_STATUS)[keyof typeof API_NAME_AGENT_STATUS];

type TAgentStatusColor = typeof UI_COLOR_AGENT_STATUS[keyof typeof UI_COLOR_AGENT_STATUS];
type TAgentStatusLabel = typeof UI_LABEL_NAME_AGENT_STATUS[keyof typeof UI_LABEL_NAME_AGENT_STATUS];
type TAgentStatusColor =
(typeof UI_COLOR_AGENT_STATUS)[keyof typeof UI_COLOR_AGENT_STATUS];
type TAgentStatusLabel =
(typeof UI_LABEL_NAME_AGENT_STATUS)[keyof typeof UI_LABEL_NAME_AGENT_STATUS];

export function agentStatusColorByAgentStatus(status: TAgentStatus): TAgentStatusColor{
return UI_COLOR_AGENT_STATUS[status] || UI_COLOR_AGENT_STATUS.default;
export function agentStatusColorByAgentStatus(
status: TAgentStatus,
): TAgentStatusColor {
return UI_COLOR_AGENT_STATUS[status] || UI_COLOR_AGENT_STATUS.default;
}

export function agentStatusLabelByAgentStatus(status: TAgentStatus): TAgentStatusLabel{
return UI_LABEL_NAME_AGENT_STATUS[status] || UI_LABEL_NAME_AGENT_STATUS.default;
}
export function agentStatusLabelByAgentStatus(
status: TAgentStatus,
): TAgentStatusLabel {
return (
UI_LABEL_NAME_AGENT_STATUS[status] || UI_LABEL_NAME_AGENT_STATUS.default
);
}
29 changes: 19 additions & 10 deletions plugins/main/public/app-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Settings } from './components/settings';
import { WzSecurity } from './components/security';
import $ from 'jquery';
import NavigationService from './react-services/navigation-service';
import { SECTIONS } from './sections';

export function Application(props) {
const dispatch = useDispatch();
Expand Down Expand Up @@ -66,33 +67,41 @@ export function Application(props) {
<WzAgentSelectorWrapper />
<WzUpdatesNotification />
<Switch>
<Route path={'/health-check'} exact render={HealthCheck}></Route>
<Route
path={'/agents-preview/deploy'}
path={`/${SECTIONS.HEALTH_CHECK}`}
exact
render={HealthCheck}
></Route>
<Route
path={`/${SECTIONS.AGENTS_PREVIEW}/deploy`}
exact
render={RegisterAgent}
></Route>
<Route path={'/agents'} exact render={AgentView}></Route>
<Route path={`/${SECTIONS.AGENTS}`} exact render={AgentView}></Route>
<Route
path={'/agents-preview/'}
path={`/${SECTIONS.AGENTS_PREVIEW}/`}
exact
render={MainEndpointsSummary}
></Route>
<Route path={'/manager'} exact render={WzManagement}></Route>
<Route
path={'/overview'}
path={`/${SECTIONS.MANAGER}`}
exact
render={WzManagement}
></Route>
<Route
path={`/${SECTIONS.OVERVIEW}`}
exact
render={props => <Overview {...props} />}
></Route>
<Route path={'/settings'} exact render={Settings}></Route>
<Route path={'/security'} exact render={WzSecurity}></Route>
<Route path={`/${SECTIONS.SETTINGS}`} exact render={Settings}></Route>
<Route path={`/${SECTIONS.SECURITY}`} exact render={WzSecurity}></Route>
<Route
path={'/wazuh-dev'}
path={`/${SECTIONS.WAZUH_DEV}`}
exact
render={props => <ToolsRouter {...props} />}
></Route>
<Route
path={'/blank-screen'}
path={`/${SECTIONS.BLANK_SCREEN}`}
exact
render={props => <WzBlankScreen {...props} />}
></Route>
Expand Down
18 changes: 16 additions & 2 deletions plugins/main/public/components/agents/agent-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@ import React from 'react';
import {
agentStatusColorByAgentStatus,
agentStatusLabelByAgentStatus,
TAgentStatus,
} from '../../../common/services/wz_agent_status';
import { ColumnWithStatusIcon } from './column-with-status-icon';
import { EuiIconTip } from '@elastic/eui';
import { AGENT_STATUS_CODE } from '../../../common/constants';
import '../../styles/common.scss';
import { Agent } from '../endpoints-summary/types';

export const AgentStatus = ({ status, children = null, style = {}, agent }) => {
interface AgentStatusProps {
status: TAgentStatus;
children?: string | null;
style?: React.CSSProperties;
agent?: Agent;
}

export const AgentStatus = ({
status,
children,
style = {},
agent,
}: AgentStatusProps) => {
const statusCodeAgent = AGENT_STATUS_CODE.find(
(status: StatusCodeAgent) => status.STATUS_CODE === agent?.status_code,
status => status.STATUS_CODE === agent?.status_code,
);
return (
<div
Expand Down
55 changes: 6 additions & 49 deletions plugins/main/public/components/agents/fim/inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { InventoryTable, RegistryTable } from './inventory/';
import { WzRequest } from '../../../react-services/wz-request';
import { getToasts } from '../../../kibana-services';
import { ICustomBadges } from '../../wz-search-bar/components';
import { filtersToObject } from '../../wz-search-bar';
import { UI_LOGGER_LEVELS } from '../../../../common/constants';
import {
UI_ERROR_SEVERITIES,
Expand All @@ -42,7 +41,6 @@ import { webDocumentationLink } from '../../../../common/services/web_documentat
export class Inventory extends Component {
_isMount = false;
state: {
filters: [];
selectedTabId: 'files' | 'registry';
totalItemsFile: number;
totalItemsRegistry: number;
Expand All @@ -57,7 +55,6 @@ export class Inventory extends Component {
constructor(props) {
super(props);
this.state = {
filters: [],
syscheck: [],
selectedTabId: 'files',
totalItemsFile: 0,
Expand All @@ -66,7 +63,6 @@ export class Inventory extends Component {
customBadges: [],
isConfigured: false,
};
this.onFiltersChange.bind(this);
}

async componentDidMount() {
Expand Down Expand Up @@ -135,56 +131,20 @@ export class Inventory extends Component {
return auxTabs;
}

getStoreFilters(props) {
const { section, selectView, agent } = props;
const filters = JSON.parse(
window.localStorage.getItem(
`wazuh-${section}-${selectView}-${
this.state?.selectedTabId || 'files'
}-${agent['id']}`,
) || '{}',
);
return filters;
}

setStoreFilters(filters) {
const { section, selectView, agent } = this.props;
window.localStorage.setItem(
`wazuh-${section}-${selectView}-${this.state?.selectedTabId || 'files'}-${
agent['id']
}`,
JSON.stringify(filters),
);
}

onFiltersChange = filters => {
this.setState({ filters });
};

onTotalItemsChange = (totalItems: number) => {
this.setState({ totalItemsFile: totalItems });
};

onSelectedTabChanged = id => {
this.setState({ selectedTabId: id });
};

buildFilter(type) {
const filters = filtersToObject(this.state.filters);
const filter = {
...filters,
limit: type === 'file' ? '15' : '1',
...(type === 'registry' ? { q: 'type=registry_key' } : { type }),
...(type === 'file' && { sort: '+file' }),
};
return filter;
}

async getItemNumber(type: 'file' | 'registry') {
try {
const agentID = this.props.agent.id;
const response = await WzRequest.apiReq('GET', `/syscheck/${agentID}`, {
params: this.buildFilter(type),
params: {
limit: 1, // reduce the size because only need the total items. 0 gives error
...(type === 'registry'
? { q: 'type=registry_key' }
: { q: 'type=file' }),
},
});
if (type === 'file') {
return {
Expand Down Expand Up @@ -257,16 +217,13 @@ export class Inventory extends Component {
filters={filters}
items={syscheck}
totalItems={totalItemsFile}
onFiltersChange={this.onFiltersChange}
onTotalItemsChange={this.onTotalItemsChange}
/>
)}
{selectedTabId === 'registry' && (
<RegistryTable
{...this.props}
filters={filters}
totalItems={totalItemsRegistry}
onFiltersChange={this.onFiltersChange}
/>
)}
</>
Expand Down
19 changes: 11 additions & 8 deletions plugins/main/public/components/agents/fim/inventory/fileDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { RedirectAppLinks } from '../../../../../../../src/plugins/opensearch_da
import TechniqueRowDetails from '../../../overview/mitre/framework/components/techniques/components/flyout-technique/technique-row-details';
import { DATA_SOURCE_FILTER_CONTROLLED_CLUSTER_MANAGER } from '../../../../../common/constants';
import NavigationService from '../../../../react-services/navigation-service';
import { setFilters } from '../../../common/search-bar/set-filters';

export class FileDetails extends Component {
props!: {
Expand Down Expand Up @@ -198,13 +199,15 @@ export class FileDetails extends Component {
name: 'Last analysis',
grow: 2,
icon: 'clock',
link: true,
transformValue: formatUIDate,
},
{
field: 'mtime',
name: 'Last modified',
grow: 2,
icon: 'clock',
link: true,
transformValue: formatUIDate,
},
];
Expand Down Expand Up @@ -290,21 +293,19 @@ export class FileDetails extends Component {
}

addFilter(field, value) {
const { filters, onFiltersChange } = this.props;
const newBadge: ICustomBadges = { field: 'q', value: '' };
const { onFiltersChange } = this.props;
let filterUQL = '';
if (field === 'date' || field === 'mtime') {
const value_max = moment(value).add(1, 'day');
newBadge.value = `${field}>${moment(value).format(
filterUQL = `${field}>${moment(value).format(
'YYYY-MM-DD',
)} AND ${field}<${value_max.format('YYYY-MM-DD')}`;
)};${field}<${value_max.format('YYYY-MM-DD')}`;
} else {
newBadge.value = `${field}=${
filterUQL = `${field}=${
field === 'size' ? this.props.currentFile[field] : value
}`;
}
!filters.some(
item => item.field === newBadge.field && item.value === newBadge.value,
) && onFiltersChange([...filters, newBadge]);
onFiltersChange({ q: filterUQL });
this.props.closeFlyout();
}

Expand Down Expand Up @@ -586,6 +587,8 @@ export class FileDetails extends Component {

this.discoverFilterManager.addFilters(newFilter);
}}
filters={[]}
setFilters={setFilters(this.discoverFilterManager)}
/>
);
}
Expand Down
Loading
Loading