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

fix(query): fix missing results and same line detection in arm query #6140

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ CxPolicy[result] {
"resourceName": value.name,
"searchKey": sprintf("%s.name={{%s}}.properties.siteConfig", [common_lib.concat_path(path), value.name]),
"issueType": "MissingAttribute",
"keyExpectedValue": "resource with type 'Microsoft.Web/sites' should have the 'http20Enabled' property defined",
"keyActualValue": "resource with type 'Microsoft.Web/sites' doesn't have 'http20Enabled' property defined",
"searchLine": common_lib.build_search_line(path, ["properties", "siteConfig"]),
"keyExpectedValue": "resource with type 'Microsoft.Web/sites' should have the 'http20Enabled' property defined in siteConfig",
"keyActualValue": "resource with type 'Microsoft.Web/sites' doesn't have 'http20Enabled' property defined in siteConfig",
"searchLine": common_lib.build_search_line(path, ["properties"]),
}
}

Expand All @@ -56,8 +56,8 @@ CxPolicy[result] {
"searchKey": sprintf("%s.name={{%s}}.properties.siteConfig.http20Enabled", [common_lib.concat_path(path), value.name]),
"searchKey": "resources.type={{Microsoft.Web/sites}}.properties.siteConfig.http20Enabled",
"issueType": "IncorrectValue",
"keyExpectedValue": sprintf("resource with type 'Microsoft.Web/sites' should have the 'http20Enabled' %s set to true", [val_type]),
"keyActualValue": "resource with type 'Microsoft.Web/sites' doesn't have 'http20Enabled' set to true",
"searchLine": common_lib.build_search_line(path, ["properties", "siteConfig", "http20Enabled"]),
"keyExpectedValue": sprintf("resource with type 'Microsoft.Web/sites' should have the 'http20Enabled' %s set to true in siteConfig", [val_type]),
"keyActualValue": "resource with type 'Microsoft.Web/sites' doesn't have 'http20Enabled' set to true in siteConfig",
"searchLine": common_lib.build_search_line(path, ["properties"]),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
{
"queryName": "Website with 'Http20Enabled' Disabled",
"severity": "LOW",
"line": 19,
"line": 15,
"fileName": "positive2.json"
},
{
"queryName": "Website with 'Http20Enabled' Disabled",
"severity": "LOW",
"line": 18,
"line": 15,
"fileName": "positive3.json"
},
{
Expand All @@ -26,13 +26,13 @@
{
"queryName": "Website with 'Http20Enabled' Disabled",
"severity": "LOW",
"line": 21,
"line": 17,
"fileName": "positive5.json"
},
{
"queryName": "Website with 'Http20Enabled' Disabled",
"severity": "LOW",
"line": 20,
"line": 17,
"fileName": "positive6.json"
}
]