IBM/scc-node-sdk

View on GitHub

Showing 50 of 159 total issues

File v3.ts has 3368 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
Severity: Major
Found in security-and-compliance-center-api/v3.ts - About 1 wk to fix

    File security-and-compliance-center-api.v3.test.js has 1230 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @jest-environment node
     */
    /**
     * (C) Copyright IBM Corp. 2023.
    Severity: Major
    Found in examples/security-and-compliance-center-api.v3.test.js - About 3 days to fix

      SecurityAndComplianceCenterApiV3 has 47 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class SecurityAndComplianceCenterApiV3 extends BaseService {
        static DEFAULT_SERVICE_URL: string = 'https://us-south.compliance.cloud.ibm.com/instances/instance_id/v3';
      
        static DEFAULT_SERVICE_NAME: string = 'security_and_compliance_center_api';
      
      
      Severity: Minor
      Found in security-and-compliance-center-api/v3.ts - About 6 hrs to fix

        Function replaceProfileAttachment has 57 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          public replaceProfileAttachment(
            params: SecurityAndComplianceCenterApiV3.ReplaceProfileAttachmentParams
          ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentItem>> {
            const _params = { ...params };
            const _requiredParams = ['attachmentId', 'profilesId'];
        Severity: Major
        Found in security-and-compliance-center-api/v3.ts - About 2 hrs to fix

          Function replaceCustomControlLibrary has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            public replaceCustomControlLibrary(
              params: SecurityAndComplianceCenterApiV3.ReplaceCustomControlLibraryParams
            ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibrary>> {
              const _params = { ...params };
              const _requiredParams = ['controlLibrariesId'];
          Severity: Major
          Found in security-and-compliance-center-api/v3.ts - About 2 hrs to fix

            Function replaceRule has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              public replaceRule(
                params: SecurityAndComplianceCenterApiV3.ReplaceRuleParams
              ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Rule>> {
                const _params = { ...params };
                const _requiredParams = ['ruleId', 'ifMatch', 'description', 'target', 'requiredConfig'];
            Severity: Minor
            Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

              Function listReportResources has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                public listReportResources(
                  params: SecurityAndComplianceCenterApiV3.ListReportResourcesParams
                ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ResourcePage>> {
                  const _params = { ...params };
                  const _requiredParams = ['reportId'];
              Severity: Minor
              Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                Function listReportEvaluations has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  public listReportEvaluations(
                    params: SecurityAndComplianceCenterApiV3.ListReportEvaluationsParams
                  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.EvaluationPage>> {
                    const _params = { ...params };
                    const _requiredParams = ['reportId'];
                Severity: Minor
                Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                  Function replaceProfile has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    public replaceProfile(
                      params: SecurityAndComplianceCenterApiV3.ReplaceProfileParams
                    ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
                      const _params = { ...params };
                      const _requiredParams = ['profilesId', 'profileName', 'profileDescription', 'profileType', 'controls', 'defaultParameters'];
                  Severity: Minor
                  Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                    Function getReportControls has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      public getReportControls(
                        params: SecurityAndComplianceCenterApiV3.GetReportControlsParams
                      ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportControls>> {
                        const _params = { ...params };
                        const _requiredParams = ['reportId'];
                    Severity: Minor
                    Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                      Function createCustomControlLibrary has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        public createCustomControlLibrary(
                          params: SecurityAndComplianceCenterApiV3.CreateCustomControlLibraryParams
                        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibrary>> {
                          const _params = { ...params };
                          const _requiredParams = ['controlLibraryName', 'controlLibraryDescription', 'controlLibraryType', 'controls'];
                      Severity: Minor
                      Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                        Function updateProviderTypeInstance has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          public updateProviderTypeInstance(
                            params: SecurityAndComplianceCenterApiV3.UpdateProviderTypeInstanceParams
                          ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
                            const _params = { ...params };
                            const _requiredParams = ['providerTypeId', 'providerTypeInstanceId'];
                        Severity: Minor
                        Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                          Function createRule has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            public createRule(
                              params: SecurityAndComplianceCenterApiV3.CreateRuleParams
                            ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Rule>> {
                              const _params = { ...params };
                              const _requiredParams = ['description', 'target', 'requiredConfig'];
                          Severity: Minor
                          Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                            Function createProviderTypeInstance has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              public createProviderTypeInstance(
                                params: SecurityAndComplianceCenterApiV3.CreateProviderTypeInstanceParams
                              ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
                                const _params = { ...params };
                                const _requiredParams = ['providerTypeId'];
                            Severity: Minor
                            Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                              Function listReports has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                public listReports(
                                  params?: SecurityAndComplianceCenterApiV3.ListReportsParams
                                ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportPage>> {
                                  const _params = { ...params };
                                  const _requiredParams = [];
                              Severity: Minor
                              Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                                Function createAttachment has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  public createAttachment(
                                    params: SecurityAndComplianceCenterApiV3.CreateAttachmentParams
                                  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentPrototype>> {
                                    const _params = { ...params };
                                    const _requiredParams = ['profilesId', 'attachments'];
                                Severity: Minor
                                Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                                  Function listAttachments has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    public listAttachments(
                                      params: SecurityAndComplianceCenterApiV3.ListAttachmentsParams
                                    ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentCollection>> {
                                      const _params = { ...params };
                                      const _requiredParams = ['profilesId'];
                                  Severity: Minor
                                  Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                                    Function getReportEvaluation has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      public getReportEvaluation(
                                        params: SecurityAndComplianceCenterApiV3.GetReportEvaluationParams
                                      ): Promise<SecurityAndComplianceCenterApiV3.Response<NodeJS.ReadableStream>> {
                                        const _params = { ...params };
                                        const _requiredParams = ['reportId'];
                                    Severity: Minor
                                    Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                                      Function createProfile has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        public createProfile(
                                          params: SecurityAndComplianceCenterApiV3.CreateProfileParams
                                        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
                                          const _params = { ...params };
                                          const _requiredParams = ['profileName', 'profileDescription', 'profileType', 'controls', 'defaultParameters'];
                                      Severity: Minor
                                      Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                                        Function getReportViolationsDrift has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          public getReportViolationsDrift(
                                            params: SecurityAndComplianceCenterApiV3.GetReportViolationsDriftParams
                                          ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportViolationsDrift>> {
                                            const _params = { ...params };
                                            const _requiredParams = ['reportId'];
                                        Severity: Minor
                                        Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language