shisho icon indicating copy to clipboard operation
shisho copied to clipboard

Pattern Matching in Quotations

Open y-matsutomo opened this issue 3 years ago • 0 comments

Description of the bug

A pattern matching in quotations does not work properly.

Steps to Reproduce

rule

version: "1"
rules:
  - id: "test"
    title: "test"
    language: hcl
    message: "test"
    patterns:
      - pattern: |
          resource "test" :[NAME] {
            :[...SETTINGS]
            member  = ":[_]"
          }

target code

resource "test" "bad_example" {
  role    = "roles/admin"
  member  = "serviceAccount:${google_service_account.test.email}"
}

Expected Behaviour

It should match the pattern but it does not.

Additional Materials

N/A

y-matsutomo avatar Oct 28 '21 07:10 y-matsutomo