@convisoappsec/mcp 0.3.1 → 0.6.0

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.
@@ -1,80 +0,0 @@
1
- import 'dotenv/config';
2
- import { GraphQLClient } from './graphql_client.js';
3
-
4
- class FeedGateway {
5
- constructor(graphql_api_key = '') {
6
- this.base_url = 'https://app.convisoappsec.com';
7
- const apiKey = process.env.CONVISO_API_KEY || graphql_api_key || '';
8
- this.graphql = new GraphQLClient(`${this.base_url}/graphql`, apiKey);
9
- }
10
-
11
- async get_companies(page = 1, limit = 10, search = '') {
12
- return this.graphql.get_companies(page, limit, search);
13
- }
14
-
15
- async get_company_by_id(company_id) {
16
- return this.graphql.get_company_by_id(company_id);
17
- }
18
-
19
- async get_issue_by_id(issue_id, return_snippets = false) {
20
- return this.graphql.get_issue_by_id(issue_id, return_snippets);
21
- }
22
-
23
- async get_issues(company_id, search = '', page = 1, limit = 1, project_id = null) {
24
- return this.graphql.get_issues(company_id, search, page, limit, project_id);
25
- }
26
-
27
- async get_issue_with_company_id(company_id, issue_id) {
28
- return this.graphql.get_issues(company_id, '', 1, 5, null, [issue_id]);
29
- }
30
-
31
- async get_issues_by_asset_ids(company_id, page = 1, limit = 1, asset_ids = []) {
32
- return this.graphql.get_issues(company_id, '', page, limit, null, [], asset_ids);
33
- }
34
-
35
- async get_projects(company_id, page = 1, limit = 1000, search = '') {
36
- return this.graphql.get_projects(company_id, page, limit, search);
37
- }
38
-
39
- async get_project_by_id(project_id) {
40
- return this.graphql.get_project_by_id(project_id);
41
- }
42
-
43
- async get_assets(company_id, page = 1, limit = 1000) {
44
- return this.graphql.get_assets_by_company(company_id, page, limit);
45
- }
46
-
47
- async get_asset_by_id(asset_id) {
48
- return this.graphql.get_asset_by_id(asset_id);
49
- }
50
-
51
- async get_top_vulnerabilities(company_id) {
52
- return this.graphql.get_top_vulnerabilities(company_id);
53
- }
54
-
55
- async generate_project_report(project_id, language = 'en', vulnerability_criticity = null, vulnerability_statuses = null, requirements = true, evidences = true) {
56
- return this.graphql.generate_project_report(project_id, language, vulnerability_criticity, vulnerability_statuses, requirements, evidences);
57
- }
58
-
59
- async generate_project_report_progress(project_id, report_id) {
60
- return this.graphql.generate_project_report_progress(project_id, report_id);
61
- }
62
-
63
- create_project_url(company_id, project_id) {
64
- return `${this.base_url}/spa/company/${company_id}/projects/${project_id}`;
65
- }
66
-
67
- create_issue_url(company_id, issue_id) {
68
- return `${this.base_url}/spa/company/${company_id}/vulnerabilities?title=&search=${issue_id}`;
69
- }
70
-
71
- async get_mttr_over_time(company_id, start_date, end_date, severities = null, statuses = null, asset_ids = null, asset_tags = null) {
72
- return this.graphql.get_mttr_over_time(company_id, start_date, end_date, severities, statuses, asset_ids, asset_tags);
73
- }
74
-
75
- async get_overall_risk_score_history(company_id) {
76
- return this.graphql.get_overall_risk_score_history(company_id);
77
- }
78
- }
79
-
80
- export { FeedGateway };