Skip to content

Add specs for alert and finding endpoints of security_analytics plugin #907

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

Merged

Conversation

AntoineSauzeau
Copy link
Contributor

Description

This PR add specs for the 3 following endpoints :

  • /_plugins/_security_analytics/alerts ["GET"]
  • /_plugins/_security_analytics/findings/_search ["GET"]
  • /_plugins/_security_analytics/findings/correlate ["GET"]

I intend to add all the other security analytics endpoints but I'd rather start with a small piece since this is the first time that I'm contributing to this repo.

Since there's no endpoint to directly create findings and alerts, I'm supposed to do it by hand with some POST <index>/_create/<_id> to test properly these endpoints then ?

Issues Resolved

Related to #239.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dblock
Copy link
Member

dblock commented May 31, 2025

Please add tests?

@AntoineSauzeau AntoineSauzeau force-pushed the add_security_analytics_specs branch from 308ea8e to 1cf4919 Compare June 4, 2025 21:51
@AntoineSauzeau
Copy link
Contributor Author

Oups sorry.
Good, I've added a test for each endpoint.

Copy link
Contributor

github-actions bot commented Jun 6, 2025

Changes Analysis

Commit SHA: 3b9ab09
Comparing To SHA: 578a78d

API Changes

Summary

├─┬Paths
│ ├──[➕] path (7363:3)
│ ├──[➕] path (7422:3)
│ └──[➕] path (7392:3)
└─┬Components
  ├──[➕] responses (35119:7)
  ├──[➕] responses (35125:7)
  ├──[➕] responses (35131:7)
  ├──[➕] parameters (27433:7)
  ├──[➕] parameters (27354:7)
  ├──[➕] parameters (27288:7)
  ├──[➕] parameters (27410:7)
  ├──[➕] parameters (27223:7)
  ├──[➕] parameters (27242:7)
  ├──[➕] parameters (27236:7)
  ├──[➕] parameters (27417:7)
  ├──[➕] parameters (27333:7)
  ├──[➕] parameters (27305:7)
  ├──[➕] parameters (27377:7)
  ├──[➕] parameters (27347:7)
  ├──[➕] parameters (27296:7)
  ├──[➕] parameters (27327:7)
  ├──[➕] parameters (27257:7)
  ├──[➕] parameters (27340:7)
  ├──[➕] parameters (27402:7)
  ├──[➕] parameters (27230:7)
  ├──[➕] parameters (27321:7)
  ├──[➕] parameters (27271:7)
  ├──[➕] parameters (27368:7)
  ├──[➕] parameters (27385:7)
  ├──[➕] parameters (27264:7)
  ├──[➕] parameters (27313:7)
  ├──[➕] parameters (27424:7)
  ├──[➕] parameters (27250:7)
  ├──[➕] parameters (27361:7)
  ├──[➕] parameters (27280:7)
  ├──[➕] parameters (27393:7)
  ├──[➕] schemas (66122:7)
  ├──[➕] schemas (66077:7)
  ├──[➕] schemas (66214:7)
  ├──[➕] schemas (66117:7)
  ├──[➕] schemas (66106:7)
  ├──[➕] schemas (66084:7)
  ├──[➕] schemas (66161:7)
  ├──[➕] schemas (66014:7)
  ├──[➕] schemas (66186:7)
  ├──[➕] schemas (66024:7)
  ├──[➕] schemas (66175:7)
  ├──[➕] schemas (66088:7)
  ├──[➕] schemas (66098:7)
  ├──[➕] schemas (66133:7)
  ├──[➕] schemas (66207:7)
  └──[➕] schemas (66157:7)

Document Element Total Changes Breaking Changes
paths 3 0
components 48 0
  • Total Changes: 51
  • Additions: 51

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/15686071192/artifacts/3349535783

API Coverage

Before After Δ
Covered (%) 663 (64.94 %) 666 (65.23 %) 3 (0.29 %)
Uncovered (%) 358 (35.06 %) 355 (34.77 %) -3 (-0.29 %)
Unknown 91 91 0

@AntoineSauzeau
Copy link
Contributor Author

Thank you for the review.

Copy link
Collaborator

@Xtansia Xtansia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes @AntoineSauzeau, still just a few things to address.

Please also rebase your branch onto the latest main commit.

@AntoineSauzeau AntoineSauzeau force-pushed the add_security_analytics_specs branch 2 times, most recently from 2fde2eb to 04c4c9f Compare June 9, 2025 23:28
@AntoineSauzeau
Copy link
Contributor Author

Done.
I've added a few parameters that I'd overlooked and that aren't documented in documention-website by the way.

Copy link
Contributor

Spec Test Coverage Analysis

Total Tested
623 621 (99.68 %)

@AntoineSauzeau AntoineSauzeau force-pushed the add_security_analytics_specs branch from 04c4c9f to 3b9ab09 Compare June 16, 2025 16:11
@AntoineSauzeau
Copy link
Contributor Author

Do you see any changes needed before considering merging ? @Xtansia

@Xtansia Xtansia merged commit a8ea65d into opensearch-project:main Jun 17, 2025
31 of 32 checks passed
@AntoineSauzeau AntoineSauzeau deleted the add_security_analytics_specs branch June 18, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants