forked from farestrad/LLM-Assisted-Secure-Coding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
218 lines (218 loc) · 6.01 KB
/
package.json
File metadata and controls
218 lines (218 loc) · 6.01 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
{
"name": "SafeScript",
"publisher": "SafeScript",
"displayName": "SafeScript",
"description": "Enhances VS Code with Code Llama for AI-powered code analysis and with custom security vulnerability detection.",
"version": "2.1.4",
"icon": "assets/SafeScript_logo.png",
"preview": false,
"galleryBanner.color": {
"color": "#21214c",
"theme": "dark"
},
"engines": {
"vscode": "^1.93.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:codeLlama.runCodeLlama",
"onCommand:extension.runSecurityAnalysis",
"onCommand:extension.analyzeHighlightedCode",
"onCommand:codeLlama.generateCode",
"onCommand:extension.acceptAISuggestion",
"onCommand:extension.rejectAISuggestion",
"onView:safescriptPanel",
"onCommand:extension.fetchCveDetails",
"onCommand:extension.safescript.showRightPanel",
"onCommand:extension.copySuggestion"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "extension.showGettingStartedPanel",
"title": "SafeScript: Show Getting Started Guide"
},
{
"command": "codeLlama.runCodeLlama",
"title": "Run Safescript"
},
{
"command": "extension.analyzeHighlightedCode",
"title": "Analyze Highlighted Code for Security Issues",
"category": "SafeScript"
},
{
"command": "extension.safescript.showRightPanel",
"title": "Show SafeScript Code Analysis and Improvement Panel"
},
{
"command": "codeLlama.generateCode",
"title": "Generate Code with Code Llama"
},
{
"command": "extension.copyToClipboard",
"title": "Copy Generated Code to Clipboard"
},
{
"command": "extension.acceptAISuggestion",
"title": "Accept AI Suggestion"
},
{
"command": "extension.rejectAISuggestion",
"title": "Reject AI Suggestion"
},
{
"command": "extension.fetchCveDetails",
"title": "Fetch CVE Details"
},
{
"command": "extension.acceptGeneratedCode",
"title": "Accept Code"
},
{
"command": "extension.copySuggestion",
"title": "Copy Suggestion"
},
{
"command": "extension.analyzeCodeFromRightPanel",
"title": "analyzeCodeFromRightPanel"
}
],
"keybindings": [
{
"command": "extension.showGettingStartedPanel",
"key": "ctrl+alt+m",
"when": "editorTextFocus"
},
{
"command": "codeLlama.runCodeLlama",
"key": "ctrl+alt+l",
"when": "editorTextFocus"
},
{
"command": "extension.runSecurityAnalysis",
"key": "ctrl+alt+r",
"when": "editorTextFocus"
},
{
"command": "extension.analyzeHighlightedCode",
"key": "ctrl+alt+h",
"when": "editorTextFocus && editorHasSelection"
},
{
"command": "codeLlama.generateCode",
"key": "ctrl+alt+g",
"when": "editorTextFocus"
},
{
"command": "extension.fetchCveDetails",
"key": "ctrl+alt+c",
"when": "editorTextFocus"
},
{
"command": "extension.safescript.showRightPanel",
"key": "ctrl+alt+p",
"when": "editorTextFocus"
},
{
"command": "extension.copyToClipboard",
"key": "ctrl+alt+y",
"when": "editorTextFocus"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "safescript",
"title": "SafeScript",
"icon": "assets/SafeScript_logo_Enlarged.png"
}
]
},
"views": {
"safescript": [
{
"id": "securityAnalysisView",
"name": "Security Analysis"
},
{
"id": "aiSuggestionHistoryView",
"name": "AI Suggestions History"
}
]
},
"menus": {
"view/item/context": [
{
"command": "extension.copySuggestion",
"when": "view == aiSuggestionHistoryView && viewItem == suggestion",
"group": "inline"
}
]
},
"configuration": {
"type": "object",
"title": "Code Llama Integration Settings",
"properties": {
"codeLlama.apiUrl": {
"type": "string",
"default": "http://34.72.188.73:11434/api/generate",
"description": "The base URL for the Code Llama API"
},
"codeLlama.cveApiUrl": {
"type": "string",
"default": "https://cveawg.mitre.org/api/cve",
"description": "The base URL for the CVE database API"
},
"codeLlama.maxCveResults": {
"type": "number",
"default": 10,
"description": "The maximum number of CVE results to fetch"
}
}
}
},
"scripts": {
"build": "webpack --mode development",
"build:prod": "webpack --mode production",
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "npm run compile-tests && npm run compile && npm run lint",
"lint": "eslint src",
"test": "jest",
"clean": "rm -rf dist"
},
"devDependencies": {
"@types/amplitude-js": "^8.16.5",
"@types/jest": "^29.5.14",
"@types/node": "20.x",
"@types/node-fetch": "^2.6.11",
"@types/vscode": "^1.93.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"eslint": "^9.9.1",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.1",
"typescript": "^5.5.4",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"@amplitude/node": "^1.10.2",
"axios": "^1.7.9",
"dotenv": "^16.4.7",
"node-fetch": "^2.7.0",
"tree-sitter": "^0.22.4",
"tree-sitter-c": "^0.23.4"
}
}