From 5b50aa7801d17123697fa7280b63bce357db6a7a Mon Sep 17 00:00:00 2001 From: Jordi Soucheiron Date: Mon, 4 Dec 2023 14:22:04 +0100 Subject: [PATCH] Update stack_name_matches_regex.py (#261) * Update stack_name_matches_regex.py * Update changelog and version --- CHANGELOG.md | 8 ++++++++ cfripper/__version__.py | 2 +- cfripper/rules/stack_name_matches_regex.py | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c48614a7..4508c8e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. ### Fixes - Fix documentation. +## [1.15.2] +### Fixes +- Fixes https://github.com/Skyscanner/cfripper/issues/260 + +## [1.15.1] +### Fixes +- Fix docs generation + ## [1.15.0] ### Additions - New rules: `PublicELBCheckerRule`, `StackNameMatchesRegexRule`, and `StorageEncryptedRule` diff --git a/cfripper/__version__.py b/cfripper/__version__.py index ed46a0fb..1afd7edb 100644 --- a/cfripper/__version__.py +++ b/cfripper/__version__.py @@ -1,3 +1,3 @@ -VERSION = (1, 15, 1) +VERSION = (1, 15, 2) __version__ = ".".join(map(str, VERSION)) diff --git a/cfripper/rules/stack_name_matches_regex.py b/cfripper/rules/stack_name_matches_regex.py index ca2c8e8f..9307082b 100644 --- a/cfripper/rules/stack_name_matches_regex.py +++ b/cfripper/rules/stack_name_matches_regex.py @@ -28,11 +28,11 @@ def _stack_name_matches_regex(self, stack_name: str) -> bool: def invoke(self, cfmodel: CFModel, extras: Optional[Dict] = None) -> Result: result = Result() + if not extras: + extras = {} stack_name = self._config.stack_name or extras.get("stack_name", "") if not stack_name: return result - if not extras: - extras = {} if not self._stack_name_matches_regex(stack_name): self.add_failure_to_result(