Skip to content
Merged
Changes from 1 commit
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
83 changes: 78 additions & 5 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,15 @@
"type": "int",
"description": "The compressed payload size of built jars in bytes of customer project context sent for security scan. This is only applicable for Java project"
},
{
"name": "codewhispererCodeScanInvocationSource",
Copy link
Contributor

@justinmk3 justinmk3 Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use the generic source field? it exists for this purpose.

"name": "source",
"type": "string",
"description": "The source of the operation"

"description": "The location where the code scan is being invoked from",
"type": "string",
"allowedValues": [
"chat",
"menu"
]
},
{
"name": "codewhispererCodeScanIssuesWithFixes",
"type": "int",
Expand All @@ -554,6 +563,8 @@
"description": "The scope of the security scan being performed",
"allowedValues": [
"FILE",
"FILE_AUTO",
"FILE_ON_DEMAND",
"PROJECT"
]
},
Expand Down Expand Up @@ -885,7 +896,8 @@
"infobar",
"hover",
"webview",
"quickfix"
"quickfix",
"tree"
],
"description": "The IDE or OS component used for the action. (Examples: S3 download to filesystem, S3 upload from editor, ...). See also `featureId` for specific feature names, `module` for low-level modules, and `resourceType`."
},
Expand Down Expand Up @@ -1131,7 +1143,7 @@
"remoteDesktop",
"ssh",
"scp",
"ssm",
"ssm",
"remoteWorkspace"
],
"description": "Ways to connect to an EC2 Instance"
Expand Down Expand Up @@ -4322,6 +4334,16 @@
],
"passive": true
},
{
"name": "codewhisperer_codeScanChatNewTab",
"description": "Called when a new chat tab is opened in the code scan view",
"metadata": [
{
"type": "credentialSourceId",
"required": false
}
]
},
{
"name": "codewhisperer_codeScanIssueApplyFix",
"description": "Called when a code scan issue suggested fix is applied",
Expand All @@ -4340,15 +4362,35 @@
"type": "findingId"
},
{
"type": "reason",
"type": "ruleId",
"required": false
}
]
},
{
"name": "codewhisperer_codeScanIssueGenerateFix",
"description": "Called when a code scan issue fix is generated",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Called when a code scan issue fix is generated",
"description": "Generated a code scan issue. varant=... means ...",

"metadata": [
{
"type": "component"
},
{
"type": "result"
"type": "credentialStartUrl",
"required": false
},
{
"type": "detectorId"
},
{
"type": "findingId"
},
{
"type": "ruleId",
"required": false
},
{
"type": "variant",
"required": false
}
]
},
Expand All @@ -4375,6 +4417,33 @@
}
]
},
{
"name": "codewhisperer_codeScanIssueIgnore",
"description": "Called when a code scan issue is ignored",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the description is a good place to explain non-obvious fields. e.g. could mention :

Suggested change
"description": "Called when a code scan issue is ignored",
"description": "User ignored a code scan issue. variant=all means the user ignored all issues. ",

"metadata": [
{
"type": "component"
},
{
"type": "credentialStartUrl",
"required": false
},
{
"type": "detectorId"
},
{
"type": "findingId"
},
{
"type": "ruleId",
"required": false
},
{
"type": "variant",
"required": false
}
]
},
{
"name": "codewhisperer_codeScanIssueViewDetails",
"description": "Called when a code scan issue webview is opened",
Expand Down Expand Up @@ -4481,6 +4550,10 @@
"type": "codewhispererCodeScanBuildZipFileBytes",
"required": false
},
{
"type": "codewhispererCodeScanInvocationSource",
"required": false
},
{
"type": "codewhispererCodeScanIssuesWithFixes",
"required": false
Expand Down Expand Up @@ -6969,4 +7042,4 @@
]
}
]
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like your editor might be removing the final EOL. please check your editor/IDE settings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it gets removed by running the validation script, but I can add it back manually