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

[Automatic Import] Adding base cel generation as experimental feature #195309

Merged
merged 23 commits into from
Oct 11, 2024

Conversation

kgeller
Copy link
Contributor

@kgeller kgeller commented Oct 7, 2024

Summary

This PR adds base level support for CEL input configuration generation for Automatic Import.

How this works

For this phase of the CEL generation, we will produce three things:

  1. A simple CEL program. This will contain logic for querying an endpoint and mapping its response to events for processing based on an OpenAPI spec file. It does not contain more complex functionality for things like authentication.
  2. An initial state. This will be based on the program and contain defaults based on the openapi spec file.
  3. A list of state variables that need redaction from the logs.

These three pieces will be available for user review, and then plumbed directly into the manifest file as default values for their corresponding settings where the user can modify as needed.

Note: It is not yet expected that the generated output will be fully functional without any tweaking or add-on's from the user for things like authentication.

(Temporary) UI Flow

If a user selects CEL during the datastream step, after completion of the review, the user will then be able to upload and review the new CEL steps.

The generated results shown to the user, and are then plumbed as defaults to the input settings, where a user is able to modify during configuration of the integration.

(Note: this flow will be changed with forthcoming UX designs)

Feature flag

This feature will be behind an experimental feature flag for now, as the design is still a work in progress. To enable this feature, add xpack.integration_assistant.enableExperimental: ['generateCel'] to kibana.yml

Maintainer's notes

  • UI tests were intentionally omitted for now, as the UI implemented is only temporary until we have a UX design.
  • Some OpenAPI specs are too large to be uploaded at this time. I am working on adding support for that and have added another item to the meta issue as such

Relates: #193074


Screenshots

After selecting CEL during datastream configuration and reviewing those results, the user will be brought to a new screen to upload an open api spec
upload

The user can upload the spec file (as long as it isn't over the file upload limit)
spec uploaded

The user waits while the LLM runs
Screenshot 2024-10-09 at 1 37 59 PM

The user can view results
review

The results are automatically pasted into the config, where the user may further edit and configure the input
Screenshot 2024-10-08 at 11 17 46 AM

Sample results

source: MISP

program:

(
  request("POST", state.url + "/events/restSearch?" + {
    "page": [string(state.page)],
    "limit": [string(state.limit)],
    "sort": ["date"],
    "direction": ["asc"]
  }.format_query()).with({
    "Header": {
      "Content-Type": ["application/json"]
    }
  }).do_request().as(resp,
    resp.StatusCode == 200 ?
      bytes(resp.Body).decode_json().as(body, {
        "events": body.map(e, {
          "message": e.encode_json()
        }),
        "want_more": body.size() == state.limit,
        "page": state.page + 1,
        "limit": state.limit
      })
    :
      {
        "events": [{
          "error": {
            "code": string(resp.StatusCode),
            "id": string(resp.Status),
            "message": string(resp.Body)
          }
        }],
        "want_more": false
      }
  )
)

intiial state:

page : 1
limit : 50

redact vars:

[ ]

@kgeller kgeller added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:Security-Scalability Team label for Security Integrations Scalability Team Feature:AutomaticImport labels Oct 7, 2024
@kgeller kgeller self-assigned this Oct 7, 2024
@kgeller kgeller marked this pull request as ready for review October 8, 2024 18:26
@kgeller kgeller requested a review from a team as a code owner October 8, 2024 18:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-scalability (Team:Security-Scalability)

@kgeller kgeller requested a review from semd October 8, 2024 18:26
Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

The overall code and architecture look great. I only added a couple of comments.
LGTM!

Copy link
Contributor

@bhapas bhapas left a comment

Choose a reason for hiding this comment

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

Overall Great Work @kgeller. Haven't tested this locally yet , will do that but it looks great.

Minor comments and nits overall.

Copy link
Contributor

@bhapas bhapas left a comment

Choose a reason for hiding this comment

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

Tested locally and it looks great.. LGTM.

@bhapas bhapas added the enhancement New value added to drive a business result label Oct 11, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
integrationAssistant 565 578 +13

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
integrationAssistant 49 55 +6

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
integrationAssistant 949.3KB 959.8KB +10.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
integrationAssistant 9.5KB 10.3KB +861.0B
Unknown metric groups

API count

id before after diff
integrationAssistant 59 66 +7

History

cc @kgeller

@kgeller kgeller merged commit 7f24e38 into elastic:main Oct 11, 2024
27 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11297752057

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 11, 2024
…elastic#195309)

## Summary

This PR adds base level support for CEL input configuration generation
for Automatic Import.

## How this works

For this phase of the CEL generation, we will produce three things:

1. A simple CEL program. This will contain logic for querying an
endpoint and mapping its response to events for processing based on an
OpenAPI spec file. It does **not** contain more complex functionality
for things like authentication.
2. An initial state. This will be based on the program and contain
defaults based on the openapi spec file.
3. A list of state variables that need redaction from the logs.

These three pieces will be available for user review, and then plumbed
directly into the manifest file as default values for their
corresponding settings where the user can modify as needed.

Note: It is not yet expected that the generated output will be fully
functional without any tweaking or add-on's from the user for things
like authentication.

## (Temporary) UI Flow

If a user selects CEL during the datastream step, after completion of
the review, the user will then be able to upload and review the new CEL
steps.

The generated results shown to the user, and are then plumbed as
defaults to the input settings, where a user is able to modify during
configuration of the integration.

(Note: this flow will be changed with forthcoming UX designs)

## Feature flag

This feature will be behind an experimental feature flag for now, as the
design is still a work in progress. To enable this feature, add
`xpack.integration_assistant.enableExperimental: ['generateCel']` to
kibana.yml

## Maintainer's notes

- UI tests were intentionally omitted for now, as the UI implemented is
only temporary until we have a UX design.
- Some OpenAPI specs are too large to be uploaded at this time. I am
working on adding support for that and have added another item to the
[meta issue](elastic#193074) as such

Relates: elastic#193074
___

<details>
  <summary>Screenshots</summary>

After selecting CEL during datastream configuration and reviewing those
results, the user will be brought to a new screen to upload an open api
spec
<img width="650" alt="upload"
src="https://github.com/user-attachments/assets/efdace4a-cc26-4f33-8b67-35c08df5f640">

The user can upload the spec file (as long as it isn't over the file
upload limit)
<img width="650" alt="spec uploaded"
src="https://github.com/user-attachments/assets/9fd1b868-f8da-4d3c-b975-522bf66e05a5">

The user waits while the LLM runs
<img width="650" alt="Screenshot 2024-10-09 at 1 37 59 PM"
src="https://github.com/user-attachments/assets/3eca6b97-4525-4496-89b0-3002a97fa27d">

The user can view results
<img width="650" alt="review"
src="https://github.com/user-attachments/assets/ee44fb16-fd3a-48c4-975f-706e6d381339">

The results are automatically pasted into the config, where the user may
further edit and configure the input
<img width="635" alt="Screenshot 2024-10-08 at 11 17 46 AM"
src="https://github.com/user-attachments/assets/45151e13-0fd9-4f9a-bbfe-68e6f9b0e671">

</details>

<details>
  <summary>Sample results </summary>

source:
[MISP](https://raw.githubusercontent.com/MISP/MISP/develop/app/webroot/doc/openapi.yaml)

program:
```
(
  request("POST", state.url + "/events/restSearch?" + {
    "page": [string(state.page)],
    "limit": [string(state.limit)],
    "sort": ["date"],
    "direction": ["asc"]
  }.format_query()).with({
    "Header": {
      "Content-Type": ["application/json"]
    }
  }).do_request().as(resp,
    resp.StatusCode == 200 ?
      bytes(resp.Body).decode_json().as(body, {
        "events": body.map(e, {
          "message": e.encode_json()
        }),
        "want_more": body.size() == state.limit,
        "page": state.page + 1,
        "limit": state.limit
      })
    :
      {
        "events": [{
          "error": {
            "code": string(resp.StatusCode),
            "id": string(resp.Status),
            "message": string(resp.Body)
          }
        }],
        "want_more": false
      }
  )
)
```

intiial state:
```
page : 1
limit : 50
```

redact vars:
```
[ ]
```

</details>

(cherry picked from commit 7f24e38)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 11, 2024
…eature (#195309) (#195977)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Automatic Import] Adding base cel generation as experimental feature
(#195309)](#195309)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kylie
Meli","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-11T18:50:21Z","message":"[Automatic
Import] Adding base cel generation as experimental feature
(#195309)\n\n## Summary\r\n\r\nThis PR adds base level support for CEL
input configuration generation\r\nfor Automatic Import.\r\n\r\n## How
this works\r\n\r\nFor this phase of the CEL generation, we will produce
three things:\r\n\r\n1. A simple CEL program. This will contain logic
for querying an\r\nendpoint and mapping its response to events for
processing based on an\r\nOpenAPI spec file. It does **not** contain
more complex functionality\r\nfor things like authentication.\r\n2. An
initial state. This will be based on the program and contain\r\ndefaults
based on the openapi spec file.\r\n3. A list of state variables that
need redaction from the logs. \r\n\r\nThese three pieces will be
available for user review, and then plumbed\r\ndirectly into the
manifest file as default values for their\r\ncorresponding settings
where the user can modify as needed.\r\n\r\nNote: It is not yet expected
that the generated output will be fully\r\nfunctional without any
tweaking or add-on's from the user for things\r\nlike
authentication.\r\n\r\n## (Temporary) UI Flow\r\n\r\nIf a user selects
CEL during the datastream step, after completion of\r\nthe review, the
user will then be able to upload and review the new
CEL\r\nsteps.\r\n\r\nThe generated results shown to the user, and are
then plumbed as\r\ndefaults to the input settings, where a user is able
to modify during\r\nconfiguration of the integration.\r\n\r\n(Note: this
flow will be changed with forthcoming UX designs)\r\n\r\n## Feature
flag\r\n\r\nThis feature will be behind an experimental feature flag for
now, as the\r\ndesign is still a work in progress. To enable this
feature, add\r\n`xpack.integration_assistant.enableExperimental:
['generateCel']` to\r\nkibana.yml\r\n\r\n## Maintainer's notes\r\n\r\n-
UI tests were intentionally omitted for now, as the UI implemented
is\r\nonly temporary until we have a UX design.\r\n- Some OpenAPI specs
are too large to be uploaded at this time. I am\r\nworking on adding
support for that and have added another item to the\r\n[meta
issue](#193074) as
such\r\n\r\nRelates:
https://github.com/elastic/kibana/issues/193074\r\n___
\r\n\r\n<details>\r\n <summary>Screenshots</summary>\r\n \r\nAfter
selecting CEL during datastream configuration and reviewing
those\r\nresults, the user will be brought to a new screen to upload an
open api\r\nspec\r\n<img width=\"650\"
alt=\"upload\"\r\nsrc=\"https://github.com/user-attachments/assets/efdace4a-cc26-4f33-8b67-35c08df5f640\">\r\n\r\nThe
user can upload the spec file (as long as it isn't over the
file\r\nupload limit)\r\n<img width=\"650\" alt=\"spec
uploaded\"\r\nsrc=\"https://github.com/user-attachments/assets/9fd1b868-f8da-4d3c-b975-522bf66e05a5\">\r\n\r\nThe
user waits while the LLM runs\r\n<img width=\"650\" alt=\"Screenshot
2024-10-09 at 1 37
59 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/3eca6b97-4525-4496-89b0-3002a97fa27d\">\r\n\r\nThe
user can view results \r\n<img width=\"650\"
alt=\"review\"\r\nsrc=\"https://github.com/user-attachments/assets/ee44fb16-fd3a-48c4-975f-706e6d381339\">\r\n\r\nThe
results are automatically pasted into the config, where the user
may\r\nfurther edit and configure the input\r\n<img width=\"635\"
alt=\"Screenshot 2024-10-08 at 11 17
46 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/45151e13-0fd9-4f9a-bbfe-68e6f9b0e671\">\r\n\r\n</details>\r\n\r\n<details>\r\n
<summary>Sample results
</summary>\r\n\r\nsource:\r\n[MISP](https://raw.githubusercontent.com/MISP/MISP/develop/app/webroot/doc/openapi.yaml)\r\n
\r\nprogram:\r\n```\r\n(\r\n request(\"POST\", state.url +
\"/events/restSearch?\" + {\r\n \"page\": [string(state.page)],\r\n
\"limit\": [string(state.limit)],\r\n \"sort\": [\"date\"],\r\n
\"direction\": [\"asc\"]\r\n }.format_query()).with({\r\n \"Header\":
{\r\n \"Content-Type\": [\"application/json\"]\r\n }\r\n
}).do_request().as(resp,\r\n resp.StatusCode == 200 ?\r\n
bytes(resp.Body).decode_json().as(body, {\r\n \"events\": body.map(e,
{\r\n \"message\": e.encode_json()\r\n }),\r\n \"want_more\":
body.size() == state.limit,\r\n \"page\": state.page + 1,\r\n \"limit\":
state.limit\r\n })\r\n :\r\n {\r\n \"events\": [{\r\n \"error\": {\r\n
\"code\": string(resp.StatusCode),\r\n \"id\": string(resp.Status),\r\n
\"message\": string(resp.Body)\r\n }\r\n }],\r\n \"want_more\":
false\r\n }\r\n )\r\n)\r\n```\r\n\r\nintiial state:\r\n```\r\npage :
1\r\nlimit : 50\r\n```\r\n\r\nredact vars:\r\n```\r\n[
]\r\n```\r\n\r\n</details>","sha":"7f24e388829933be17f1ed7b690dc0562a354cd8","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["enhancement","release_note:skip","v9.0.0","backport:prev-minor","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Adding base cel generation as experimental
feature","number":195309,"url":"https://github.com/elastic/kibana/pull/195309","mergeCommit":{"message":"[Automatic
Import] Adding base cel generation as experimental feature
(#195309)\n\n## Summary\r\n\r\nThis PR adds base level support for CEL
input configuration generation\r\nfor Automatic Import.\r\n\r\n## How
this works\r\n\r\nFor this phase of the CEL generation, we will produce
three things:\r\n\r\n1. A simple CEL program. This will contain logic
for querying an\r\nendpoint and mapping its response to events for
processing based on an\r\nOpenAPI spec file. It does **not** contain
more complex functionality\r\nfor things like authentication.\r\n2. An
initial state. This will be based on the program and contain\r\ndefaults
based on the openapi spec file.\r\n3. A list of state variables that
need redaction from the logs. \r\n\r\nThese three pieces will be
available for user review, and then plumbed\r\ndirectly into the
manifest file as default values for their\r\ncorresponding settings
where the user can modify as needed.\r\n\r\nNote: It is not yet expected
that the generated output will be fully\r\nfunctional without any
tweaking or add-on's from the user for things\r\nlike
authentication.\r\n\r\n## (Temporary) UI Flow\r\n\r\nIf a user selects
CEL during the datastream step, after completion of\r\nthe review, the
user will then be able to upload and review the new
CEL\r\nsteps.\r\n\r\nThe generated results shown to the user, and are
then plumbed as\r\ndefaults to the input settings, where a user is able
to modify during\r\nconfiguration of the integration.\r\n\r\n(Note: this
flow will be changed with forthcoming UX designs)\r\n\r\n## Feature
flag\r\n\r\nThis feature will be behind an experimental feature flag for
now, as the\r\ndesign is still a work in progress. To enable this
feature, add\r\n`xpack.integration_assistant.enableExperimental:
['generateCel']` to\r\nkibana.yml\r\n\r\n## Maintainer's notes\r\n\r\n-
UI tests were intentionally omitted for now, as the UI implemented
is\r\nonly temporary until we have a UX design.\r\n- Some OpenAPI specs
are too large to be uploaded at this time. I am\r\nworking on adding
support for that and have added another item to the\r\n[meta
issue](#193074) as
such\r\n\r\nRelates:
https://github.com/elastic/kibana/issues/193074\r\n___
\r\n\r\n<details>\r\n <summary>Screenshots</summary>\r\n \r\nAfter
selecting CEL during datastream configuration and reviewing
those\r\nresults, the user will be brought to a new screen to upload an
open api\r\nspec\r\n<img width=\"650\"
alt=\"upload\"\r\nsrc=\"https://github.com/user-attachments/assets/efdace4a-cc26-4f33-8b67-35c08df5f640\">\r\n\r\nThe
user can upload the spec file (as long as it isn't over the
file\r\nupload limit)\r\n<img width=\"650\" alt=\"spec
uploaded\"\r\nsrc=\"https://github.com/user-attachments/assets/9fd1b868-f8da-4d3c-b975-522bf66e05a5\">\r\n\r\nThe
user waits while the LLM runs\r\n<img width=\"650\" alt=\"Screenshot
2024-10-09 at 1 37
59 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/3eca6b97-4525-4496-89b0-3002a97fa27d\">\r\n\r\nThe
user can view results \r\n<img width=\"650\"
alt=\"review\"\r\nsrc=\"https://github.com/user-attachments/assets/ee44fb16-fd3a-48c4-975f-706e6d381339\">\r\n\r\nThe
results are automatically pasted into the config, where the user
may\r\nfurther edit and configure the input\r\n<img width=\"635\"
alt=\"Screenshot 2024-10-08 at 11 17
46 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/45151e13-0fd9-4f9a-bbfe-68e6f9b0e671\">\r\n\r\n</details>\r\n\r\n<details>\r\n
<summary>Sample results
</summary>\r\n\r\nsource:\r\n[MISP](https://raw.githubusercontent.com/MISP/MISP/develop/app/webroot/doc/openapi.yaml)\r\n
\r\nprogram:\r\n```\r\n(\r\n request(\"POST\", state.url +
\"/events/restSearch?\" + {\r\n \"page\": [string(state.page)],\r\n
\"limit\": [string(state.limit)],\r\n \"sort\": [\"date\"],\r\n
\"direction\": [\"asc\"]\r\n }.format_query()).with({\r\n \"Header\":
{\r\n \"Content-Type\": [\"application/json\"]\r\n }\r\n
}).do_request().as(resp,\r\n resp.StatusCode == 200 ?\r\n
bytes(resp.Body).decode_json().as(body, {\r\n \"events\": body.map(e,
{\r\n \"message\": e.encode_json()\r\n }),\r\n \"want_more\":
body.size() == state.limit,\r\n \"page\": state.page + 1,\r\n \"limit\":
state.limit\r\n })\r\n :\r\n {\r\n \"events\": [{\r\n \"error\": {\r\n
\"code\": string(resp.StatusCode),\r\n \"id\": string(resp.Status),\r\n
\"message\": string(resp.Body)\r\n }\r\n }],\r\n \"want_more\":
false\r\n }\r\n )\r\n)\r\n```\r\n\r\nintiial state:\r\n```\r\npage :
1\r\nlimit : 50\r\n```\r\n\r\nredact vars:\r\n```\r\n[
]\r\n```\r\n\r\n</details>","sha":"7f24e388829933be17f1ed7b690dc0562a354cd8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195309","number":195309,"mergeCommit":{"message":"[Automatic
Import] Adding base cel generation as experimental feature
(#195309)\n\n## Summary\r\n\r\nThis PR adds base level support for CEL
input configuration generation\r\nfor Automatic Import.\r\n\r\n## How
this works\r\n\r\nFor this phase of the CEL generation, we will produce
three things:\r\n\r\n1. A simple CEL program. This will contain logic
for querying an\r\nendpoint and mapping its response to events for
processing based on an\r\nOpenAPI spec file. It does **not** contain
more complex functionality\r\nfor things like authentication.\r\n2. An
initial state. This will be based on the program and contain\r\ndefaults
based on the openapi spec file.\r\n3. A list of state variables that
need redaction from the logs. \r\n\r\nThese three pieces will be
available for user review, and then plumbed\r\ndirectly into the
manifest file as default values for their\r\ncorresponding settings
where the user can modify as needed.\r\n\r\nNote: It is not yet expected
that the generated output will be fully\r\nfunctional without any
tweaking or add-on's from the user for things\r\nlike
authentication.\r\n\r\n## (Temporary) UI Flow\r\n\r\nIf a user selects
CEL during the datastream step, after completion of\r\nthe review, the
user will then be able to upload and review the new
CEL\r\nsteps.\r\n\r\nThe generated results shown to the user, and are
then plumbed as\r\ndefaults to the input settings, where a user is able
to modify during\r\nconfiguration of the integration.\r\n\r\n(Note: this
flow will be changed with forthcoming UX designs)\r\n\r\n## Feature
flag\r\n\r\nThis feature will be behind an experimental feature flag for
now, as the\r\ndesign is still a work in progress. To enable this
feature, add\r\n`xpack.integration_assistant.enableExperimental:
['generateCel']` to\r\nkibana.yml\r\n\r\n## Maintainer's notes\r\n\r\n-
UI tests were intentionally omitted for now, as the UI implemented
is\r\nonly temporary until we have a UX design.\r\n- Some OpenAPI specs
are too large to be uploaded at this time. I am\r\nworking on adding
support for that and have added another item to the\r\n[meta
issue](#193074) as
such\r\n\r\nRelates:
https://github.com/elastic/kibana/issues/193074\r\n___
\r\n\r\n<details>\r\n <summary>Screenshots</summary>\r\n \r\nAfter
selecting CEL during datastream configuration and reviewing
those\r\nresults, the user will be brought to a new screen to upload an
open api\r\nspec\r\n<img width=\"650\"
alt=\"upload\"\r\nsrc=\"https://github.com/user-attachments/assets/efdace4a-cc26-4f33-8b67-35c08df5f640\">\r\n\r\nThe
user can upload the spec file (as long as it isn't over the
file\r\nupload limit)\r\n<img width=\"650\" alt=\"spec
uploaded\"\r\nsrc=\"https://github.com/user-attachments/assets/9fd1b868-f8da-4d3c-b975-522bf66e05a5\">\r\n\r\nThe
user waits while the LLM runs\r\n<img width=\"650\" alt=\"Screenshot
2024-10-09 at 1 37
59 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/3eca6b97-4525-4496-89b0-3002a97fa27d\">\r\n\r\nThe
user can view results \r\n<img width=\"650\"
alt=\"review\"\r\nsrc=\"https://github.com/user-attachments/assets/ee44fb16-fd3a-48c4-975f-706e6d381339\">\r\n\r\nThe
results are automatically pasted into the config, where the user
may\r\nfurther edit and configure the input\r\n<img width=\"635\"
alt=\"Screenshot 2024-10-08 at 11 17
46 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/45151e13-0fd9-4f9a-bbfe-68e6f9b0e671\">\r\n\r\n</details>\r\n\r\n<details>\r\n
<summary>Sample results
</summary>\r\n\r\nsource:\r\n[MISP](https://raw.githubusercontent.com/MISP/MISP/develop/app/webroot/doc/openapi.yaml)\r\n
\r\nprogram:\r\n```\r\n(\r\n request(\"POST\", state.url +
\"/events/restSearch?\" + {\r\n \"page\": [string(state.page)],\r\n
\"limit\": [string(state.limit)],\r\n \"sort\": [\"date\"],\r\n
\"direction\": [\"asc\"]\r\n }.format_query()).with({\r\n \"Header\":
{\r\n \"Content-Type\": [\"application/json\"]\r\n }\r\n
}).do_request().as(resp,\r\n resp.StatusCode == 200 ?\r\n
bytes(resp.Body).decode_json().as(body, {\r\n \"events\": body.map(e,
{\r\n \"message\": e.encode_json()\r\n }),\r\n \"want_more\":
body.size() == state.limit,\r\n \"page\": state.page + 1,\r\n \"limit\":
state.limit\r\n })\r\n :\r\n {\r\n \"events\": [{\r\n \"error\": {\r\n
\"code\": string(resp.StatusCode),\r\n \"id\": string(resp.Status),\r\n
\"message\": string(resp.Body)\r\n }\r\n }],\r\n \"want_more\":
false\r\n }\r\n )\r\n)\r\n```\r\n\r\nintiial state:\r\n```\r\npage :
1\r\nlimit : 50\r\n```\r\n\r\nredact vars:\r\n```\r\n[
]\r\n```\r\n\r\n</details>","sha":"7f24e388829933be17f1ed7b690dc0562a354cd8"}}]}]
BACKPORT-->

Co-authored-by: Kylie Meli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) enhancement New value added to drive a business result Feature:AutomaticImport release_note:skip Skip the PR/issue when compiling release notes Team:Security-Scalability Team label for Security Integrations Scalability Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants