Skip to content
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
@@ -1,4 +1,4 @@
{
{
"schemaVersion": "1.0",
"name": "CmdShell check",
"version": "1.0.0",
Expand All @@ -14,21 +14,30 @@
},
"displayName": "CmdShell probe",
"description": "This is an example of cmdshell probe type. ",
"message": "Empty list",
"message": "File @{stdout.name} has size @{stdout.size} and it's bigger than threshold = @{threshold} bytes",
"level": "Warning",
"condition": "@stdout",
"threshold": 1024,
"condition": {
"lt": [
"@stdout.size",
"@threshold"
]
},
"probes": [
"ListOfDirectoryFilesAndSubdirectories"
{
"id": "ListOfDirectoryFiles",
"transform": {
"type": "parse",
"map": {
"stdout": "/^(?<date>\\d\\d/\\d\\d/\\d\\d\\d\\d)\\s+(?<time>\\d\\d:\\d\\d\\s(AM|PM))\\s+(?<size>[0-9.,]+)\\s+(?<name>.+)$/ix"
}
}
}
]
},
{
"id": ["DefaultRuleset"],
"itemType": "override",
"enabled": false
}
],
"probes": {
"ListOfDirectoryFilesAndSubdirectories": [
"ListOfDirectoryFiles": [
{
"type": "CmdShell",
"target": {
Expand All @@ -43,4 +52,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"source": [
"## Probe types\r\n",
"### CmdShell\r\n",
"Create a new rule with CmdShell probe. CmdShell probe executes a CMD.EXE shell command and returns lines of text in variable @stdout. Use CMDSHELL instead of QUERY in probe definition to load a .cmd file. Use Regex parser transformation to extract data from @stdout\r\n",
"Create a new rule with CmdShell probe. CmdShell probe executes a CMD.EXE shell command and returns lines of text in variable @stdout. Use 'CMDSHELL' instead of 'SQL' in probe definition to load a .cmd file. Use Regex parser transformation to extract data from @stdout\r\n",
""
],
"metadata": {
Expand Down
Binary file modified samples/manage/sql-assessment-api/notebooks/notebooks.zip
Binary file not shown.