Glossary

Public functions

validate_filters

validate_filters(
    filters: dict,
    securityhub_session_client: BaseClient | None = None,
) -> bool

Validate AWS Security Hub filters to get findings.

Parameters:

  • filters
    (dict) –

    The filters to validate

  • securityhub_session_client
    (BaseClient, default: None ) –

    A boto session BaseClient for AWS Security Hub Tries to create one if not provided

Returns:

  • bool

    True if the filters are valid, False otherwise

validate_updates

validate_updates(
    updates: dict,
    securityhub_session_client: BaseClient | None = None,
) -> bool

Validate AWS Security Hub updates to findings.

Parameters:

  • updates
    (dict) –

    The updates to make to a (set of) findings

  • securityhub_session_client
    (BaseClient, default: None ) –

    A boto session BaseClient for AWS Security Hub Tries to create one if not provided

Returns:

  • bool

    True if the updates are valid, False otherwise

Public classes

Rule dataclass

Rule(
    Filters: dict,
    UpdatesToFilteredFindings: dict,
    is_deep_validated: bool = True,
)

Dataclass representing a Security Hub management rule.

Methods:

  • __post_init__

    Perform deep validation after initialization if required.

  • apply

    Apply the rule in AWS Security Hub.

  • validate_deep

    Validate the rule beyond the top-level arguments.

__post_init__
__post_init__() -> None

Perform deep validation after initialization if required.

apply
apply(securityhub_client: BaseClient | None = None) -> None

Apply the rule in AWS Security Hub.

Parameters:

  • securityhub_client
    (BaseClient, default: None ) –

    A boto BaseClient for AWS Security Hub Tries to create one if not provided

validate_deep
validate_deep() -> bool

Validate the rule beyond the top-level arguments.

Also set is_deep_validated to whether the deep rule is valid.

Returns:

  • bool

    True if the rule is valid beyond the top-level arguments, False otherwise