-
Notifications
You must be signed in to change notification settings - Fork 28
/
package.json
574 lines (574 loc) · 21.8 KB
/
package.json
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
{
"name": "snyk-vulnerability-scanner",
"//": "Changing display name requires change in general.ts",
"displayName": "Snyk Security",
"version": "0.0.0",
"description": "Easily find and fix issues in your code, open source dependencies, infrastructure as code configurations with fast and accurate scans.",
"icon": "media/images/readme/snyk_extension_icon.png",
"publisher": "snyk-security",
"homepage": "https://snyk.io",
"repository": {
"type": "git",
"url": "https://github.com/snyk/vscode-extension.git"
},
"bugs": {
"url": "https://support.snyk.io/"
},
"engines": {
"vscode": "^1.58.0"
},
"galleryBanner": {
"color": "#283e55",
"theme": "dark"
},
"categories": [
"Programming Languages",
"Linters",
"Other"
],
"keywords": [
"Code Analysis",
"JavaScript",
"Java",
"TypeScript",
"ts",
"Vue",
"Angular",
"React",
"Static Code Analysis",
"Code Quality",
"Python",
"Infrastructure as Code",
"IaC",
"Kubernetes",
"Terraform"
],
"activationEvents": [
"onWebviewPanel:snyk.views.suggestion.code",
"onWebviewPanel:snyk.views.suggestion.oss",
"*"
],
"main": "./out/extension.js",
"types": "./out/extension.d.ts",
"contributes": {
"configuration": [
{
"id": "snyk",
"title": "Snyk Security",
"properties": {}
},
{
"id": "account",
"title": "Snyk Account",
"order": 1,
"properties": {
"snyk.advanced.authenticationMethod": {
"type": "string",
"default": "OAuth2 authentication",
"description": "Specifies whether to authenticate with OAuth2 or with an API token. \n\nNote: OAuth2 authentication is recommended as it provides enhanced security.",
"enum": [
"OAuth2 authentication",
"Token authentication"
],
"enumDescriptions": [
"Uses the OAuth2 authentication",
"Uses the legacy Snyk Token authentication."
],
"markdownDescription": "Specifies whether to authenticate with OAuth2 or with an API token. \n\nNote: OAuth2 authentication is recommended as it provides enhanced security."
},
"snyk.advanced.tokenStorage": {
"type": "string",
"enum": [
"Always use VS Code's secret storage"
],
"default": "Always use VS Code's secret storage",
"markdownDescription": "Snyk uses VS Code's [secret storage](https://code.visualstudio.com/api/references/vscode-api#SecretStorage) to safely persist API token instead of saving it in plaintext in `settings.json`. To set the token manually, run the VS Code command [Snyk: Set Token](command:snyk.setToken)."
},
"snyk.advanced.customEndpoint": {
"type": "string",
"markdownDescription": "Sets API endpoint to use for Snyk requests. Useful for custom Snyk setups. E.g. `https://api.eu.snyk.io`.",
"scope": "window",
"pattern": "^(|(https?://)api.*.(snyk|snykgov).io)$"
},
"snyk.advanced.organization": {
"type": "string",
"markdownDescription": "Specifies an organization ID to run tests for that organization.\n\nRetrieve the organization ID from the organization settings in the Snyk UI: `https://app.snyk.io/org/[ORG_NAME]/manage/settings` and copy the ID from the **Organization ID** section.\n\nNote: If not specified, the preferred organization as defined in your [web account settings](https://app.snyk.io/account) is used to run tests.",
"scope": "window"
},
"snyk.yesCrashReport": {
"//": "Name starts with y to put it at the end, as configs are sorted alphbetically",
"type": "boolean",
"default": true,
"markdownDescription": "Send error reports to Snyk",
"scope": "application"
}
}
},
{
"id": "scan",
"title": "Scan Configuration",
"order": 2,
"properties": {
"snyk.features.openSourceSecurity": {
"order": 1,
"type": "boolean",
"title": "Snyk Open Source security issues",
"description": "Find and fix open source dependency issues.",
"default": true
},
"snyk.features.codeSecurity": {
"order": 2,
"type": "boolean",
"title": "Snyk Code security issues",
"description": "Find and fix security issues in your application code in real time.",
"default": true
},
"snyk.features.codeQuality": {
"order": 3,
"type": "boolean",
"title": "Snyk Code quality issues",
"description": "Find and fix quality issues in your application code in real time.",
"default": true
},
"snyk.features.infrastructureAsCode": {
"order": 4,
"type": "boolean",
"title": "Snyk Infrastructure as Code issues",
"description": "Find and fix your IaC misconfigurations.",
"default": true
},
"snyk.severity": {
"order": 5,
"type": "object",
"default": {
"critical": true,
"high": true,
"medium": true,
"low": true
},
"properties": {
"critical": {
"type": "boolean",
"default": true
},
"high": {
"type": "boolean",
"default": true
},
"medium": {
"type": "boolean",
"default": true
},
"low": {
"type": "boolean",
"default": true
}
},
"additionalProperties": false,
"description": "Severity issues to display.",
"scope": "window"
},
"snyk.allIssuesVsNetNewIssues": {
"type": "string",
"default": "All issues",
"description": "Specifies whether to see all issues or only net new issues. Net new issues option requires a Git repository, where it compares findings with those in the base branch.",
"enum": [
"All issues",
"Net new issues"
],
"enumDescriptions": [
"Shows all issues that have been identified, including both new and existing issues.",
"Shows only new issues filtering out previously known issues in a base branch"
],
"order": 6
},
"snyk.advanced.additionalParameters": {
"type": "string",
"description": "Parameters to pass to Snyk CLI for Open Source security tests.",
"scope": "window",
"order": 7
}
}
},
{
"id": "userExperience",
"title": "User Experience",
"order": 3,
"properties": {
"snyk.scanningMode": {
"order": 1,
"type": "string",
"enum": [
"auto",
"manual"
],
"enumDescriptions": [
"Scan automatically in the background.",
"Do not scan automatically, only scan when you run the `Snyk: Rescan` command."
],
"default": "auto",
"title": "Snyk Code scanning mode",
"description": "Choose whether to run Snyk Code scans in the background, or only when you run the `Snyk: Rescan` command."
},
"snyk.advanced.autoScanOpenSourceSecurity": {
"order": 2,
"type": "boolean",
"default": false,
"description": "Run Snyk Open Source Security analysis in automatic mode.",
"scope": "application"
},
"snyk.yesBackgroundOssNotification": {
"order": 3,
"//": "Name starts with y to put it at the end, as configs are sorted alphabetically",
"type": "boolean",
"default": true,
"markdownDescription": "Show scan notification for critical Open Source Security issues when Snyk view is hidden",
"scope": "application"
}
}
},
{
"id": "experimental",
"title": "Experimental",
"order": 4,
"properties": {
"snyk.issueViewOptions": {
"order": 1,
"type": "object",
"default": {
"openIssues": true,
"ignoredIssues": true
},
"properties": {
"openIssues": {
"type": "boolean",
"description": "Open Issues",
"default": true
},
"ignoredIssues": {
"type": "boolean",
"description": "Ignored Issues",
"default": true
}
},
"additionalProperties": false,
"markdownDescription": "Ignores settings is currently an experimental feature. Please reach out to [support.snyk.io](https://support.snyk.io) for more details.\n\nShow the following issues:",
"scope": "window"
},
"snyk.folderConfigs": {
"order": 2,
"type": "array",
"default": [],
"description": "Folder configuration for Snyk scans."
},
"snyk.features.preview": {
"order": 3,
"type": "object",
"default": {},
"title": "Preview feature toggles",
"description": "Preview features that are currently in development. Setting keys will be removed when features become stable.",
"propertyNames": true,
"properties": {}
}
}
},
{
"id": "initialization",
"title": "Initialization",
"order": 5,
"properties": {
"snyk.yesWelcomeNotification": {
"//": "Name starts with y to put it at the end, as configs are sorted alphabetically",
"type": "boolean",
"default": true,
"markdownDescription": "Show welcome notification after installation and restart",
"scope": "application"
},
"snyk.trustedFolders": {
"type": "array",
"default": [],
"description": "Folders to trust for Snyk scans."
}
}
},
{
"id": "cli",
"title": "CLI & Language Server",
"order": 6,
"properties": {
"snyk.advanced.automaticDependencyManagement": {
"order": 1,
"type": "boolean",
"default": true,
"scope": "machine",
"markdownDescription": "Snyk will download, install and update dependencies for you. If this option is disabled, make sure valid paths to the dependencies are provided."
},
"snyk.advanced.cliBaseDownloadUrl": {
"order": 2,
"type": "string",
"scope": "machine",
"default": "https://downloads.snyk.io",
"markdownDescription": "Base URL to download the CLI."
},
"snyk.advanced.cliReleaseChannel": {
"order": 3,
"type": "string",
"default": "stable",
"enum": [
"stable",
"rc",
"preview"
],
"markdownDescription": "CLI release channel."
},
"snyk.advanced.cliPath": {
"order": 4,
"type": "string",
"scope": "machine",
"markdownDescription": "Sets path to Snyk CLI extension dependency."
}
}
}
],
"viewsContainers": {
"activitybar": [
{
"id": "snyk",
"title": "Snyk",
"icon": "media/images/snyk_extension_icon_new.svg"
}
]
},
"views": {
"snyk": [
{
"id": "snyk.views.welcome",
"name": "Snyk",
"when": "!snyk:loggedIn || snyk:error || !snyk:workspaceFound || snyk:authenticationChanged"
},
{
"id": "snyk.views.analysis.oss",
"name": "Open Source Security",
"when": "snyk:initialized && snyk:loggedIn && snyk:workspaceFound && !snyk:error"
},
{
"id": "snyk.views.analysis.code.security",
"name": "Code Security",
"when": "snyk:initialized && snyk:loggedIn && snyk:codeEnabled && snyk:workspaceFound && !snyk:error"
},
{
"id": "snyk.views.analysis.configuration",
"name": "Configuration Issues",
"when": "snyk:initialized && snyk:loggedIn && snyk:workspaceFound && !snyk:error"
},
{
"id": "snyk.views.analysis.code.quality",
"name": "Code Quality",
"when": "snyk:initialized && snyk:loggedIn && snyk:codeEnabled && snyk:workspaceFound && !snyk:error"
},
{
"id": "snyk.views.analysis.code.enablement",
"name": "Code Security & Quality",
"when": "snyk:initialized && snyk:loggedIn && !snyk:codeEnabled && snyk:workspaceFound && !snyk:error"
},
{
"id": "snyk.views.support",
"name": "Help & feedback"
}
]
},
"viewsWelcome": [
{
"view": "snyk.views.welcome",
"contents": "Snyk has encountered a problem. Please restart the extension: \n[Restart](command:snyk.start 'Restart Snyk')\nIf the error persists, please check your [settings](command:snyk.settings) and [contact us](https://snyk.io/contact-us/?utm_source=vsc).\n\n You can check the logs to see the exact error in [Snyk Security](command:snyk.showOutputChannel) and [Snyk Language Server](command:snyk.showLsOutputChannel) output channels.\n[Display Error](command:snyk.showErrorFromContext)\n",
"when": "snyk:error"
},
{
"view": "snyk.views.welcome",
"contents": "👋 Welcome to Snyk for Visual Studio Code.\n⏱️ Please wait, the extension is loading...",
"when": "!snyk:error && !snyk:initialized"
},
{
"view": "snyk.views.welcome",
"contents": "👋 Let's secure your code! \nTo scan your project for issues, Snyk needs to:\n 1. Connect to your Snyk account: This allows us to securely analyse your code.\n2. Trust this workspace: This lets Snyk safely gather information about your project (like dependencies).\nYou should only scan projects you trust. [More info](https://docs.snyk.io/ide-tools/visual-studio-code-extension/workspace-trust)\nBy connecting your account with Snyk, you agree to the Snyk [Privacy Policy](https://snyk.io/policies/privacy), and the Snyk [Terms of Service](https://snyk.io/policies/terms-of-service).\n\n[Connect & Trust Workspace](command:snyk.initiateLogin 'Connect with Snyk')",
"when": "!snyk:error && snyk:initialized && !snyk:loggedIn && !snyk:authMethodChanged"
},
{
"view": "snyk.views.welcome",
"contents": "⚠️ Your authentication method has changed.\n\n👉 Please re-authenticate to continue using Snyk\n\nBy connecting your account with Snyk, you agree to the Snyk [Privacy Policy](https://snyk.io/policies/privacy), and the Snyk [Terms of Service](https://snyk.io/policies/terms-of-service).\n\n[Connect & Trust Workspace](command:snyk.initiateLogin 'Re-authenticate')",
"when": "!snyk:error && snyk:initialized && !snyk:loggedIn && snyk:authMethodChanged"
},
{
"view": "snyk.views.welcome",
"contents": "We are now redirecting you to our auth page, go ahead and log in. If a browser window doesn't open after a few seconds, please copy the url below and manually paste it in a browser.\n[Copy URL to clipboard](command:snyk.copyAuthLink 'Copy URL to clipboard')",
"when": "!snyk:error && snyk:initialized && !snyk:loggedIn && snyk:authenticating"
},
{
"view": "snyk.views.analysis.code.enablement",
"contents": "Thanks for connecting with Snyk. ✅\n 👉 You are almost set 🤗.\n[Enable Snyk Code and start analysing](command:snyk.enableCode 'Upload code to Snyk')\nIt looks like your organization's configuration is disabled, that's why you are seeing this message. You can easily enable it by pressing the above button and switching it on.\nWe apologize for the inconvenience and please [contact us](https://snyk.io/contact-us/?utm_source=vsc) if you have any other questions or concerns!"
},
{
"view": "snyk.views.welcome",
"contents": "Open a workspace or a folder in Visual Studio Code to start the analysis.",
"when": "!snyk:error && snyk:initialized && snyk:loggedIn && !snyk:workspaceFound"
}
],
"menus": {
"view/title": [
{
"command": "snyk.start",
"when": "view == 'snyk.views.analysis.code.security' || view == 'snyk.views.analysis.code.security.delta' || view == 'snyk.views.analysis.code.quality' || view == 'snyk.views.analysis.code.quality.delta' || view == 'snyk.views.analysis.oss' || view == 'snyk.views.analysis.configuration'",
"group": "navigation"
},
{
"command": "snyk.settings",
"when": "view == 'snyk.views.analysis.code.security' || view == 'snyk.views.analysis.code.security.delta' || view == 'snyk.views.analysis.code.quality' || view == 'snyk.views.analysis.code.quality.delta' || view == 'snyk.views.analysis.oss' || view == 'snyk.views.welcome' || view == 'snyk.views.analysis.configuration'",
"group": "navigation"
}
],
"commandPalette": [
{
"command": "snyk.login",
"when": "!snyk:loggedIn"
},
{
"command": "snyk.logout",
"when": "snyk:loggedIn"
},
{
"command": "snyk.dcignore",
"when": "!snyk:error && snyk:loggedIn && snyk:codeEnabled && snyk:workspaceFound"
}
]
},
"commands": [
{
"command": "snyk.start",
"title": "Rescan",
"category": "Snyk",
"icon": "$(run)"
},
{
"command": "snyk.settings",
"title": "Settings",
"category": "Snyk",
"icon": "$(gear)"
},
{
"command": "snyk.login",
"title": "Log In",
"category": "Snyk",
"icon": "$(sign-in)"
},
{
"command": "snyk.setToken",
"title": "Set Token",
"category": "Snyk",
"icon": "$(sign-in)"
},
{
"command": "snyk.logout",
"title": "Log Out",
"category": "Snyk",
"icon": "$(sign-out)"
},
{
"command": "snyk.dcignore",
"title": "Create dcignore File",
"category": "Snyk",
"icon": "$(new-file)"
},
{
"command": "snyk.showOutputChannel",
"title": "Show Output Channel",
"category": "Snyk"
},
{
"command": "snyk.showLsOutputChannel",
"title": "Show Language Server Output Channel",
"category": "Snyk"
},
{
"command": "snyk.clearPersistedCache",
"title": "Clear Persisted Cache",
"category": "Snyk"
}
]
},
"scripts": {
"vscode:prepublish": "tsc -p ./ && sass media --no-source-map",
"build": "npm run vscode:prepublish",
"clean": "rm -rf ./out",
"rebuild": "npm run clean && npm run build",
"watch": "tsc -watch -p ./",
"watch-resources": "sass media --no-source-map --watch",
"watch-all": "concurrently --kill-others 'npm run watch' 'npm run watch-resources'",
"pretest": "npm run rebuild",
"test:unit:single": "mocha --ui tdd --require ts-node/register",
"test:unit": "npm run rebuild && mocha --ui tdd -c 'out/test/unit/**/*.test.js'",
"test:unit:watch": "npm run rebuild && mocha --ui tdd -w -c 'out/test/unit/**/*.test.js'",
"test:integration": "npm run rebuild && node ./out/test/integration/runTest.js",
"lint": "npx eslint \"src/**/*.ts\"",
"lint:fix": "npx eslint --fix \"src/**/*.ts\"",
"vscode:uninstall": "node ./out/uninstall",
"patch-preview": "node ./scripts/patchPreview.js"
},
"devDependencies": {
"@amplitude/ampli": "^1.29.0",
"@types/babel__traverse": "^7.12.2",
"@types/diff": "^5.0.9",
"@types/find-package-json": "^1.2.2",
"@types/glob": "^8.1.0",
"@types/he": "^1.2.3",
"@types/lodash": "^4.17.0",
"@types/marked": "^6.0.0",
"@types/mocha": "^8.0.3",
"@types/needle": "^2.5.2",
"@types/node": "^18.19.26",
"@types/sinon": "^10.0.2",
"@types/uuid": "^8.3.0",
"@types/validate-npm-package-name": "^3.0.3",
"@types/vscode": "^1.58.0",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@vscode/test-electron": "^2.4.0",
"concurrently": "^7.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "10.1.0",
"prettier": "^2.6.1",
"sass": "^1.48.0",
"sinon": "^11.1.1",
"ts-node": "^10.7.0",
"typescript": "^5.4.3",
"vscode-test": "^1.4.0",
"yalc": "^1.0.0-pre.44"
},
"dependencies": {
"@amplitude/experiment-node-server": "^1.8.2",
"@babel/parser": "^7.23.9",
"@babel/traverse": "^7.23.9",
"@babel/types": "^7.23.9",
"@deepcode/dcignore": "^1.0.4",
"axios": "^1.7.4",
"diff": "^5.2.0",
"glob": "^9.3.5",
"he": "^1.2.0",
"htmlparser2": "^7.2.0",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.0",
"lodash": "^4.17.21",
"marked": "^11.2.0",
"needle": "^3.3.1",
"open": "^7.4.2",
"rxjs": "^7.8.1",
"string-argv": "^0.3.2",
"uuid": "^8.3.2",
"validate-npm-package-name": "^3.0.0",
"vscode-languageclient": "8.1.0",
"vscode-languageserver-textdocument": "^1.0.10"
}
}