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.9.2 into 4.10.0 #7138

Merged
merged 4 commits into from
Nov 5, 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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ All notable changes to the Wazuh app project will be documented in this file.
- 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

### Added
Expand Down
5 changes: 5 additions & 0 deletions scripts/release/bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const { updatePluginManifest } = require('./lib/update-manifest-plugin');
const { updateChangelog } = require('./lib/update-changelog');
const path = require('path');
const fs = require('fs');
const {
updateImposterSpecificationReference,
} = require('./lib/update-imposter');

const cli = require('../lib/cli/cli')(
cliName,
Expand Down Expand Up @@ -341,6 +344,8 @@ function run(configuration) {
},
logger,
);

updateImposterSpecificationReference(configuration, logger);
}

function main() {
Expand Down
43 changes: 43 additions & 0 deletions scripts/release/lib/update-imposter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function updateImposterSpecificationReference(configuration, logger) {
try {
logger.debug('Editing imposter specification reference');
const fs = require('fs');
const path = require('path');
const specificationFile = path.join(
__dirname,
'../../..',
'docker/imposter/wazuh-config.yml',
);

logger.debug(`Reading ${specificationFile} file`);
const content = fs.readFileSync(specificationFile, 'utf8');

const { version } = configuration;

if (!version) {
throw new Error('Version is not specified.');
}

// specFile: https://raw.githubusercontent.com/wazuh/wazuh/<BRANCH_VERSION>/api/api/spec/spec.yaml
const updatedContent = content.replace(
/specFile:\s+\S+/m,
`specFile: https://raw.githubusercontent.com/wazuh/wazuh/${version}/api/api/spec/spec.yaml`,
);

if (content !== updatedContent) {
logger.debug(
`Updating [${specificationFile}] imposter specification file with latest changes`,
);
fs.writeFileSync(specificationFile, updatedContent, 'utf8');
logger.info(`${specificationFile} file has been updated`);
} else {
logger.debug(`Nothing to change in ${specificationFile} file`);
}
} catch (error) {
logger.error(`Error editing the specification file: ${error.message}`);
process.exit(1);
}
}

module.exports.updateImposterSpecificationReference =
updateImposterSpecificationReference;
Loading