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

[ BUG ] [ DOC ] NGSIEM API Usage is incorrect #1291

Open
2 of 3 tasks
JCKelley-CYBR opened this issue Mar 10, 2025 · 1 comment
Open
2 of 3 tasks

[ BUG ] [ DOC ] NGSIEM API Usage is incorrect #1291

JCKelley-CYBR opened this issue Mar 10, 2025 · 1 comment
Assignees
Labels
bug 🐛 Something isn't working documentation 📖 Improvements or additions to documentation enhancement 🌟 New feature or request ngsiem NGSIEM issues and questions

Comments

@JCKelley-CYBR
Copy link

JCKelley-CYBR commented Mar 10, 2025

Documentation page topic
https://www.falconpy.io/Service-Collections/NGSIEM.html?highlight=StartSearch#startsearchv1

Describe the error or typo
Two issues with this page, the first is the doc indicates the only necessary parameter to interact with StartSearchV1 is repository. Which based on the implementation and test cases appears to be incorrect as it is required in the source code:

Link:

        else:
            returned = generate_error_result("You must provide a repository and search "
                                             "argument in order to use this operation."
                                             )

Test case:

"StartSearchV1": falcon.start_search(repository="search-all", search=test_search),

    def run_all_tests(self):
        test_search = {
            "showQueryEventDistribution" : True,
            "isLive" : False,
            "start" : "1d",
            "queryString" : "#event_simpleName=*"
            }
...
            "StartSearchV1": falcon.start_search(repository="search-all", search=test_search),

The second issue is with GetSearchStatusV1, its a similar issue, the documentation appears to indicate the required parameter for polling the API for results is id, however, it appears the proper parameter is search_id.

Documentation Link: https://www.falconpy.io/Service-Collections/NGSIEM.html?highlight=StartSearch#getsearchstatusv1

Link:

def get_search_status(self: object,

        Keyword arguments:
        repository -- Name of repository. String.
        search_id -- ID of query. String.

Test case: https://github.com/CrowdStrike/falconpy/blob/2bc405e6610d822d991cc2253b00b8ba85c11b40/tests/test_ngsiem.py#L59C13-L59C105

            "GetSearchStatusV1": falcon.get_search_status(repository="search-all", search_id=search_id),

Documentation repository:

  • GitHub Wiki
  • falconpy.io
  • Source code - docstring

Additional context
Add any other context about the problem here.

Final issue, it appears APIHarnessV2 doesn't work at all even when provided the proper parameters. However, I would need more time digging in the source code to figure out why.

@JCKelley-CYBR JCKelley-CYBR added the documentation 📖 Improvements or additions to documentation label Mar 10, 2025
@jshcodes jshcodes self-assigned this Mar 10, 2025
@jshcodes jshcodes added ngsiem NGSIEM issues and questions bug 🐛 Something isn't working enhancement 🌟 New feature or request labels Mar 10, 2025
@jshcodes
Copy link
Member

jshcodes commented Mar 10, 2025

Hi @JCKelley-CYBR -

This issue identifies a few problems:

  • Payload handling was not properly implemented for StartSearchV1.
  • The id keyword argument was incorrectly handled for GetSearchResultsV1.
  • Documentation was incorrect, and will need to be updated to reflect changes implemented to address the first two issues.

Fixes have been developed to address the payload and argument handling issues and will be included as part of the 1.4.8 version release.

  • This new version will still support the search keyword when using the StartSearchV1 operation, and will now also accept the body keyword as well as individual keyword arguments for developers wanting to use full abstraction.
  • The GetSearchResultsV1 operation will allow the use of either search_id or id to specify the search results to retrieve.

This ticket will be closed once the new version has released and documentation has been updated to reflect the changes.

Thank you for reporting these issues! 🙇

@jshcodes jshcodes changed the title [ DOC ] NGSIEM API Usage is incorrect [ BUG ] [ DOC ] NGSIEM API Usage is incorrect Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working documentation 📖 Improvements or additions to documentation enhancement 🌟 New feature or request ngsiem NGSIEM issues and questions
Projects
None yet
Development

No branches or pull requests

2 participants