如何通过jenkinsfile配置Checkmarx

问题描述 投票:1回答:1

我试图在以前通过全局配置的groovy文件读取checkmarx脚本时,通过Jenkins文件配置checkmarx。

这是我的jenkinsfile的外观

`stage('Code Scanning') {
      parallel {
        stage('Static Code Analysis') {
          steps {
            step([$class: 'CxScanBuilder',
                    comment: '',
                    credentialsId: '',
                    excludeFolders: '.helmignore, build, templates, javadocs, javadoc, 
                                   dist, node_modules, WMSRegistryReader.java, 
                                   BlowfishEncryptionStrategy.java, BlowfishUtils.java',
                    excludeOpenSourceFolders: '',
                    exclusionsSetting: 'global',
                    failBuildOnNewResults: false,
                    failBuildOnNewSeverity: 'MEDIUM',
                    filterPattern: '''!**/_cvs/**/*, !Checkmarx/Reports/*.*''',
                    fullScanCycle: 10,
                    groupId: '0de2e46c-8410-478a-85b9-b5dce83f8ecb',
                    includeOpenSourceFolders: '',
                    osaArchiveIncludePatterns: '*.zip, *.war, *.ear, *.tgz',
                    osaInstallBeforeScan: false,
                    password: '{}',
                    preset: '36',
                    projectName: "${APP_NAME}",
                    sastEnabled: true,
                    serverUrl: 'https://checkmarx.abc.com',
                    sourceEncoding: '1',
                    username: '',
                    vulnerabilityThresholdResult: 'FAILURE',
                    waitForResultsEnabled: true])
          }
        }
        stage('Open Source Compliance') {
          steps {
            blackduck([appName: "${APP_NAME}", appDomain: "${APP_DOMAIN}", branchName: 
            "master"])
          }
        }
      }
    }

`

但是构建正在考虑通过jenkins->进行全局配置,而不是服务jenkinsfile的配置设置

我的jenkinsfile中是否有语法问题,或者我在这里缺少什么?

jenkins checkmarx
1个回答
0
投票

找不到它的文档,但我已经设置了

exclusionsSetting: '',

代替

exclusionsSetting: 'global',

为了覆盖全局Checkmarx设置

© www.soinside.com 2019 - 2024. All rights reserved.