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

Helper reorg #1380

Merged
merged 20 commits into from
Oct 17, 2024
Merged

Helper reorg #1380

merged 20 commits into from
Oct 17, 2024

Conversation

arielkr256
Copy link
Contributor

Background

panther_base_helpers is overloaded and contains helpers that are specific to various log sources. This is a large reorg of helper functions to make things more consistent.

Changes

  • helpers moved from panther_base_helpers to their appropriate panther_<logtype>_helpers module
  • panther_base_helpers is no longer dependent on panther_config
  • removed deprecated helper functions
  • consolidated panther_config_defaults
  • cleaned up packs to both add missing helpers and remove unneeded ones

Testing

  • make fmt; make lint; make test
  • pat check-packs

@arielkr256 arielkr256 requested a review from a team as a code owner October 8, 2024 22:30
@@ -6,7 +6,7 @@
import unittest

sys.path.append(os.path.dirname(__file__))
import panther_default as p_d # pylint: disable=C0413
import panther_aws_helpers as p_d # pylint: disable=C0413
Copy link
Member

Choose a reason for hiding this comment

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

Also the disable=C0413 smells. Probably it's because it has to be bellow the sys.path.append, but we can fix that by moving the sys.path.append in an __init__.py file under the global_helpers directory.

@@ -19,14 +19,16 @@

import panther_asana_helpers as p_a_h # pylint: disable=C0413
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, the disable=C0413 is all over the place. I can address it after you merge this PR 😄

@@ -19,14 +19,16 @@

import panther_asana_helpers as p_a_h # pylint: disable=C0413
import panther_auth0_helpers as p_auth0_h # pylint: disable=C0413
import panther_aws_helpers as p_aws_h # pylint: disable=C0413
import panther_azuresignin_helpers as p_asi_h # pylint: disable=C0413
Copy link
Member

Choose a reason for hiding this comment

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

Maybe p_azuresignin_h instead?

import panther_cloudflare_helpers as p_cf_h # pylint: disable=C0413
import panther_crowdstrike_fdr_helpers as p_cf_fdr_h # pylint: disable=C0413
Copy link
Member

Choose a reason for hiding this comment

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

Maybe p_crowdstrike_fdr_h instead?

import panther_cloudflare_helpers as p_cf_h # pylint: disable=C0413
import panther_crowdstrike_fdr_helpers as p_cf_fdr_h # pylint: disable=C0413
import panther_greynoise_helpers as p_greynoise_h # pylint: disable=C0413
import panther_ipinfo_helpers as p_i_h # pylint: disable=C0413
Copy link
Member

Choose a reason for hiding this comment

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

p_ipinfo_h?

import panther_cloudflare_helpers as p_cf_h # pylint: disable=C0413
import panther_crowdstrike_fdr_helpers as p_cf_fdr_h # pylint: disable=C0413
import panther_greynoise_helpers as p_greynoise_h # pylint: disable=C0413
import panther_ipinfo_helpers as p_i_h # pylint: disable=C0413
import panther_lookuptable_helpers as p_l_h # pylint: disable=C0413
Copy link
Member

Choose a reason for hiding this comment

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

p_lut_h?

import panther_greynoise_helpers as p_greynoise_h # pylint: disable=C0413
import panther_ipinfo_helpers as p_i_h # pylint: disable=C0413
import panther_lookuptable_helpers as p_l_h # pylint: disable=C0413
import panther_notion_helpers as p_notion_h # pylint: disable=C0413
import panther_oss_helpers as p_o_h # pylint: disable=C0413
import panther_snyk_helpers as p_snyk_h # pylint: disable=C0413
import panther_tailscale_helpers as p_tscale_h # pylint: disable=C0413
Copy link
Member

Choose a reason for hiding this comment

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

p_tailscale_h?

@arielkr256 arielkr256 added dependencies Pull requests that update a dependency file tuning detection tuning labels Oct 15, 2024
Copy link

😱
looks like some things could be wrong with the packs

@arielkr256 arielkr256 enabled auto-merge (squash) October 17, 2024 15:22
Copy link

😱
looks like some things could be wrong with the packs

@le4ker le4ker self-requested a review October 17, 2024 15:25
@arielkr256 arielkr256 merged commit 35c748a into develop Oct 17, 2024
9 checks passed
@arielkr256 arielkr256 deleted the helper-reorg branch October 17, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file tuning detection tuning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants