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

chore(typo): Renames tags policies to tag policies #3832

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions prowler/compliance/aws/ens_rd2022_aws.json
Expand Up @@ -672,7 +672,7 @@
}
],
"Checks": [
"organizations_tags_policies_enabled_and_attached"
"organizations_tag_policies_enabled_and_attached"
]
},
{
Expand Down Expand Up @@ -724,7 +724,7 @@
}
],
"Checks": [
"organizations_tags_policies_enabled_and_attached"
"organizations_tag_policies_enabled_and_attached"
]
},
{
Expand Down Expand Up @@ -1582,7 +1582,7 @@
}
],
"Checks": [
"organizations_tags_policies_enabled_and_attached"
"organizations_tag_policies_enabled_and_attached"
]
},
{
Expand Down Expand Up @@ -4499,7 +4499,7 @@
}
],
"Checks": [
"organizations_tags_policies_enabled_and_attached"
"organizations_tag_policies_enabled_and_attached"
]
},
{
Expand Down
@@ -1,6 +1,6 @@
{
"Provider": "aws",
"CheckID": "organizations_tags_policies_enabled_and_attached",
"CheckID": "organizations_tag_policies_enabled_and_attached",
"CheckTitle": "Check if an AWS Organization has tags policies enabled and attached.",
"CheckType": [],
"ServiceName": "organizations",
Expand Down
Expand Up @@ -4,7 +4,7 @@
)


class organizations_tags_policies_enabled_and_attached(Check):
class organizations_tag_policies_enabled_and_attached(Check):
def execute(self):
findings = []

Expand All @@ -22,7 +22,7 @@ def execute(self):
# Access Denied to list_policies
continue
for policy in org.policies:
# We only check SCP policies here
# We only check tag policies here
if policy.type != "TAG_POLICY":
continue

Expand Down
Expand Up @@ -14,7 +14,7 @@
# Needs to Mock manually


class Test_organizations_tags_policies_enabled_and_attached:
class Test_organizations_tag_policies_enabled_and_attached:
def test_organization_no_organization(self):
organizations_client = mock.MagicMock
organizations_client.region = AWS_REGION_EU_WEST_1
Expand All @@ -34,15 +34,15 @@ def test_organization_no_organization(self):
return_value=aws_provider,
):
with mock.patch(
"prowler.providers.aws.services.organizations.organizations_tags_policies_enabled_and_attached.organizations_tags_policies_enabled_and_attached.organizations_client",
"prowler.providers.aws.services.organizations.organizations_tag_policies_enabled_and_attached.organizations_tag_policies_enabled_and_attached.organizations_client",
new=organizations_client,
):
# Test Check
from prowler.providers.aws.services.organizations.organizations_tags_policies_enabled_and_attached.organizations_tags_policies_enabled_and_attached import (
organizations_tags_policies_enabled_and_attached,
from prowler.providers.aws.services.organizations.organizations_tag_policies_enabled_and_attached.organizations_tag_policies_enabled_and_attached import (
organizations_tag_policies_enabled_and_attached,
)

check = organizations_tags_policies_enabled_and_attached()
check = organizations_tag_policies_enabled_and_attached()
result = check.execute()

assert len(result) == 1
Expand Down Expand Up @@ -85,15 +85,15 @@ def test_organization_with_tag_policies_not_attached(self):
return_value=aws_provider,
):
with mock.patch(
"prowler.providers.aws.services.organizations.organizations_tags_policies_enabled_and_attached.organizations_tags_policies_enabled_and_attached.organizations_client",
"prowler.providers.aws.services.organizations.organizations_tag_policies_enabled_and_attached.organizations_tag_policies_enabled_and_attached.organizations_client",
new=organizations_client,
):
# Test Check
from prowler.providers.aws.services.organizations.organizations_tags_policies_enabled_and_attached.organizations_tags_policies_enabled_and_attached import (
organizations_tags_policies_enabled_and_attached,
from prowler.providers.aws.services.organizations.organizations_tag_policies_enabled_and_attached.organizations_tag_policies_enabled_and_attached import (
organizations_tag_policies_enabled_and_attached,
)

check = organizations_tags_policies_enabled_and_attached()
check = organizations_tag_policies_enabled_and_attached()
result = check.execute()

assert len(result) == 1
Expand Down Expand Up @@ -139,15 +139,15 @@ def test_organization_with_tag_policies_attached(self):
return_value=aws_provider,
):
with mock.patch(
"prowler.providers.aws.services.organizations.organizations_tags_policies_enabled_and_attached.organizations_tags_policies_enabled_and_attached.organizations_client",
"prowler.providers.aws.services.organizations.organizations_tag_policies_enabled_and_attached.organizations_tag_policies_enabled_and_attached.organizations_client",
new=organizations_client,
):
# Test Check
from prowler.providers.aws.services.organizations.organizations_tags_policies_enabled_and_attached.organizations_tags_policies_enabled_and_attached import (
organizations_tags_policies_enabled_and_attached,
from prowler.providers.aws.services.organizations.organizations_tag_policies_enabled_and_attached.organizations_tag_policies_enabled_and_attached import (
organizations_tag_policies_enabled_and_attached,
)

check = organizations_tags_policies_enabled_and_attached()
check = organizations_tag_policies_enabled_and_attached()
result = check.execute()

assert len(result) == 1
Expand Down