-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathpackage.json
More file actions
338 lines (338 loc) · 12.4 KB
/
package.json
File metadata and controls
338 lines (338 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
{
"type": "module",
"name": "vscode-devskim",
"displayName": "DevSkim",
"description": "DevSkim Security Analyzer Plugin for IDEs. Find security mistakes as code is authored, and fix them with a mouse click.",
"author": "Microsoft Corporation",
"license": "MIT",
"version": "0.0.0-placeholder",
"publisher": "MS-CST-E",
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/devskim.git"
},
"capabilities": {
"virtualWorkspaces": {
"supported": "limited",
"description": "DevSkim has not been fully tested in virtual workspaces, but is functional."
}
},
"icon": "devskim.ico",
"galleryBanner": {
"color": "#999999",
"theme": "dark"
},
"engines": {
"vscode": "^1.63.0"
},
"bugs": {
"url": "https://github.com/Microsoft/DevSkim/issues"
},
"homepage": "https://github.com/Microsoft/DevSkim#readme",
"categories": [
"Linters"
],
"keywords": [
"Security"
],
"activationEvents": [
"onLanguage:bat",
"onLanguage:php",
"onLanguage:c",
"onLanguage:cpp",
"onLanguage:csharp",
"onLanguage:ruby",
"onLanguage:perl",
"onLanguage:perl6",
"onLanguage:javascriptreact",
"onLanguage:javascript",
"onLanguage:go",
"onLanguage:sql",
"onLanguage:rust",
"onLanguage:groovy",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onLanguage:jade",
"onLanguage:lua",
"onLanguage:swift",
"onLanguage:clojure",
"onLanguage:vb",
"onLanguage:shellscript",
"onLanguage:yaml",
"onLanguage:fsharp",
"onLanguage:objective-c",
"onLanguage:xml",
"onLanguage:r",
"onLanguage:java",
"onLanguage:powershell",
"onLanguage:coffeescript",
"onLanguage:plaintext",
"onLanguage:python",
"onLanguage:json"
],
"main": "./client/out/extension.js",
"contributes": {
"commands": [
{
"command": "devskim.scanWorkspace",
"title": "DevSkim: Scan All Open Files"
}
],
"configuration": [
{
"order": 10,
"id": "MS-CST-E.vscode-devskim.rules",
"title": "Rules",
"properties": {
"MS-CST-E.vscode-devskim.rules.enableCriticalSeverityRules": {
"order": 0,
"type": "boolean",
"default": true,
"description": "Turn on the rules with severity \"Critical\"."
},
"MS-CST-E.vscode-devskim.rules.enableImportantSeverityRules": {
"order": 1,
"type": "boolean",
"default": true,
"description": "Turn on the rules with severity \"Important\"."
},
"MS-CST-E.vscode-devskim.rules.enableModerateSeverityRules": {
"order": 2,
"type": "boolean",
"default": true,
"description": "Turn on the rules with severity \"Moderate\"."
},
"MS-CST-E.vscode-devskim.rules.enableBestPracticeSeverityRules": {
"order": 3,
"type": "boolean",
"default": false,
"description": "Turn on the rules of severity \"Best-Practice\". These rules either flag issues that are typically of a lower severity, or recommended practices that lead to more secure code, but aren't typically outright vulnerabilities."
},
"MS-CST-E.vscode-devskim.rules.enableManualReviewSeverityRules": {
"order": 4,
"type": "boolean",
"default": false,
"description": "Turn on the rules that flag things for manual review. These are typically scenarios that *could* be incredibly severe if tainted data can be inserted, but are often programmatically necessary (for example, dynamic code generation with \"eval\"). Since these rules tend to require further analysis upon flagging an issue, they disabled by default."
},
"MS-CST-E.vscode-devskim.rules.enableHighConfidenceRules": {
"order": 5,
"type": "boolean",
"default": true,
"description": "Turn on the rules of confidence \"High\"."
},
"MS-CST-E.vscode-devskim.rules.enableMediumConfidenceRules": {
"order": 6,
"type": "boolean",
"default": true,
"description": "Turn on the rules of confidence \"Medium\"."
},
"MS-CST-E.vscode-devskim.rules.enableLowConfidenceRules": {
"order": 7,
"type": "boolean",
"default": false,
"description": "Turn on the rules of confidence \"Low\"."
},
"MS-CST-E.vscode-devskim.rules.customRulesPaths": {
"order": 8,
"type": "array",
"default": [],
"description": "A list of local paths on disk to rules files or folders containing rule files, for DevSkim to use in analysis.",
"items": {
"type": "string"
}
},
"MS-CST-E.vscode-devskim.rules.customLanguagesPath": {
"order": 9,
"type": "string",
"default": "",
"description": "A local path to a custom language file for analysis. Also requires customCommentsPath to be set."
},
"MS-CST-E.vscode-devskim.rules.customCommentsPath": {
"order": 10,
"type": "string",
"default": "",
"description": "A local path to a custom comments file for analysis. Also requires customLanguagesPath to be set."
}
}
},
{
"order": 20,
"id": "MS-CST-E.vscode-devskim.suppressions",
"title": "Suppressions",
"properties": {
"MS-CST-E.vscode-devskim.suppressions.suppressionDurationInDays": {
"order": 0,
"type": "number",
"default": 30,
"description": "DevSkim allows for findings to be suppressed for a temporary period of time. The default is 30 days. Set to 0 to disable temporary suppressions."
},
"MS-CST-E.vscode-devskim.suppressions.suppressionCommentStyle": {
"order": 1,
"type": "string",
"enum": [
"Line",
"Block"
],
"default": "Line",
"description": "When DevSkim inserts a suppression comment it defaults to using single line comments for every language that has them. Setting this to block will instead use block comments for the languages that support them. Block comments are suggested if regularly adding explanations for why a finding was suppressed"
},
"MS-CST-E.vscode-devskim.suppressions.manualReviewerName": {
"order": 2,
"type": "string",
"default": "",
"description": "If set, insert this name in inserted suppression comments."
}
}
},
{
"order": 30,
"id": "MS-CST-E.vscode-devskim.guidance",
"title": "Guidance",
"properties": {
"MS-CST-E.vscode-devskim.guidance.guidanceBaseURL": {
"order": 0,
"type": "string",
"default": "https://github.com/Microsoft/DevSkim/blob/main/guidance/",
"description": "Each finding has a guidance file that describes the issue and solutions in more detail. By default, those files live on the DevSkim github repo however, with this setting, organizations can clone and customize that repo, and specify their own base URL for the guidance."
}
}
},
{
"order": 40,
"id": "MS-CST-E.vscode-devskim.ignores",
"title": "Ignores",
"properties": {
"MS-CST-E.vscode-devskim.ignores.ignoreFiles": {
"order": 0,
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Glob expressions to exclude files and folders from analysis."
},
"MS-CST-E.vscode-devskim.ignores.ignoreRulesList": {
"order": 1,
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "DevSkim Rule IDs to ignore."
},
"MS-CST-E.vscode-devskim.ignores.ignoreDefaultRules": {
"order": 2,
"type": "boolean",
"default": false,
"description": "Disable all default DevSkim rules."
}
}
},
{
"order": 50,
"id": "MS-CST-E.vscode-devskim.findings",
"title": "Findings",
"properties": {
"MS-CST-E.vscode-devskim.findings.removeFindingsOnClose": {
"order": 0,
"type": "boolean",
"default": true,
"description": "By default, when a source file is closed the findings remain in the 'Problems' window. Setting this value to true will cause findings to be removed from 'Problems' when the document is closed. Note, setting this to true will cause findings that are listed when invoking the 'Scan all files in workspace' command to automatically clear away after a couple of minutes."
}
}
},
{
"order": 60,
"id": "MS-CST-E.vscode-devskim.triggers",
"title": "Triggers",
"properties": {
"MS-CST-E.vscode-devskim.triggers.scanOnOpen": {
"order": 0,
"type": "boolean",
"default": true,
"description": "Scan files on open."
},
"MS-CST-E.vscode-devskim.triggers.scanOnSave": {
"order": 1,
"type": "boolean",
"default": true,
"description": "Scan files on save."
},
"MS-CST-E.vscode-devskim.triggers.scanOnChange": {
"order": 2,
"type": "boolean",
"default": true,
"description": "Scan files on change."
}
}
},
{
"order": 70,
"id": "MS-CST-E.vscode-devskim.trace",
"title": "Trace",
"properties": {
"MS-CST-E.vscode-devskim.trace.server": {
"order": 0,
"scope": "window",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Enables debug trace communications between VS Code and the language server."
}
}
}
]
},
"extensionDependencies": [
"ms-dotnettools.vscode-dotnet-runtime"
],
"scripts": {
"clean": "npm run clean:net && npm run clean:out && npm run clean:modules && npm run clean:vsix",
"clean:net": "npx --quiet -y rimraf devskimBinaries",
"clean:out": "npx --quiet -y rimraf --glob **/out && npx --quiet -y rimraf --glob **/tsconfig.tsbuildinfo",
"clean:modules": "npx --quiet -y rimraf --glob **/node_modules",
"clean:vsix": "npx --quiet -y rimraf --glob *.vsix",
"net-setup": "dotnet publish -c Debug -f net8.0 ../DevSkim-DotNet/Microsoft.DevSkim.LanguageServer -o devskimBinaries",
"net-setup:release": "dotnet publish -c Release -f net8.0 ../DevSkim-DotNet/Microsoft.DevSkim.LanguageServer -o devskimBinaries",
"setup": "npm install && npm run net-setup",
"setup:release": "npm install && npm run net-setup:release",
"reset": "npm run clean && npm run setup",
"compile": "tsc -b",
"build": "npm run setup && npm run compile",
"watch": "tsc -b -w",
"lint": "eslint ./client --ext .ts,.tsx",
"postinstall": "cd client && npm install",
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./client/extension.ts --bundle --outfile=client/out/extension.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"pack-ext": "npm run pre-pack-clean && npm run setup:release && npm run compile && npm run set-version-and-pack",
"pack-ext:debug": "npm run pre-pack-clean && npm run setup && npm run compile && npm run set-version-and-pack",
"pre-pack-clean": "npm run clean:out && npm run clean:modules",
"set-version-and-pack": "npm run set-version && npm run do-pack && npm run reset-version",
"do-pack": "(npm run check-pre-release && npm run vsce-pack-pre) || npm run vsce-pack",
"set-version": "node ./scripts/setPackageVersion.js",
"reset-version": "node ./scripts/resetPackageVersion.js",
"check-pre-release": "node ./scripts/checkPreReleaseFlag.js",
"vsce-pack-pre": "vsce package --pre-release || echo 'Pre-Release build failed'",
"vsce-pack": "vsce package || echo 'Release build failed'",
"pipeline-pack": "npm install --global @microsoft/artifacts-npm-credprovider --registry https://pkgs.dev.azure.com/artifacts-public/23934c1b-a3b5-4b70-9dd3-d1bef4cc72a0/_packaging/AzureArtifacts/npm/registry/ && cp .npmrc.pipeline .npmrc && artifacts-npm-credprovider && npm run restore-net && npm run rewrite-registry:root && npm run rewrite-registry:client && npm run pack-ext",
"restore-net": "dotnet restore --configfile ../nuget.config ../DevSkim-Dotnet/Microsoft.DevSkim.LanguageServer",
"rewrite-registry:root": "node scripts/updatePackageLock.js ../package-lock.json https://pkgs.dev.azure.com/microsoft-sdl/General/_packaging/PublicRegistriesFeed/npm/registry/",
"rewrite-registry:client": "node scripts/updatePackageLock.js ../client/package-lock.json https://pkgs.dev.azure.com/microsoft-sdl/General/_packaging/PublicRegistriesFeed/npm/registry/"
},
"devDependencies": {
"@types/node": "^14.x",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"@vscode/vsce": "^3.7.1",
"esbuild": "^0.25.2",
"eslint": "^8.8.0",
"nerdbank-gitversioning": "^3.4.255",
"typescript": "^4.5.5"
}
}