Repository: aws-cloudformation/cfn-lint

Issue:
Add IAM policy checks
*cfn-lint version: (`cfn-lint --version`) 0.5.0*

*Description of issue.*

Used 'principle' instead of 'principal' in an SNS topic policy, spent 30 minutes finding the error, because the error message from CloudFormation is just an echo of the service error message, which simply says 'null':

> 'AWS::SNS::TopicPolicy SomeTopicPolicy CREATE_FAILED: Invalid parameter: Policy Error: null (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa)'

Example template:

```yaml
AWSTemplateFormatVersion: '2010-09-09'

Resources:

  SomeTopicPolicy:
    Type: AWS::SNS::TopicPolicy
    Properties:
      Topics:
      - some-topic-name
      PolicyDocument:
        Id: some-policy
        Version: 2012-10-17
        Statement:
        - Sid: some-sid
          Effect: Allow
          Principle:
            Service: events.amazonaws.com
          Action:
          - sns:Publish
          Resource: '*'
```

Probably more things can be checked in the structure of IAM/S3/SNS/... policies too, cloudformation itself seems to just take opaque blobs and pass them to the underlying system. Ofc IAM/SNS should have better error messages too.


Discussion:
Ouch.  @kddejong was just saying he'd like to see us incorporate more "sub" linters like we do with SAM.  It'd be amazing to have a special purpose IAM linter broken out we could call out for resource policies, etc.

Tracking this as an enhancement.  Thanks!
Worth noting we are checking identity-based policies with [E2507](https://github.com/awslabs/cfn-python-lint/blob/master/src/cfnlint/rules/resources/iam/Policy.py)  I haven't had a chance to convert it over for Resource based policies.  I'll try tackle this in the next week.

Resolving patch:
diff --git a/src/cfnlint/rules/resources/iam/Policy.py b/src/cfnlint/rules/resources/iam/Policy.py
--- a/src/cfnlint/rules/resources/iam/Policy.py
+++ b/src/cfnlint/rules/resources/iam/Policy.py
@@ -14,6 +14,7 @@
   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 """
+from datetime import date
 from cfnlint import CloudFormationLintRule
 from cfnlint import RuleMatch
 
@@ -27,7 +28,29 @@ class Policy(CloudFormationLintRule):
     source_url = 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html'
     tags = ['properties', 'iam']
 
-    def _check_policy_document(self, cfn, branch, policy):
+    def __init__(self):
+        """Init"""
+        self.resources_and_keys = {
+            'AWS::SNS::TopicPolicy': 'PolicyDocument',
+            'AWS::S3::BucketPolicy': 'PolicyDocument',
+            'AWS::KMS::Key': 'KeyPolicy',
+            'AWS::SQS::QueuePolicy': 'PolicyDocument',
+            'AWS::ECR::Repository': 'RepositoryPolicyText',
+            'AWS::Elasticsearch::Domain': 'AccessPolicies',
+        }
+        self.idp_and_keys = {
+            'AWS::IAM::Group': 'Policies',
+            'AWS::IAM::ManagedPolicy': 'PolicyDocument',
+            'AWS::IAM::Policy': 'PolicyDocument',
+            'AWS::IAM::Role': 'Policies',
+            'AWS::IAM::User': 'Policies',
+        }
+        for resource_type in self.resources_and_keys:
+            self.resource_property_types.append(resource_type)
+        for resource_type in self.idp_and_keys:
+            self.resource_property_types.append(resource_type)
+
+    def check_policy_document(self, value, path, cfn, is_identity_policy):
         """Check policy document"""
         matches = list()
 
@@ -36,34 +59,41 @@ def _check_policy_document(self, cfn, branch, policy):
             'Id',
             'Statement',
         ]
+        valid_versions = ['2012-10-17', '2008-10-17', date(2012, 10, 17), date(2008, 10, 17)]
 
-        if not isinstance(policy, dict):
+        if not isinstance(value, dict):
             message = 'IAM Policy Documents needs to be JSON'
             matches.append(
-                RuleMatch(branch[:], message))
+                RuleMatch(path[:], message))
             return matches
 
-        for parent_key, parent_value in policy.items():
+        for parent_key, parent_value in value.items():
             if parent_key not in valid_keys:
                 message = 'IAM Policy key %s doesn\'t exist.' % (parent_key)
                 matches.append(
-                    RuleMatch(branch[:] + [parent_key], message))
+                    RuleMatch(path[:] + [parent_key], message))
+            if parent_key == 'Version':
+                if parent_value not in valid_versions:
+                    message = 'IAM Policy Version needs to be one of (%s).' % (
+                        ', '.join(map(str, ['2012-10-17', '2008-10-17'])))
+                    matches.append(
+                        RuleMatch(path[:] + [parent_key], message))
             if parent_key == 'Statement':
                 if isinstance(parent_value, (list)):
-                    values = cfn.get_values(policy, 'Statement', branch[:])
-                    for value in values:
+                    statements = cfn.get_values(value, 'Statement', path[:])
+                    for statement in statements:
                         matches.extend(
                             self._check_policy_statement(
-                                value['Path'], value['Value']
+                                statement['Path'], statement['Value'], is_identity_policy
                             )
                         )
                 else:
                     message = 'IAM Policy statement should be of list.'
                     matches.append(
-                        RuleMatch(branch[:] + [parent_key], message))
+                        RuleMatch(path[:] + [parent_key], message))
         return matches
 
-    def _check_policy_statement(self, branch, statement):
+    def _check_policy_statement(self, branch, statement, is_identity_policy):
         """Check statements"""
         matches = list()
         statement_valid_keys = [
@@ -97,14 +127,16 @@ def _check_policy_statement(self, branch, statement):
             message = 'IAM Policy statement missing Action or NotAction'
             matches.append(
                 RuleMatch(branch[:], message))
-        if 'Principal' in statement:
-            message = 'IAM Policy statement shouldn\'t have Principal'
-            matches.append(
-                RuleMatch(branch[:] + ['Principal'], message))
-        if 'NotPrincipal' in statement:
-            message = 'IAM Policy statement shouldn\'t have NotPrincipal'
-            matches.append(
-                RuleMatch(branch[:] + ['NotPrincipal'], message))
+        if is_identity_policy:
+            if 'Principal' in statement or 'NotPrincipal' in statement:
+                message = 'IAM Resource Policy statement shouldn\'t have Principal or NotPrincipal'
+                matches.append(
+                    RuleMatch(branch[:], message))
+        else:
+            if 'Principal' not in statement and 'NotPrincipal' not in statement:
+                message = 'IAM Resource Policy statement should have Principal or NotPrincipal'
+                matches.append(
+                    RuleMatch(branch[:] + ['Principal'], message))
         if 'Resource' not in statement and 'NotResource' not in statement:
             message = 'IAM Policy statement missing Resource or NotResource'
             matches.append(
@@ -112,45 +144,42 @@ def _check_policy_statement(self, branch, statement):
 
         return(matches)
 
-    def _check_policy(self, cfn, branch, policy):
-        """Checks a policy"""
+    def match_resource_properties(self, properties, resourcetype, path, cfn):
+        """Check CloudFormation Properties"""
         matches = list()
-        policy_document = policy.get('PolicyDocument', {})
-        matches.extend(
-            self._check_policy_document(
-                cfn, branch + ['PolicyDocument'], policy_document))
-
-        return matches
 
-    def match(self, cfn):
-        """Check IAM Policies Properties"""
+        is_identity_policy = True
+        if resourcetype in self.resources_and_keys:
+            is_identity_policy = False
 
-        matches = list()
+        key = None
+        if resourcetype in self.resources_and_keys:
+            key = self.resources_and_keys.get(resourcetype)
+        else:
+            key = self.idp_and_keys.get(resourcetype)
 
-        iam_types = [
-            'AWS::IAM::Group',
-            'AWS::IAM::ManagedPolicy',
-            'AWS::IAM::Policy',
-            'AWS::IAM::Role',
-            'AWS::IAM::User',
-        ]
+        if not key:
+            # Key isn't defined return nothing
+            return matches
 
-        resources = cfn.get_resources(iam_types)
-        for resource_name, resource_values in resources.items():
-            tree = ['Resources', resource_name, 'Properties']
-            properties = resource_values.get('Properties', {})
-            if properties:
-                if properties.get('PolicyDocument'):
-                    values = cfn.get_values(properties, 'PolicyDocument', tree)
-                    for value in values:
-                        matches.extend(
-                            self._check_policy_document(
-                                cfn, value['Path'], value['Value']))
-                if properties.get('Policies'):
-                    values = cfn.get_values(properties, 'Policies', tree)
-                    for value in values:
-                        matches.extend(
-                            self._check_policy(
-                                cfn, value['Path'], value['Value']))
+        if key == 'Policies':
+            for index, policy in enumerate(properties.get(key, [])):
+                matches.extend(
+                    cfn.check_value(
+                        obj=policy, key='PolicyDocument',
+                        path=path[:] + ['Policies', index],
+                        check_value=self.check_policy_document,
+                        cfn=cfn,
+                        is_identity_policy=is_identity_policy
+                    ))
+        else:
+            matches.extend(
+                cfn.check_value(
+                    obj=properties, key=key,
+                    path=path[:],
+                    check_value=self.check_policy_document,
+                    cfn=cfn,
+                    is_identity_policy=is_identity_policy
+                ))
 
         return matches
diff --git a/src/cfnlint/rules/resources/iam/PolicyVersion.py b/src/cfnlint/rules/resources/iam/PolicyVersion.py
new file mode 100644
--- /dev/null
+++ b/src/cfnlint/rules/resources/iam/PolicyVersion.py
@@ -0,0 +1,94 @@
+"""
+  Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+  Permission is hereby granted, free of charge, to any person obtaining a copy of this
+  software and associated documentation files (the "Software"), to deal in the Software
+  without restriction, including without limitation the rights to use, copy, modify,
+  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""
+from datetime import date
+from cfnlint import CloudFormationLintRule
+from cfnlint import RuleMatch
+
+
+class PolicyVersion(CloudFormationLintRule):
+    """Check if IAM Policy Version is correct"""
+    id = 'W2511'
+    shortdesc = 'Check IAM Resource Policies syntax'
+    description = 'See if the elements inside an IAM Resource policy ' + \
+                  'are configured correctly.'
+    source_url = 'https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html'
+    tags = ['properties', 'iam']
+
+    def __init__(self):
+        """Init"""
+        self.resources_and_keys = {
+            'AWS::SNS::TopicPolicy': 'PolicyDocument',
+            'AWS::S3::BucketPolicy': 'PolicyDocument',
+            'AWS::KMS::Key': 'KeyPolicy',
+            'AWS::SQS::QueuePolicy': 'PolicyDocument',
+            'AWS::ECR::Repository': 'RepositoryPolicyText',
+            'AWS::Elasticsearch::Domain': 'AccessPolicies',
+        }
+        self.idp_and_keys = {
+            'AWS::IAM::Group': 'Policies',
+            'AWS::IAM::ManagedPolicy': 'PolicyDocument',
+            'AWS::IAM::Policy': 'PolicyDocument',
+            'AWS::IAM::Role': 'Policies',
+            'AWS::IAM::User': 'Policies',
+        }
+        for resource_type in self.resources_and_keys:
+            self.resource_property_types.append(resource_type)
+        for resource_type in self.idp_and_keys:
+            self.resource_property_types.append(resource_type)
+
+    def check_policy_document(self, value, path):
+        """Check policy document"""
+        matches = list()
+
+        if not isinstance(value, dict):
+            return matches
+
+        version = value.get('Version')
+        if version:
+            if version in ['2008-10-17', date(2008, 10, 17)]:
+                message = 'IAM Policy Version should be updated to \'2012-10-17\'.'
+                matches.append(
+                    RuleMatch(path[:] + ['Version'], message))
+        return matches
+
+    def match_resource_properties(self, properties, resourcetype, path, cfn):
+        """Check CloudFormation Properties"""
+        matches = list()
+
+        key = None
+        if resourcetype in self.resources_and_keys:
+            key = self.resources_and_keys.get(resourcetype)
+        else:
+            key = self.idp_and_keys.get(resourcetype)
+
+        if key == 'Policies':
+            for index, policy in enumerate(properties.get(key, [])):
+                matches.extend(
+                    cfn.check_value(
+                        obj=policy, key='PolicyDocument',
+                        path=path[:] + ['Policies', index],
+                        check_value=self.check_policy_document,
+                    ))
+        else:
+            matches.extend(
+                cfn.check_value(
+                    obj=properties, key=key,
+                    path=path[:],
+                    check_value=self.check_policy_document
+                ))
+
+        return matches


Test patch:
diff --git a/test/fixtures/results/quickstart/nist_application.json b/test/fixtures/results/quickstart/nist_application.json
--- a/test/fixtures/results/quickstart/nist_application.json
+++ b/test/fixtures/results/quickstart/nist_application.json
@@ -2,8 +2,9 @@
     {
         "Rule": {
             "Id": "W2506",
-            "Description": "See if there are any refs for ImageId to a parameter of innapropriate type. Appropriate Types are [AWS::EC2::Image::Id, AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>]",
-            "ShortDescription": "Check if ImageId Parameters have the correct type"
+            "Description": "See if there are any refs for ImageId to a parameter of inappropriate type. Appropriate Types are [AWS::EC2::Image::Id, AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>]",
+            "ShortDescription": "Check if ImageId Parameters have the correct type",
+            "Source": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html#parmtypes"
         },
         "Location": {
             "Start": {
@@ -17,13 +18,14 @@
         },
         "Level": "Warning",
         "Message": "Parameter pAppAmi should be of type [AWS::EC2::Image::Id, AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>]",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W2509",
             "Description": "Check if a parameter is being used as a CIDR. If it is make sure it has allowed values regex comparisons",
-            "ShortDescription": "CIDR Parameters have allowed values"
+            "ShortDescription": "CIDR Parameters have allowed values",
+            "Source": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html"
         },
         "Location": {
             "Start": {
@@ -37,13 +39,14 @@
         },
         "Level": "Warning",
         "Message": "AllowedPattern and/or AllowedValues for Parameter should be specified at Parameters/pManagementCIDR. Example for AllowedPattern: \"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$\"",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W2509",
             "Description": "Check if a parameter is being used as a CIDR. If it is make sure it has allowed values regex comparisons",
-            "ShortDescription": "CIDR Parameters have allowed values"
+            "ShortDescription": "CIDR Parameters have allowed values",
+            "Source": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html"
         },
         "Location": {
             "Start": {
@@ -57,13 +60,14 @@
         },
         "Level": "Warning",
         "Message": "AllowedPattern and/or AllowedValues for Parameter should be specified at Parameters/pProductionCIDR. Example for AllowedPattern: \"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$\"",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W2506",
-            "Description": "See if there are any refs for ImageId to a parameter of innapropriate type. Appropriate Types are [AWS::EC2::Image::Id, AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>]",
-            "ShortDescription": "Check if ImageId Parameters have the correct type"
+            "Description": "See if there are any refs for ImageId to a parameter of inappropriate type. Appropriate Types are [AWS::EC2::Image::Id, AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>]",
+            "ShortDescription": "Check if ImageId Parameters have the correct type",
+            "Source": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html#parmtypes"
         },
         "Location": {
             "Start": {
@@ -77,13 +81,14 @@
         },
         "Level": "Warning",
         "Message": "Parameter pWebServerAMI should be of type [AWS::EC2::Image::Id, AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>]",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -96,14 +101,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rRDSInstanceMySQL), dependency already enforced by \"!Fn:GetAtt\" at Resources/rAutoScalingConfigApp/Metadata/AWS::CloudFormation::Init/install_wordpress/files//tmp/create-wp-config/content/Fn::Join/1/12/Fn::GetAtt/['rRDSInstanceMySQL', 'Endpoint.Address']",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rRDSInstanceMySQL), dependency already enforced by a \"Fn:GetAtt\" at Resources/rAutoScalingConfigApp/Metadata/AWS::CloudFormation::Init/install_wordpress/files//tmp/create-wp-config/content/Fn::Join/1/12/Fn::GetAtt/['rRDSInstanceMySQL', 'Endpoint.Address']",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -116,14 +122,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rELBApp), dependency already enforced by \"!Fn:GetAtt\" at Resources/rAutoScalingConfigWeb/Metadata/AWS::CloudFormation::Init/nginx/files//tmp/nginx/default.conf/content/Fn::Join/1/9/Fn::GetAtt/['rELBApp', 'DNSName']",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rELBApp), dependency already enforced by a \"Fn:GetAtt\" at Resources/rAutoScalingConfigWeb/Metadata/AWS::CloudFormation::Init/nginx/files//tmp/nginx/default.conf/content/Fn::Join/1/9/Fn::GetAtt/['rELBApp', 'DNSName']",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -137,13 +144,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingConfigWeb/Properties/AssociatePublicIpAddress should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -157,13 +165,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingDownApp/Properties/ScalingAdjustment should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -177,13 +186,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingDownWeb/Properties/ScalingAdjustment should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -196,14 +206,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rAutoScalingConfigApp), dependency already enforced by \"!Ref\" at Resources/rAutoScalingGroupApp/Properties/LaunchConfigurationName/Ref/rAutoScalingConfigApp",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rAutoScalingConfigApp), dependency already enforced by a \"Ref\" at Resources/rAutoScalingGroupApp/Properties/LaunchConfigurationName/Ref/rAutoScalingConfigApp",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -217,13 +228,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingGroupApp/Properties/HealthCheckGracePeriod should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -237,13 +249,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingGroupApp/Properties/Tags/0/PropagateAtLaunch should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -257,13 +270,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingGroupApp/Properties/Tags/1/PropagateAtLaunch should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -276,14 +290,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rAutoScalingConfigWeb), dependency already enforced by \"!Ref\" at Resources/rAutoScalingGroupWeb/Properties/LaunchConfigurationName/Ref/rAutoScalingConfigWeb",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rAutoScalingConfigWeb), dependency already enforced by a \"Ref\" at Resources/rAutoScalingGroupWeb/Properties/LaunchConfigurationName/Ref/rAutoScalingConfigWeb",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -297,13 +312,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingGroupWeb/Properties/HealthCheckGracePeriod should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -317,13 +333,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingGroupWeb/Properties/Tags/0/PropagateAtLaunch should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -337,13 +354,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingGroupWeb/Properties/Tags/1/PropagateAtLaunch should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -357,13 +375,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingUpApp/Properties/ScalingAdjustment should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -377,13 +396,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rAutoScalingUpWeb/Properties/ScalingAdjustment should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -397,13 +417,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmHighCPUApp/Properties/EvaluationPeriods should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -417,13 +438,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmHighCPUApp/Properties/Period should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -437,13 +459,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmHighCPUApp/Properties/Threshold should be of type Double",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -457,13 +480,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmHighCPUWeb/Properties/EvaluationPeriods should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -477,13 +501,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmHighCPUWeb/Properties/Period should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -497,13 +522,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmHighCPUWeb/Properties/Threshold should be of type Double",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -517,13 +543,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmLowCPUApp/Properties/EvaluationPeriods should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -537,13 +564,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmLowCPUApp/Properties/Period should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -557,13 +585,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmLowCPUApp/Properties/Threshold should be of type Double",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -576,14 +605,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rAutoScalingGroupWeb), dependency already enforced by \"!Ref\" at Resources/rCWAlarmLowCPUWeb/Properties/Dimensions/0/Value/Ref/rAutoScalingGroupWeb",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rAutoScalingGroupWeb), dependency already enforced by a \"Ref\" at Resources/rCWAlarmLowCPUWeb/Properties/Dimensions/0/Value/Ref/rAutoScalingGroupWeb",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -597,13 +627,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmLowCPUWeb/Properties/EvaluationPeriods should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -617,13 +648,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmLowCPUWeb/Properties/Period should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -637,13 +669,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rCWAlarmLowCPUWeb/Properties/Threshold should be of type Double",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -656,14 +689,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rS3ELBAccessLogs), dependency already enforced by \"!Ref\" at Resources/rELBApp/Properties/AccessLoggingPolicy/S3BucketName/Ref/rS3ELBAccessLogs",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rS3ELBAccessLogs), dependency already enforced by a \"Ref\" at Resources/rELBApp/Properties/AccessLoggingPolicy/S3BucketName/Ref/rS3ELBAccessLogs",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -676,14 +710,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rSecurityGroupApp), dependency already enforced by \"!Ref\" at Resources/rELBApp/Properties/SecurityGroups/0/Ref/rSecurityGroupApp",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rSecurityGroupApp), dependency already enforced by a \"Ref\" at Resources/rELBApp/Properties/SecurityGroups/0/Ref/rSecurityGroupApp",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -697,13 +732,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rELBApp/Properties/AccessLoggingPolicy/EmitInterval should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -717,13 +753,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rELBApp/Properties/AccessLoggingPolicy/Enabled should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -736,14 +773,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rS3ELBAccessLogs), dependency already enforced by \"!Ref\" at Resources/rELBWeb/Properties/AccessLoggingPolicy/S3BucketName/Ref/rS3ELBAccessLogs",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rS3ELBAccessLogs), dependency already enforced by a \"Ref\" at Resources/rELBWeb/Properties/AccessLoggingPolicy/S3BucketName/Ref/rS3ELBAccessLogs",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -756,14 +794,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rSecurityGroupWeb), dependency already enforced by \"!Ref\" at Resources/rELBWeb/Properties/SecurityGroups/0/Ref/rSecurityGroupWeb",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rSecurityGroupWeb), dependency already enforced by a \"Ref\" at Resources/rELBWeb/Properties/SecurityGroups/0/Ref/rSecurityGroupWeb",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -777,13 +816,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rELBWeb/Properties/AccessLoggingPolicy/EmitInterval should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -797,13 +837,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rELBWeb/Properties/AccessLoggingPolicy/Enabled should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -816,14 +857,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rDBSubnetGroup), dependency already enforced by \"!Ref\" at Resources/rRDSInstanceMySQL/Properties/DBSubnetGroupName/Ref/rDBSubnetGroup",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rDBSubnetGroup), dependency already enforced by a \"Ref\" at Resources/rRDSInstanceMySQL/Properties/DBSubnetGroupName/Ref/rDBSubnetGroup",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -836,14 +878,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rSecurityGroupRDS), dependency already enforced by \"!Ref\" at Resources/rRDSInstanceMySQL/Properties/VPCSecurityGroups/0/Ref/rSecurityGroupRDS",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rSecurityGroupRDS), dependency already enforced by a \"Ref\" at Resources/rRDSInstanceMySQL/Properties/VPCSecurityGroups/0/Ref/rSecurityGroupRDS",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -857,13 +900,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rRDSInstanceMySQL/Properties/MultiAZ should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -877,13 +921,35 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rRDSInstanceMySQL/Properties/StorageEncrypted should be of type Boolean",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
+    },
+    {
+        "Rule": {
+            "Id": "W2511",
+            "Description": "See if the elements inside an IAM Resource policy are configured correctly.",
+            "ShortDescription": "Check IAM Resource Policies syntax",
+            "Source": "https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html"
+        },
+        "Location": {
+            "Start": {
+                "ColumnNumber": 9,
+                "LineNumber": 1057
+            },
+            "End": {
+                "ColumnNumber": 16,
+                "LineNumber": 1057
+            }
+        },
+        "Level": "Warning",
+        "Message": "IAM Policy Version should be updated to '2012-10-17'.",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -897,13 +963,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupApp/Properties/SecurityGroupEgress/0/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -917,13 +984,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupApp/Properties/SecurityGroupEgress/0/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -937,13 +1005,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupApp/Properties/SecurityGroupEgress/1/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -957,13 +1026,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupApp/Properties/SecurityGroupEgress/1/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -977,13 +1047,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupApp/Properties/SecurityGroupIngress/0/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -997,13 +1068,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupApp/Properties/SecurityGroupIngress/0/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1017,13 +1089,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupAppInstance/Properties/SecurityGroupIngress/0/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1037,13 +1110,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupAppInstance/Properties/SecurityGroupIngress/0/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1057,13 +1131,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupAppInstance/Properties/SecurityGroupIngress/1/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1077,13 +1152,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupAppInstance/Properties/SecurityGroupIngress/1/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1097,13 +1173,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupAppInstance/Properties/SecurityGroupIngress/2/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1117,13 +1194,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupAppInstance/Properties/SecurityGroupIngress/2/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1137,13 +1215,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupRDS/Properties/SecurityGroupIngress/0/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1157,13 +1236,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupRDS/Properties/SecurityGroupIngress/0/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1177,13 +1257,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWeb/Properties/SecurityGroupIngress/0/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1197,13 +1278,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWeb/Properties/SecurityGroupIngress/0/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1217,13 +1299,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWebInstance/Properties/SecurityGroupIngress/0/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1237,13 +1320,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWebInstance/Properties/SecurityGroupIngress/0/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1257,13 +1341,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWebInstance/Properties/SecurityGroupIngress/1/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1277,13 +1362,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWebInstance/Properties/SecurityGroupIngress/1/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1297,13 +1383,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWebInstance/Properties/SecurityGroupIngress/2/FromPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1317,13 +1404,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rSecurityGroupWebInstance/Properties/SecurityGroupIngress/2/ToPort should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1337,13 +1425,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rWebContentBucket/Properties/LifecycleConfiguration/Rules/0/ExpirationInDays should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "E3012",
             "Description": "Checks resource property values with Primitive Types for values that match those types.",
-            "ShortDescription": "Check resource properties values"
+            "ShortDescription": "Check resource properties values",
+            "Source": "https://github.com/awslabs/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype"
         },
         "Location": {
             "Start": {
@@ -1357,13 +1446,14 @@
         },
         "Level": "Error",
         "Message": "Property Resources/rWebContentBucket/Properties/LifecycleConfiguration/Rules/0/Transition/TransitionInDays should be of type Integer",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -1376,14 +1466,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rWebContentBucket), dependency already enforced by \"!Ref\" at Resources/rWebContentS3Policy/Properties/Bucket/Ref/rWebContentBucket",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rWebContentBucket), dependency already enforced by a \"Ref\" at Resources/rWebContentS3Policy/Properties/Bucket/Ref/rWebContentBucket",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -1396,14 +1487,15 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rWebContentBucket), dependency already enforced by \"!Ref\" at Resources/rWebContentS3Policy/Properties/PolicyDocument/Statement/0/Resource/Fn::Join/1/3/Ref/rWebContentBucket",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rWebContentBucket), dependency already enforced by a \"Ref\" at Resources/rWebContentS3Policy/Properties/PolicyDocument/Statement/0/Resource/Fn::Join/1/3/Ref/rWebContentBucket",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     },
     {
         "Rule": {
             "Id": "W3005",
-            "Description": "Check if DependsOn is specified if not needed. A Ref and GetAtt implicitly results in DependsOn behaviour.",
-            "ShortDescription": "Check obsolete DependsOn configuration for Resources"
+            "Description": "Check if DependsOn is specified if not needed. A Ref or a Fn::GetAtt already is an implicit dependency.",
+            "ShortDescription": "Check obsolete DependsOn configuration for Resources",
+            "Source": "https://aws.amazon.com/blogs/devops/optimize-aws-cloudformation-templates/"
         },
         "Location": {
             "Start": {
@@ -1416,7 +1508,7 @@
             }
         },
         "Level": "Warning",
-        "Message": "Obsolete DependsOn on resource (rWebContentBucket), dependency already enforced by \"!Ref\" at Resources/rWebContentS3Policy/Properties/PolicyDocument/Statement/1/Resource/Fn::Join/1/3/Ref/rWebContentBucket",
-        "Filename": "test/templates/quickstart/nist_application.yaml"
+        "Message": "Obsolete DependsOn on resource (rWebContentBucket), dependency already enforced by a \"Ref\" at Resources/rWebContentS3Policy/Properties/PolicyDocument/Statement/1/Resource/Fn::Join/1/3/Ref/rWebContentBucket",
+        "Filename": "test/fixtures/templates/quickstart/nist_application.yaml"
     }
 ]
diff --git a/test/fixtures/templates/bad/properties_iam_policy.yaml b/test/fixtures/templates/bad/properties_iam_policy.yaml
--- a/test/fixtures/templates/bad/properties_iam_policy.yaml
+++ b/test/fixtures/templates/bad/properties_iam_policy.yaml
@@ -29,4 +29,4 @@ Resources:
       - Fn::If:
         - cCondition
         - Statement: {}
-        - Statement: {}
+        - Statement: []
diff --git a/test/fixtures/templates/bad/resources/iam/policy_version.yaml b/test/fixtures/templates/bad/resources/iam/policy_version.yaml
new file mode 100644
--- /dev/null
+++ b/test/fixtures/templates/bad/resources/iam/policy_version.yaml
@@ -0,0 +1,19 @@
+---
+AWSTemplateFormatVersion: "2010-09-09"
+Description: >
+  Test bad Policy Version
+Resources:
+  rIamRole:
+    Type: AWS::IAM::Role
+    Properties:
+      AssumeRolePolicyDocument: {}
+      Policies:
+      - PolicyName: String
+        PolicyDocument:
+          Version: "2008-10-17"
+          Statement:
+            - Effect: "Allow"
+              Action:
+                - "s3:ListBucket"
+                - "s3:GetObject"
+              Resource: '*'
diff --git a/test/fixtures/templates/bad/resources/iam/resource_policy.yaml b/test/fixtures/templates/bad/resources/iam/resource_policy.yaml
new file mode 100644
--- /dev/null
+++ b/test/fixtures/templates/bad/resources/iam/resource_policy.yaml
@@ -0,0 +1,34 @@
+---
+AWSTemplateFormatVersion: "2010-09-09"
+Resources:
+  SampleBucketPolicy:
+    Type: AWS::S3::BucketPolicy
+    Properties:
+      Bucket: "myExampleBucket"
+      PolicyDocument:
+        Statement:
+          -
+            Action:
+              - "s3:GetObject"
+            Effect: "Allow"
+            Resource: arn:aws:s3:::myExampleBucket/*
+            Condition:
+              StringLike:
+                aws:Referer:
+                  - "http://www.example.com/*"
+                  - "http://example.com/*"
+  mysnspolicy:
+    Type: AWS::SNS::TopicPolicy
+    Properties:
+      PolicyDocument:
+        Id: MyTopicPolicy
+        Version: '2012-10-17'
+        Statement:
+        - Sid: My-statement-id
+          Effect: NotAllow
+          Principal: arn:aws:iam::account-id:user/user-name
+          Action: sns:Publish
+          Resource: "*"
+          BadProperty: test
+      Topics:
+      - mytopic
diff --git a/test/fixtures/templates/good/resources/iam/resource_policy.yaml b/test/fixtures/templates/good/resources/iam/resource_policy.yaml
new file mode 100644
--- /dev/null
+++ b/test/fixtures/templates/good/resources/iam/resource_policy.yaml
@@ -0,0 +1,31 @@
+---
+AWSTemplateFormatVersion: "2010-09-09"
+Parameters:
+  myExampleBucket:
+    Type: String
+Resources:
+  SampleBucketPolicy:
+    Type: AWS::S3::BucketPolicy
+    Properties:
+      Bucket:
+        Ref: "myExampleBucket"
+      PolicyDocument:
+        Statement:
+          -
+            Action:
+              - "s3:GetObject"
+            Effect: "Allow"
+            Resource:
+              Fn::Join:
+                - ""
+                -
+                  - "arn:aws:s3:::"
+                  -
+                    Ref: "myExampleBucket"
+                  - "/*"
+            Principal: "*"
+            Condition:
+              StringLike:
+                aws:Referer:
+                  - "http://www.example.com/*"
+                  - "http://example.com/*"
diff --git a/test/rules/resources/iam/test_iam_policy.py b/test/rules/resources/iam/test_iam_policy.py
--- a/test/rules/resources/iam/test_iam_policy.py
+++ b/test/rules/resources/iam/test_iam_policy.py
@@ -25,7 +25,8 @@ def setUp(self):
         super(TestPropertyIamPolicies, self).setUp()
         self.collection.register(Policy())
         self.success_templates = [
-            'fixtures/templates/good/resources/iam/policy.yaml'
+            'fixtures/templates/good/resources/iam/policy.yaml',
+            'fixtures/templates/good/resources/iam/resource_policy.yaml',
         ]
 
     def test_file_positive(self):
@@ -34,4 +35,8 @@ def test_file_positive(self):
 
     def test_file_negative(self):
         """Test failure"""
-        self.helper_file_negative('fixtures/templates/bad/properties_iam_policy.yaml', 6)
+        self.helper_file_negative('fixtures/templates/bad/properties_iam_policy.yaml', 8)
+
+    def test_file_resource_negative(self):
+        """Test failure"""
+        self.helper_file_negative('fixtures/templates/bad/resources/iam/resource_policy.yaml', 3)
diff --git a/test/rules/resources/iam/test_iam_policy_version.py b/test/rules/resources/iam/test_iam_policy_version.py
new file mode 100644
--- /dev/null
+++ b/test/rules/resources/iam/test_iam_policy_version.py
@@ -0,0 +1,38 @@
+"""
+  Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+  Permission is hereby granted, free of charge, to any person obtaining a copy of this
+  software and associated documentation files (the "Software"), to deal in the Software
+  without restriction, including without limitation the rights to use, copy, modify,
+  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+  permit persons to whom the Software is furnished to do so.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""
+from cfnlint.rules.resources.iam.PolicyVersion import PolicyVersion  # pylint: disable=E0401
+from ... import BaseRuleTestCase
+
+
+class TestPolicyVersion(BaseRuleTestCase):
+    """Test IAM Resource Policies"""
+    def setUp(self):
+        """Setup"""
+        super(TestPolicyVersion, self).setUp()
+        self.collection.register(PolicyVersion())
+        self.success_templates = [
+            'fixtures/templates/good/resources/iam/resource_policy.yaml',
+            'fixtures/templates/good/resources/iam/policy.yaml',
+        ]
+
+    def test_file_positive(self):
+        """Test Positive"""
+        self.helper_file_positive()
+
+    def test_file_negative(self):
+        """Test failure"""
+        self.helper_file_negative('fixtures/templates/bad/resources/iam/policy_version.yaml', 1)