Skip to content

Commit

Permalink
Fix S3CrossAccountTrustRule granularity, rename s3_bucket_policy, add… (
Browse files Browse the repository at this point in the history
#87)

* Fix S3CrossAccountTrustRule granularity, rename s3_bucket_policy, add changelog to docs

* Bump version
  • Loading branch information
jsoucheiron committed Dec 17, 2019
1 parent b009f32 commit 24cf2dd
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.11.3] - 2019-12-17
### Improvements
- `S3CrossAccountTrustRule` now accepts resource level exceptions
- New documentation!
### Breaking changes
- `cfripper.rules.s3_bucked_policy` renamed to `cfripper.rules.s3_bucket_policy` (typo)

## [0.11.2] - 2019-11-26
### Fixes
- Fix `get_template` when AWS doesn't return a dict.
Expand Down
2 changes: 1 addition & 1 deletion cfripper/rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from cfripper.rules.managed_policy_on_user import * # noqa: F403
from cfripper.rules.policy_on_user import * # noqa: F403
from cfripper.rules.privilege_escalation import * # noqa: F403
from cfripper.rules.s3_bucked_policy import * # noqa: F403
from cfripper.rules.s3_bucket_policy import * # noqa: F403
from cfripper.rules.s3_public_access import * # noqa: F403
from cfripper.rules.security_group import * # noqa: F403
from cfripper.rules.sns_topic_policy_not_principal import * # noqa: F403
Expand Down
3 changes: 2 additions & 1 deletion cfripper/rules/cross_account_trust.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class CrossAccountCheckingRule(PrincipalCheckingRule):
This class provides common methods used to detect access permissions from other accounts
"""

GRANULARITY = RuleGranularity.RESOURCE

@property
def valid_principals(self) -> Set[str]:
if self._valid_principals is None:
Expand Down Expand Up @@ -86,7 +88,6 @@ class CrossAccountTrustRule(CrossAccountCheckingRule):

REASON = "{} has forbidden cross-account trust relationship with {}"
ROOT_PATTERN = re.compile(REGEX_CROSS_ACCOUNT_ROOT)
GRANULARITY = RuleGranularity.RESOURCE

def invoke(self, cfmodel):
for logical_id, resource in cfmodel.Resources.items():
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions docs/changelog.md
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repo_url: https://github.com/Skyscanner/cfripper
nav:
- Home: index.md
- Rules: rules.md
- Changelog: changelog.md
- Contributing: contributing.md
- Code of conduct: code_of_conduct.md

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

setup(
name="cfripper",
version="0.11.2",
version="0.11.3",
author="Skyscanner Product Security",
author_email="security@skyscanner.net",
long_description=long_description,
Expand Down
2 changes: 1 addition & 1 deletion tests/rules/test_S3BucketPolicyWildcardActionRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pytest

from cfripper.model.result import Result
from cfripper.rules.s3_bucked_policy import S3BucketPolicyWildcardActionRule
from cfripper.rules.s3_bucket_policy import S3BucketPolicyWildcardActionRule
from tests.utils import get_cfmodel_from


Expand Down

0 comments on commit 24cf2dd

Please sign in to comment.