@ldraney/github-mcp 0.1.0 → 0.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/index.js +8 -2
  2. package/dist/prompts/activity-summary.d.ts +10 -0
  3. package/dist/prompts/activity-summary.js +154 -0
  4. package/dist/prompts/code-review.d.ts +9 -0
  5. package/dist/prompts/code-review.js +145 -0
  6. package/dist/prompts/issue-triage.d.ts +9 -0
  7. package/dist/prompts/issue-triage.js +202 -0
  8. package/dist/prompts/release-notes.d.ts +9 -0
  9. package/dist/prompts/release-notes.js +236 -0
  10. package/dist/server.d.ts +8 -1
  11. package/dist/server.js +36 -210
  12. package/dist/tools/categories/actions.d.ts +2 -5
  13. package/dist/tools/categories/actions.js +640 -369
  14. package/dist/tools/categories/activity.d.ts +2 -0
  15. package/dist/tools/categories/activity.js +534 -0
  16. package/dist/tools/categories/apps.d.ts +2 -0
  17. package/dist/tools/categories/apps.js +224 -0
  18. package/dist/tools/categories/billing.d.ts +2 -0
  19. package/dist/tools/categories/billing.js +145 -0
  20. package/dist/tools/categories/checks.d.ts +2 -0
  21. package/dist/tools/categories/checks.js +554 -0
  22. package/dist/tools/categories/codeScanning.d.ts +2 -0
  23. package/dist/tools/categories/codeScanning.js +375 -0
  24. package/dist/tools/categories/codeSecurity.d.ts +2 -0
  25. package/dist/tools/categories/codeSecurity.js +463 -0
  26. package/dist/tools/categories/codesOfConduct.d.ts +2 -0
  27. package/dist/tools/categories/codesOfConduct.js +45 -0
  28. package/dist/tools/categories/codespaces.d.ts +2 -0
  29. package/dist/tools/categories/codespaces.js +259 -0
  30. package/dist/tools/categories/copilot.d.ts +2 -0
  31. package/dist/tools/categories/copilot.js +187 -0
  32. package/dist/tools/categories/dependabot.d.ts +2 -0
  33. package/dist/tools/categories/dependabot.js +454 -0
  34. package/dist/tools/categories/emojis.d.ts +2 -0
  35. package/dist/tools/categories/emojis.js +22 -0
  36. package/dist/tools/categories/gists.d.ts +2 -5
  37. package/dist/tools/categories/gists.js +474 -285
  38. package/dist/tools/categories/git.d.ts +2 -0
  39. package/dist/tools/categories/git.js +520 -0
  40. package/dist/tools/categories/gitignore.d.ts +2 -0
  41. package/dist/tools/categories/gitignore.js +45 -0
  42. package/dist/tools/categories/index.d.ts +33 -0
  43. package/dist/tools/categories/index.js +33 -0
  44. package/dist/tools/categories/interactions.d.ts +2 -0
  45. package/dist/tools/categories/interactions.js +184 -0
  46. package/dist/tools/categories/issues.d.ts +2 -5
  47. package/dist/tools/categories/issues.js +692 -390
  48. package/dist/tools/categories/licenses.d.ts +2 -0
  49. package/dist/tools/categories/licenses.js +95 -0
  50. package/dist/tools/categories/markdown.d.ts +2 -0
  51. package/dist/tools/categories/markdown.js +64 -0
  52. package/dist/tools/categories/meta.d.ts +2 -0
  53. package/dist/tools/categories/meta.js +74 -0
  54. package/dist/tools/categories/migrations.d.ts +2 -0
  55. package/dist/tools/categories/migrations.js +290 -0
  56. package/dist/tools/categories/orgs.d.ts +2 -5
  57. package/dist/tools/categories/orgs.js +585 -417
  58. package/dist/tools/categories/packages.d.ts +2 -0
  59. package/dist/tools/categories/packages.js +918 -0
  60. package/dist/tools/categories/projects.d.ts +2 -0
  61. package/dist/tools/categories/projects.js +692 -0
  62. package/dist/tools/categories/pulls.d.ts +2 -5
  63. package/dist/tools/categories/pulls.js +715 -332
  64. package/dist/tools/categories/rateLimit.d.ts +2 -0
  65. package/dist/tools/categories/rateLimit.js +22 -0
  66. package/dist/tools/categories/reactions.d.ts +2 -0
  67. package/dist/tools/categories/reactions.js +385 -0
  68. package/dist/tools/categories/repos.d.ts +2 -5
  69. package/dist/tools/categories/repos.js +844 -366
  70. package/dist/tools/categories/search.d.ts +2 -5
  71. package/dist/tools/categories/search.js +294 -196
  72. package/dist/tools/categories/secretScanning.d.ts +2 -0
  73. package/dist/tools/categories/secretScanning.js +324 -0
  74. package/dist/tools/categories/securityAdvisories.d.ts +2 -0
  75. package/dist/tools/categories/securityAdvisories.js +407 -0
  76. package/dist/tools/categories/teams.d.ts +2 -0
  77. package/dist/tools/categories/teams.js +614 -0
  78. package/dist/tools/categories/users.d.ts +2 -5
  79. package/dist/tools/categories/users.js +474 -247
  80. package/dist/tools/generator.d.ts +35 -15
  81. package/dist/tools/generator.js +113 -57
  82. package/dist/tools/types.d.ts +63 -0
  83. package/dist/tools/types.js +17 -0
  84. package/package.json +1 -1
@@ -0,0 +1,407 @@
1
+ import { successResult } from '../types.js';
2
+ export const securityAdvisoriesCategory = {
3
+ name: 'securityAdvisories',
4
+ description: 'Security advisories tools',
5
+ tools: [
6
+ // list_global_advisories - List global security advisories
7
+ {
8
+ definition: {
9
+ name: 'github_securityAdvisories_list_global_advisories',
10
+ description: 'List global security advisories from the GitHub Advisory Database',
11
+ inputSchema: {
12
+ type: 'object',
13
+ properties: {
14
+ ghsa_id: {
15
+ type: 'string',
16
+ description: 'Filter by GitHub Security Advisory ID (e.g., GHSA-xxxx-xxxx-xxxx)',
17
+ },
18
+ cve_id: {
19
+ type: 'string',
20
+ description: 'Filter by CVE ID (e.g., CVE-2021-44228)',
21
+ },
22
+ ecosystem: {
23
+ type: 'string',
24
+ description: 'Filter by ecosystem (e.g., npm, pip, maven, nuget, rubygems, go, rust, pub, erlang, actions, composer, swift)',
25
+ },
26
+ severity: {
27
+ type: 'string',
28
+ enum: ['unknown', 'low', 'medium', 'high', 'critical'],
29
+ description: 'Filter by severity level',
30
+ },
31
+ cwes: {
32
+ type: 'array',
33
+ items: { type: 'string' },
34
+ description: 'Filter by CWE IDs (e.g., CWE-79)',
35
+ },
36
+ is_withdrawn: {
37
+ type: 'string',
38
+ enum: ['true', 'false'],
39
+ description: 'Filter by whether the advisory has been withdrawn',
40
+ },
41
+ affects: {
42
+ type: 'array',
43
+ items: { type: 'string' },
44
+ description: 'Filter by package names that the advisory affects',
45
+ },
46
+ published: {
47
+ type: 'string',
48
+ description: 'Filter by published date range (e.g., 2021-01-01..2021-12-31)',
49
+ },
50
+ updated: {
51
+ type: 'string',
52
+ description: 'Filter by updated date range (e.g., 2021-01-01..2021-12-31)',
53
+ },
54
+ modified: {
55
+ type: 'string',
56
+ description: 'Filter by modified date range (ISO 8601 format)',
57
+ },
58
+ before: {
59
+ type: 'string',
60
+ description: 'Cursor for pagination (before this advisory)',
61
+ },
62
+ after: {
63
+ type: 'string',
64
+ description: 'Cursor for pagination (after this advisory)',
65
+ },
66
+ type: {
67
+ type: 'string',
68
+ enum: ['reviewed', 'malware', 'unreviewed'],
69
+ description: 'Filter by advisory type',
70
+ },
71
+ direction: {
72
+ type: 'string',
73
+ enum: ['asc', 'desc'],
74
+ description: 'Sort direction',
75
+ },
76
+ per_page: {
77
+ type: 'number',
78
+ description: 'Results per page (max 100)',
79
+ },
80
+ sort: {
81
+ type: 'string',
82
+ enum: ['updated', 'published'],
83
+ description: 'Sort by field',
84
+ },
85
+ },
86
+ },
87
+ },
88
+ handler: async (octokit, args) => {
89
+ const { data } = await octokit.securityAdvisories.listGlobalAdvisories({
90
+ ghsa_id: args.ghsa_id,
91
+ cve_id: args.cve_id,
92
+ ecosystem: args.ecosystem,
93
+ severity: args.severity,
94
+ cwes: args.cwes,
95
+ is_withdrawn: args.is_withdrawn === 'true' ? true : args.is_withdrawn === 'false' ? false : undefined,
96
+ affects: args.affects,
97
+ published: args.published,
98
+ updated: args.updated,
99
+ modified: args.modified,
100
+ before: args.before,
101
+ after: args.after,
102
+ type: args.type,
103
+ direction: args.direction,
104
+ per_page: args.per_page,
105
+ sort: args.sort,
106
+ });
107
+ return successResult(data);
108
+ },
109
+ },
110
+ // get_global_advisory - Get a global security advisory
111
+ {
112
+ definition: {
113
+ name: 'github_securityAdvisories_get_global_advisory',
114
+ description: 'Get a global security advisory by its GHSA ID',
115
+ inputSchema: {
116
+ type: 'object',
117
+ properties: {
118
+ ghsa_id: {
119
+ type: 'string',
120
+ description: 'The GitHub Security Advisory ID (e.g., GHSA-xxxx-xxxx-xxxx)',
121
+ },
122
+ },
123
+ required: ['ghsa_id'],
124
+ },
125
+ },
126
+ handler: async (octokit, args) => {
127
+ const { data } = await octokit.securityAdvisories.getGlobalAdvisory({
128
+ ghsa_id: args.ghsa_id,
129
+ });
130
+ return successResult(data);
131
+ },
132
+ },
133
+ // list_repository_advisories - List repository security advisories
134
+ {
135
+ definition: {
136
+ name: 'github_securityAdvisories_list_repository_advisories',
137
+ description: 'List security advisories for a repository',
138
+ inputSchema: {
139
+ type: 'object',
140
+ properties: {
141
+ owner: {
142
+ type: 'string',
143
+ description: 'Repository owner (username or organization)',
144
+ },
145
+ repo: {
146
+ type: 'string',
147
+ description: 'Repository name',
148
+ },
149
+ state: {
150
+ type: 'string',
151
+ enum: ['triage', 'draft', 'published', 'closed'],
152
+ description: 'Filter by advisory state',
153
+ },
154
+ severity: {
155
+ type: 'string',
156
+ enum: ['unknown', 'low', 'medium', 'high', 'critical'],
157
+ description: 'Filter by severity level',
158
+ },
159
+ direction: {
160
+ type: 'string',
161
+ enum: ['asc', 'desc'],
162
+ description: 'Sort direction',
163
+ },
164
+ sort: {
165
+ type: 'string',
166
+ enum: ['created', 'updated', 'published'],
167
+ description: 'Sort by field',
168
+ },
169
+ before: {
170
+ type: 'string',
171
+ description: 'Cursor for pagination (before this advisory)',
172
+ },
173
+ after: {
174
+ type: 'string',
175
+ description: 'Cursor for pagination (after this advisory)',
176
+ },
177
+ per_page: {
178
+ type: 'number',
179
+ description: 'Results per page (max 100)',
180
+ },
181
+ },
182
+ required: ['owner', 'repo'],
183
+ },
184
+ },
185
+ handler: async (octokit, args) => {
186
+ const { data } = await octokit.securityAdvisories.listRepositoryAdvisories({
187
+ owner: args.owner,
188
+ repo: args.repo,
189
+ state: args.state,
190
+ severity: args.severity,
191
+ direction: args.direction,
192
+ sort: args.sort,
193
+ before: args.before,
194
+ after: args.after,
195
+ per_page: args.per_page,
196
+ });
197
+ return successResult(data);
198
+ },
199
+ },
200
+ // get_repository_advisory - Get a repository security advisory
201
+ {
202
+ definition: {
203
+ name: 'github_securityAdvisories_get_repository_advisory',
204
+ description: 'Get a repository security advisory by its GHSA ID',
205
+ inputSchema: {
206
+ type: 'object',
207
+ properties: {
208
+ owner: {
209
+ type: 'string',
210
+ description: 'Repository owner (username or organization)',
211
+ },
212
+ repo: {
213
+ type: 'string',
214
+ description: 'Repository name',
215
+ },
216
+ ghsa_id: {
217
+ type: 'string',
218
+ description: 'The GitHub Security Advisory ID (e.g., GHSA-xxxx-xxxx-xxxx)',
219
+ },
220
+ },
221
+ required: ['owner', 'repo', 'ghsa_id'],
222
+ },
223
+ },
224
+ handler: async (octokit, args) => {
225
+ const { data } = await octokit.securityAdvisories.getRepositoryAdvisory({
226
+ owner: args.owner,
227
+ repo: args.repo,
228
+ ghsa_id: args.ghsa_id,
229
+ });
230
+ return successResult(data);
231
+ },
232
+ },
233
+ // create_repository_advisory - Create a repository security advisory
234
+ {
235
+ definition: {
236
+ name: 'github_securityAdvisories_create_repository_advisory',
237
+ description: 'Create a new security advisory for a repository',
238
+ inputSchema: {
239
+ type: 'object',
240
+ properties: {
241
+ owner: {
242
+ type: 'string',
243
+ description: 'Repository owner (username or organization)',
244
+ },
245
+ repo: {
246
+ type: 'string',
247
+ description: 'Repository name',
248
+ },
249
+ summary: {
250
+ type: 'string',
251
+ description: 'A short summary of the advisory (required)',
252
+ },
253
+ description: {
254
+ type: 'string',
255
+ description: 'A detailed description of the vulnerability',
256
+ },
257
+ cve_id: {
258
+ type: 'string',
259
+ description: 'The CVE ID if known (e.g., CVE-2021-44228)',
260
+ },
261
+ vulnerabilities: {
262
+ type: 'array',
263
+ items: { type: 'object' },
264
+ description: 'Array of vulnerability objects with package, ecosystem, and vulnerable_version_range',
265
+ },
266
+ cwe_ids: {
267
+ type: 'array',
268
+ items: { type: 'string' },
269
+ description: 'CWE IDs (e.g., ["CWE-79", "CWE-89"])',
270
+ },
271
+ credits: {
272
+ type: 'array',
273
+ items: { type: 'object' },
274
+ description: 'Array of credit objects with login and type',
275
+ },
276
+ severity: {
277
+ type: 'string',
278
+ enum: ['critical', 'high', 'medium', 'low'],
279
+ description: 'Severity level of the vulnerability',
280
+ },
281
+ cvss_vector_string: {
282
+ type: 'string',
283
+ description: 'CVSS vector string (e.g., CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)',
284
+ },
285
+ start_private_fork: {
286
+ type: 'string',
287
+ enum: ['true', 'false'],
288
+ description: 'Whether to start a private fork for collaboration on a fix',
289
+ },
290
+ },
291
+ required: ['owner', 'repo', 'summary', 'vulnerabilities'],
292
+ },
293
+ },
294
+ handler: async (octokit, args) => {
295
+ const { data } = await octokit.securityAdvisories.createRepositoryAdvisory({
296
+ owner: args.owner,
297
+ repo: args.repo,
298
+ summary: args.summary,
299
+ description: args.description ?? '',
300
+ cve_id: args.cve_id,
301
+ vulnerabilities: args.vulnerabilities,
302
+ cwe_ids: args.cwe_ids,
303
+ credits: args.credits,
304
+ severity: args.severity,
305
+ cvss_vector_string: args.cvss_vector_string,
306
+ start_private_fork: args.start_private_fork === 'true',
307
+ });
308
+ return successResult(data);
309
+ },
310
+ },
311
+ // update_repository_advisory - Update a repository security advisory
312
+ {
313
+ definition: {
314
+ name: 'github_securityAdvisories_update_repository_advisory',
315
+ description: 'Update a repository security advisory',
316
+ inputSchema: {
317
+ type: 'object',
318
+ properties: {
319
+ owner: {
320
+ type: 'string',
321
+ description: 'Repository owner (username or organization)',
322
+ },
323
+ repo: {
324
+ type: 'string',
325
+ description: 'Repository name',
326
+ },
327
+ ghsa_id: {
328
+ type: 'string',
329
+ description: 'The GitHub Security Advisory ID (e.g., GHSA-xxxx-xxxx-xxxx)',
330
+ },
331
+ summary: {
332
+ type: 'string',
333
+ description: 'A short summary of the advisory',
334
+ },
335
+ description: {
336
+ type: 'string',
337
+ description: 'A detailed description of the vulnerability',
338
+ },
339
+ cve_id: {
340
+ type: 'string',
341
+ description: 'The CVE ID if known (e.g., CVE-2021-44228)',
342
+ },
343
+ vulnerabilities: {
344
+ type: 'array',
345
+ items: { type: 'object' },
346
+ description: 'Array of vulnerability objects with package, ecosystem, and vulnerable_version_range',
347
+ },
348
+ cwe_ids: {
349
+ type: 'array',
350
+ items: { type: 'string' },
351
+ description: 'CWE IDs (e.g., ["CWE-79", "CWE-89"])',
352
+ },
353
+ credits: {
354
+ type: 'array',
355
+ items: { type: 'object' },
356
+ description: 'Array of credit objects with login and type',
357
+ },
358
+ severity: {
359
+ type: 'string',
360
+ enum: ['critical', 'high', 'medium', 'low'],
361
+ description: 'Severity level of the vulnerability',
362
+ },
363
+ cvss_vector_string: {
364
+ type: 'string',
365
+ description: 'CVSS vector string (e.g., CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)',
366
+ },
367
+ state: {
368
+ type: 'string',
369
+ enum: ['published', 'closed', 'draft'],
370
+ description: 'State of the advisory',
371
+ },
372
+ collaborating_users: {
373
+ type: 'array',
374
+ items: { type: 'string' },
375
+ description: 'GitHub usernames of users to collaborate on the advisory',
376
+ },
377
+ collaborating_teams: {
378
+ type: 'array',
379
+ items: { type: 'string' },
380
+ description: 'Team slugs for teams to collaborate on the advisory',
381
+ },
382
+ },
383
+ required: ['owner', 'repo', 'ghsa_id'],
384
+ },
385
+ },
386
+ handler: async (octokit, args) => {
387
+ const { data } = await octokit.securityAdvisories.updateRepositoryAdvisory({
388
+ owner: args.owner,
389
+ repo: args.repo,
390
+ ghsa_id: args.ghsa_id,
391
+ summary: args.summary,
392
+ description: args.description,
393
+ cve_id: args.cve_id,
394
+ vulnerabilities: args.vulnerabilities,
395
+ cwe_ids: args.cwe_ids,
396
+ credits: args.credits,
397
+ severity: args.severity,
398
+ cvss_vector_string: args.cvss_vector_string,
399
+ state: args.state,
400
+ collaborating_users: args.collaborating_users,
401
+ collaborating_teams: args.collaborating_teams,
402
+ });
403
+ return successResult(data);
404
+ },
405
+ },
406
+ ],
407
+ };
@@ -0,0 +1,2 @@
1
+ import type { ToolCategory } from '../types.js';
2
+ export declare const teamsCategory: ToolCategory;