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

[gcp] Add logic to handle scalar request.policy values on audit #5231

Merged
merged 3 commits into from
Feb 23, 2023

Conversation

marc-gr
Copy link
Contributor

@marc-gr marc-gr commented Feb 10, 2023

What does this PR do?

Adds logic to move request.policy into request.policy_value when it is not an object and avoid indexing errors.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link

elasticmachine commented Feb 10, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-02-23T13:16:43.979+0000

  • Duration: 19 min 43 sec

Test stats 🧪

Test Results
Failed 0
Passed 53
Skipped 0
Total 53

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Feb 10, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (6/6) 💚
Files 100.0% (6/6) 💚
Classes 100.0% (6/6) 💚
Methods 90.291% (93/103) 👎 -9.709
Lines 96.0% (1464/1525) 👍 3.4
Conditionals 100.0% (0/0) 💚

Copy link
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

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

LGTM, my only suggestion would be adding a pipeline test if we had a sample log to exercise this behavior.

@bhapas
Copy link
Contributor

bhapas commented Feb 13, 2023

LGTM , Agree to the comment from Taylor to add a pipeline test if possible.

@marc-gr marc-gr merged commit 68735ea into elastic:main Feb 23, 2023
@marc-gr marc-gr deleted the fix/gcp-request-policy branch February 23, 2023 13:42
@elasticmachine
Copy link

Package gcp - 2.16.2 containing this change is available at https://epr.elastic.co/search?package=gcp

agithomas pushed a commit to agithomas/integrations that referenced this pull request Mar 20, 2023
…tic#5231)

* Add logic to handle scalar request.policy values on audit

* Add PR number to changelog

* Add test
agithomas pushed a commit to agithomas/integrations that referenced this pull request Mar 21, 2023
…tic#5231)

* Add logic to handle scalar request.policy values on audit

* Add PR number to changelog

* Add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Integration:GCP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants