Skip to content

Commit

Permalink
Merge branch '4931-fix-section-deploy-new-agent' into 4926-Fix-agent-…
Browse files Browse the repository at this point in the history
…deployment-instructions-for-HPUX-and-Solaris
  • Loading branch information
chantal-kelm authored Dec 14, 2022
2 parents 36061bb + 188d3b5 commit bd4f21d
Show file tree
Hide file tree
Showing 27 changed files with 226 additions and 33 deletions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/compatibilty_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Compatibility request
about: Suggest supporting a new platform version (Elastic, OpenSearch)
title: 'Compatibility with [Elastic | OpenSearch] (version)'
labels: compatibility
assignees: ''

---

## Description
We need to ensure the UI compatibility with the next version of Elastic vX.X | OpenSearch vX.X.
This update is still being discussed, but we need to be aware of potential issues.

For that, we need to:

- [ ] Review opensearch and opensearch-dashboard latest stable changelog.
- [ ] Identify improvements and potential impact on the UI.
- [ ] Develop a testing environment to verify our components would work under this new build.


## Issues
- _List here the detected issues_
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/new_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ assignees: ''
## Description

Example:
> Wazuh 4.3.8 will be released shortly. Our Wazuh-dashboard and Kibana needs to support this new version. From our side, no changes will be included, so we only need to bump the version.
> Wazuh 4.3.8 will be released shortly. Our Wazuh Dashboard and Kibana apps need to support this new version. From our side, no changes will be included, so we only need to bump the version.

## Tasks

### Pre-release
- [ ] Add support for Wazuh 4.x.x (bump).
- [ ] Generate the required tags.
- [ ] Generate packages.
- [ ] Generate the packages.
- [ ] Test the packages, to verify they install, and the app works as expected.
- [ ] [Optional] Run Regression Testing (#issue)
- [ ] Generate draft releases.
Expand Down
76 changes: 76 additions & 0 deletions .github/ISSUE_TEMPLATE/revision-manual_test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Introduction

## Footprint metrics information
| | |
|--------------------------------------|---|
| **Main release candidate issue** | |
| **Version** | |
| **Release candidate #** | |
| **Tag** | |
| **Previous python unit tests issue** | - |

## Test report procedure
All individual test checks must be marked as:
| | |
|-------|------------------------------------------------------------------------------------------------------|
| Pass | The test ran successfully. |
| Xfail | The test was expected to fail and it failed. It must be properly justified and reported in an issue. |
| Skip | The test was not run. It must be properly justified and reported in an issue. |
| Fail | The test failed. A new issue must be opened to evaluate and address the problem. |


All test results must have one the following statuses:
| | |
|-----------------|----------------------------------------------------------------------|
| :green_circle: | All checks passed. |
| :red_circle: | There is at least one failed check. |
| :yellow_circle: | There is at least one expected fail or skipped test and no failures. |


Any failing test must be properly addressed with a new issue, detailing the error and the possible cause. It must be included in the `Fixes` section of the current release candidate main issue.

Any expected fail or skipped test must have an issue justifying the reason. All auditors must validate the justification for an expected fail or skipped test.

An extended report of the test results must be attached as a zip or txt. This report can be used by the auditors to dig deeper into any possible failures and details.

As for the coverage results, they must be added split by modules. Test files must not be included in the coverage report.

All test coverage results must have one of the following statuses:

## Checks
| Status | Coverage | Modules | Version |
|----------------|----------------|----------------|---------|
| :green_square: | :green_square: | :green_square: | All |

| | |
|-----------------|--------|
| :green_square: | >= 75% |
| :yellow_square: | >= 50% |
| :orange_square: | >= 25% |
| :red_square: | < 25% |


## Conclusions

All tests have been executed and the results can be found here.
<!--
| | | | |
|----------------|-------------|---------------------|----------------|
| **Status** | **Test** | **Failure type** | **Notes** |
| | | | |
-->

All tests have passed and the fails have been reported or justified. I therefore conclude that this issue is finished and OK for this release candidate.


## Auditors validation
The definition of done for this one is the validation of the conclusions and the test results from all auditors.

All checks from below must be accepted in order to close this issue.

- [x]
- [x]
- [x]



4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
with:
reference: ${{ github.event.inputs.reference }}
command: 'yarn build'
archive_name: 'wazuh-package'
archive_path: './wazuh/build'
artifact_name: 'wazuh-package'
artifact_path: './wazuh/build'
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
51 changes: 51 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# ESLint is a tool for identifying and reporting on patterns
# found in ECMAScript/JavaScript code.
# More details at https://github.com/eslint/eslint
# and https://eslint.org

name: ESLint

on:
push:
branches: [ "master", "*.*-*.*", "*.*-*.*-wzd", "[0-9].[0-9]+" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "*.*-*.*", "*.*-*.*-wzd", "[0-9].[0-9]+" ]

jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read

steps:

# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
- name: Checkout code
uses: actions/checkout@v3

# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#node-version-file
- name: Install ESLint
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: yarn

- name: Run ESLint
run: yarn lint >> eslint-results.log
continue-on-error: true

# https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload analysis results to GitHub
uses: actions/upload-artifact@v3
with:
name: eslint-results
path: eslint-results.log
retention-days: 5
1 change: 1 addition & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
- 'master'
- '*.*-*.*'
- '*.*-*.*-wzd'
- '[0-9].[0-9]+'

jobs:
# Run unit tests with Jest
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Added cluster's IP and protocol as suggestions in the agent deployment wizard. [#4776](https://github.com/wazuh/wazuh-kibana-app/pull/4776)
- Show OS name and OS version in the agent installation wizard. [#4851](https://github.com/wazuh/wazuh-kibana-app/pull/4851)
- Changed the endpoint that updates the plugin configuration to support multiple settings. [#4501](https://github.com/wazuh/wazuh-kibana-app/pull/4501)
- The button to export the app logs is now disabled when there are no results, instead of showing an error toast [#4972](https://github.com/wazuh/wazuh-kibana-app/pull/4972)

### Fixed

Expand Down
17 changes: 11 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ In general, the environment consist of:

## Pre-requisites

> IMPORTANT: as this folder is inside a development branch, you will need to have
2 clones of the Wazuh Kibana App repository, one containing this folder with the
new Docker environments and another one containing the plugin source code in the
required branch (4.x-7.16, 4.x-wzd, ...). My recommendation is:
> **IMPORTANT**: you will need 2 copies of the Wazuh Kibana App repository, one
> for the Docker environments, and other one for the plugin source code in the
> required branch (`4.x-7.16`, `4.x-wzd`, ...). Our recommendation is:
>
> - wazuh-kibana-docker (repo set to this branch, feature/3872-environments-docker)
> - wazuh-kibana-app (repo with the source code, set to the desired branch)
> - **wazuh-kibana-docker** : on the master branch.
> - **wazuh-kibana-app** : on any development branch. This one will be used
> as source code and mounted as volume in the
> platform's container.
>
> In future releases, the containers (`4.5`) and higher, we expect that every
> development branch will contain this folder and this duplication won't be
> necessary anymore.
1. Create the `devel` network:

Expand Down
17 changes: 17 additions & 0 deletions docker/images/kbn-7.17.7-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:16.17.1 AS builder-kbn-7.17.7
RUN npm install --global @bazel/[email protected]
USER node
RUN git clone --depth 1 --branch v7.17.7 https://github.com/elastic/kibana /home/node/kbn
RUN chown node.node /home/node/kbn

WORKDIR /home/node/kbn
RUN yarn kbn bootstrap
RUN yarn config set registry http://host.docker.internal:4873 && \
sed -i 's/https:\/\/registry.yarnpkg.com/http:\/\/host.docker.internal:4873/g' yarn.lock
RUN rm -rf /home/node/.cache/yarn && rm -rf /home/node/.cache/Cypress && rm -rf /home/node/.cache/ms-playwright
RUN mkdir -p /home/node/kbn/data/wazuh/config

FROM node:16.17.1
USER node
COPY --from=builder-kbn-7.17.7 /home/node/ /home/node/
WORKDIR /home/node/kbn
2 changes: 1 addition & 1 deletion docker/wazuh-4.3-wz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ UI and then execute:

- For `CentOS/8` images:
```bash
docker run --name wz-rel-agent-4.3.8 --rm --network wz-rel-438 -d centos:8 bash -c '
docker run --name wz-rel-agent-4.3.8 --rm --network wz-rel-438 --label com.docker.compose.project=wz-rel-438 -d centos:8 bash -c '
sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
Expand Down
1 change: 0 additions & 1 deletion public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ app.run(function ($rootElement) {
// Add plugin help links as extension to plugin platform help menu
addHelpMenuToAppChrome();


// Bind deleteExistentToken on Log out component.
$('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on('mouseleave', function () {
// opendistro
Expand Down
2 changes: 1 addition & 1 deletion public/components/agents/fim/inventory/filterBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class FilterBar extends Component {
{
type: 'q',
label: 'uid',
description: 'Id of the onwner file',
description: 'Id of the owner file',
operators: ['=', '!=', '~'],
values: async (value) => getFilterValues('uid', value, this.props.agent.id),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const PromptAgentFeatureVersion = ({ version = '' }: { version: string })
<EuiEmptyPrompt
iconType="watchesApp"
title={<h2>{`Agent doesn't support this feature`}</h2>}
body={`This feature is only avaliable for agents with ${version}.`}
body={`This feature is only available for agents with ${version}.`}
/>
);
};
6 changes: 3 additions & 3 deletions public/components/agents/sca/inventory.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Wazuh app - Iventory component
* Wazuh app - Inventory component
* Copyright (C) 2015-2022 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -578,7 +578,7 @@ export class Inventory extends Component<InventoryProps, InventoryState> {
<EuiFlexItem>
<InventoryPolicyChecksTable
agent={this.props.agent}
lookingPolicy={this.state.lookingPolicy}
lookingPolicy={this.state.lookingPolicy}
/>
</EuiFlexItem>
</EuiFlexGroup>
Expand All @@ -593,4 +593,4 @@ export class Inventory extends Component<InventoryProps, InventoryState> {

Inventory.defaultProps = {
onClickRow: undefined
}
}
4 changes: 2 additions & 2 deletions public/components/common/hocs/withButtonOpenOnClick.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Wazuh app - React HOC to add open modal/flyout logic to othe component
* Wazuh app - React HOC to add open modal/flyout logic to other component
* Copyright (C) 2015-2022 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -32,4 +32,4 @@ export const withButtonOpenOnClick = WrappedComponent => ({render, onClick, onCl
)}
</>
)
}
}
4 changes: 2 additions & 2 deletions public/components/common/hocs/withGlobalBreadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ type TBreadcrumbSection = {text: string, href?: string} | { agent: any };
type TBreadcrumb = TBreadcrumbSection[];
type TBreadcrumbParameter = TBreadcrumb | ((props: any) => TBreadcrumb);

// It retuns user permissions
// It returns user permissions
export const withGlobalBreadcrumb = (breadcrumb : TBreadcrumbParameter) => WrappedComponent => props => {
useGlobalBreadcrumb(typeof breadcrumb === 'function' ? breadcrumb(props) : breadcrumb);
return <WrappedComponent {...props} />
}
}
4 changes: 2 additions & 2 deletions public/components/common/hocs/with_module_tab_loader.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Wazuh app - React HOC to show a loader used for Dashboard adn Events module tabs
* Wazuh app - React HOC to show a loader used for Dashboard and Events module tabs
* Copyright (C) 2015-2022 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -39,4 +39,4 @@ export const withModuleTabLoader = WrappedComponent => props => {
</div>
</>
)
}
}
2 changes: 1 addition & 1 deletion public/components/common/modules/panel/main-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const MainPanel = ({ sidePanelChildren, tab = 'general', moduleConfig = {
}, [viewId]);

/**
* When a filter is toggled applies de selection
* When a filter is toggled applies the selection
*/
const applyFilter = (clearOnly = false) => {
const newFilters = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const ScaScan = compose(
<Fragment>
<EuiEmptyPrompt
iconType="visVega"
title={<h4>You dont have SCA scans in this agent.</h4>}
title={<h4>You don't have SCA scans in this agent.</h4>}
body={
<Fragment>
<p>
Expand Down
2 changes: 1 addition & 1 deletion public/components/health-check/components/check-result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function CheckResult(props) {
};

/**
* validate if the current check is not started and if the dependentes checks are ready
* validate if the current check is not started and if the depending checks are ready
*/
const awaitForIsReady = () => {
return !isCheckStarted && (props.awaitFor.length === 0 || props.awaitFor.every((check) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Wazuh app - React component that shows the searching resutls of Mitre Att&ck resources
* Wazuh app - React component that shows the searching results of Mitre Att&ck resources
*
* Copyright (C) 2015-2022 Wazuh, Inc.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Wazuh app - Mitre Att&ck resouces.
* Wazuh app - Mitre Att&ck resources.
*
* Copyright (C) 2015-2022 Wazuh, Inc.
*
Expand Down
Loading

0 comments on commit bd4f21d

Please sign in to comment.