Skip to content

Commit 29cfbcd

Browse files
authored
Change TAG012 from Warning to Non Compliant (#66)
1 parent 6eee7da commit 29cfbcd

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

src/rpdk/guard_rail/rule_library/tags/schema-linter-core-tagging-rules.guard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ rule ensure_property_tags_exists_v2 when tagging exists {
137137
tagging.permissions exists
138138
<<
139139
{
140-
"result": "WARNING",
140+
"result": "NON_COMPLIANT",
141141
"check_id": "TAG012",
142142
"message": "Resource MUST provide `permissions` if `tagging.taggable` is true"
143143
}

tests/integ/runner/test_integ_runner.py

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,12 @@
247247
check_id="TAG013",
248248
message="`tagProperty` MUST specify property defined in the schema",
249249
path="/tagging/tagProperty",
250-
)
250+
),
251+
GuardRuleResult(
252+
check_id="TAG012",
253+
message="Resource MUST provide `permissions` if `tagging.taggable` is true",
254+
path="",
255+
),
251256
},
252257
},
253258
{},
@@ -270,7 +275,12 @@
270275
check_id="TAG014",
271276
message="`tagProperty` MUST NOT be a part of `writeOnlyProperties`",
272277
path="/tagging/tagProperty",
273-
)
278+
),
279+
GuardRuleResult(
280+
check_id="TAG012",
281+
message="Resource MUST provide `permissions` if `tagging.taggable` is true",
282+
path="",
283+
),
274284
},
275285
},
276286
{},
@@ -389,19 +399,22 @@ def test_exec_compliance_stateless_aws_verifiedpermissions_policy(
389399
]
390400
),
391401
[],
392-
{},
393402
{
394403
"ensure_property_tags_exists_v2": {
395-
GuardRuleResult(
396-
check_id="TAG011",
397-
message="Resource MUST implement Tags property if `tagging.taggable` is true",
398-
path="",
399-
),
400404
GuardRuleResult(
401405
check_id="TAG012",
402406
message="Resource MUST provide `permissions` if `tagging.taggable` is true",
403407
path="",
404408
),
409+
}
410+
},
411+
{
412+
"ensure_property_tags_exists_v2": {
413+
GuardRuleResult(
414+
check_id="TAG011",
415+
message="Resource MUST implement Tags property if `tagging.taggable` is true",
416+
path="",
417+
)
405418
},
406419
},
407420
),

0 commit comments

Comments
 (0)