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

github: add support for additional audit log fields #7976

Merged
merged 7 commits into from
Sep 29, 2023

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Sep 26, 2023

What does this PR do?

Add under github:

  • actor_ip
  • hashed_token
  • integration
  • programmatic_access_type
  • repositories_added_names
  • repositories_removed_names
  • repository_selection
  • user_agent

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.

Author's Checklist

  • @imays11 The API docs don't explain the fields, so if you have text you would like to include please provide it.

How to test this PR locally

Related issues

Screenshots

@elasticmachine
Copy link

elasticmachine commented Sep 26, 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-09-28T21:04:47.549+0000

  • Duration: 18 min 51 sec

Test stats 🧪

Test Results
Failed 0
Passed 34
Skipped 0
Total 34

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

* actor_ip
* hashed_token
* integration
* programmatic_access_type
* repositories_added_names
* repositories_removed_names
* repository_selection
* user_agent
@elasticmachine
Copy link

elasticmachine commented Sep 26, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (5/5) 💚
Files 100.0% (5/5) 💚
Classes 100.0% (5/5) 💚
Methods 100.0% (66/66) 💚
Lines 94.123% (1041/1106)
Conditionals 100.0% (0/0) 💚

@efd6 efd6 marked this pull request as ready for review September 26, 2023 02:56
@efd6 efd6 requested a review from a team as a code owner September 26, 2023 02:56
@elasticmachine
Copy link

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

ignore_missing: true
- rename:
field: json.user_agent
target_field: github.user_agent
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be interesting to convert this field into an ECS field using the user_agent processor?

@@ -122,6 +122,44 @@ processors:
field: json.actor_location.country_code
target_field: client.geo.country_iso_code
ignore_missing: true
- convert:
field: json.actor_ip
target_field: github.actor_ip
Copy link
Contributor

Choose a reason for hiding this comment

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

We could populate related_ip with this field.

Copy link
Contributor

@chemamartinez chemamartinez left a comment

Choose a reason for hiding this comment

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

LGTM!

@efd6 efd6 merged commit 9bcf386 into elastic:main Sep 29, 2023
1 check passed
@elasticmachine
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:github GitHub
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GitHub] Field Mapping Additions To Audit Logs Ingest
4 participants