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

[Event Collector] - GitGuaridan #32039

Merged
merged 39 commits into from
Mar 4, 2024
Merged

[Event Collector] - GitGuaridan #32039

merged 39 commits into from
Mar 4, 2024

Conversation

MLainer1
Copy link
Contributor

@MLainer1 MLainer1 commented Jan 8, 2024

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: link to the issue

Description

Creating a new event collector for GitGuardian

Must have

  • Tests
  • Documentation

@demisto demisto deleted a comment from github-actions bot Jan 8, 2024
@demisto demisto deleted a comment from github-actions bot Jan 8, 2024
Copy link

github-actions bot commented Jan 8, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/GitGuardian/Integrations/GitGuardianEventCollector
   GitGuardianEventCollector.py1271786%81–82, 105–107, 141–142, 166–167, 272–273, 278, 280–282, 284, 286
TOTAL1271786% 

Tests Skipped Failures Errors Time
9 0 💤 0 ❌ 0 🔥 1.446s ⏱️

@MLainer1 MLainer1 marked this pull request as ready for review January 10, 2024 14:23
@MLainer1 MLainer1 requested a review from dantavori January 10, 2024 14:25
Copy link
Contributor

@dantavori dantavori left a comment

Choose a reason for hiding this comment

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

looks great!
I will approve after we have an answer about the 2nd endpoint, and the demo

@MLainer1 MLainer1 requested a review from dantavori February 20, 2024 13:50
Copy link
Contributor

@dantavori dantavori left a comment

Choose a reason for hiding this comment

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

looks good, see notes

For this HelloWorld implementation, no special attributes defined
"""

def search_events(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd merge this function with fetch_events()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer to keep them as separate functions

params=params,
retries=3,
)
new_events = self.remove_duplicated_events(response.get("results"), prev_run_fetched_event_ids)
Copy link
Contributor

Choose a reason for hiding this comment

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

why would we run this on the same prev_run_fetched_event_ids over multiple pages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The API returns results consequently in the incident ID, and not in the last_occurence_date field, which means that if event 1 happened after event number 2, they will still get returned as [event 1, event 2]

@MLainer1 MLainer1 requested a review from dantavori March 3, 2024 15:16
@MLainer1 MLainer1 requested a review from ShirleyDenkberg March 4, 2024 06:20
@ShirleyDenkberg
Copy link
Contributor

@MLainer1 Need content for the pack readme.
@dantavori Doc review completed.

@MLainer1 MLainer1 merged commit 1774e27 into master Mar 4, 2024
17 checks passed
@MLainer1 MLainer1 deleted the GitGuardian_Event_collector branch March 4, 2024 20:56
pal-xmco pushed a commit to pal-xmco/content that referenced this pull request Jun 19, 2024
* [Collector] - GitGuaridan

* formast and docs

* pack ignore

* adding increment time to audit logs

* added tests

* DI

* format

* description

* Adding modeling rules

* Modified the modeling rule

* Modified modeling rule

* added support for incident type event

* fix tests

* added tests

* pre-commit

* Added url field to schema

* readme

* fetch redesign

* precommit

* line too long

* changes

* additionalinfo

* cr

* Apply suggestions from code review

Co-authored-by: ShirleyDenkberg <[email protected]>

* flake8

* updated next run

* autopep8

* changes

---------

Co-authored-by: Yehonatan Asta <[email protected]>
Co-authored-by: yasta5 <[email protected]>
Co-authored-by: ShirleyDenkberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants