Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Support for CloudFormation Pseudo Parameters #480

Open
varun656 opened this issue Mar 12, 2024 · 0 comments
Open

[Enhancement] Support for CloudFormation Pseudo Parameters #480

varun656 opened this issue Mar 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@varun656
Copy link

varun656 commented Mar 12, 2024

Is your feature request related to a problem? Please describe.
Validating Policies like :

      - Effect: Deny
        Principal: 
          AWS: "*"
        Action:
          - "s3:*"
        Resource:
          - Fn::Sub: "arn:${AWS::Partition}:s3:::local-${AWS::AccountId}-logs-${AWS::Region}/*"

Validation Output :

"Clause": {
  "Binary": {
      "context": " Resource[*] EQUALS  \"*\"",
      "messages": {
        "custom_message": "",
        "error_message": "Check was not compliant as property value [Path=/Resources/rLocalLogAggregregationBucketPolicy/Properties/PolicyDocument/Statement/0/Resource/0[L:337,C:16] Value={\"Fn::Sub\":\"arn:${AWS::Partition}:s3:::local-${AWS::AccountId}-logs-${AWS::Region}/*\"}] not equal to value [Path=[L:0,C:0] Value=\"*\"]. Error = [PathAwareValues are not comparable map, String]"
      },
      "check": {
        "Resolved": {
            "from": {
              "path": "/Resources/rLocalLogAggregregationBucketPolicy/Properties/PolicyDocument/Statement/0/Resource/0",
              "value": {
                  "Fn::Sub": "arn:${AWS::Partition}:s3:::local-${AWS::AccountId}-logs-${AWS::Region}/*"
              }
            },

Describe the solution you'd like

Support for CloudFormation Pseudo Parameters like ${AWS::Partition} to validate CloudFormation templates using cfn-guard

@varun656 varun656 added the enhancement New feature or request label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant