MENU

Docker安装SonarQube并配置阿里P3C规范

September 15, 2021 • 博文

Docker安装SonarQube并配置阿里P3C规范

SonarQube Mysql安装

  • 安装
docker run -itd --restart=always -p 17007:3306 -e MYSQL_ROOT_PASSWORD=sonarQube@2020 -v sonarqube-mysql-conf:/etc/mysql/conf.d -v sonarqube-mysql-data:/var/lib/mysq --name sonarqube-mysql mysql:5.7
  • 配置mysql

mysql.cnf添加

[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
max_allowed_packet=100M
innodb_log_file_size=640M
  • 初始化

登录mysql执行如下sql:



CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';  
FLUSH PRIVILEGES;

SonarQube 安装

配置主机内核参数(大于等于以下值即可)

sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 4096

安装SonarQube

docker run -itd --restart=always -p 9000:9000 -e SONARQUBE_JDBC_URL='jdbc:mysql://10.0.55.117:17007/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false' -e SONARQUBE_JDBC_USERNAME=sonar -e SONARQUBE_JDBC_PASSWORD=sonar -v sonarqube-data:/opt/sonarqube/data -v sonarqube-logs:/opt/sonarqube/logs -v sonarqube-extensions:/opt/sonarqube/extensions --name sonarqube sonarqube:7.4-community

SonarQube Sancenr安装(zip)

wget https://github.com/SonarSource/sonar-scanner-cli/releases/download/4.4.0.2170/sonar-scanner-cli-4.4.0.2170-linux.zip
unzip sonar-scanner-cli-4.4.0.2170-linux.zip
mkdir /sonarQubeScanner
mv sonar-scanner-cli-4.4.0.2170-linux /sonarQubeScanner

修改配置文件,连接sonar服务器

vi /sonarQubeScanner/sonar-scanner-4.4.0.2170-linux/conf/sonar-scanner.properties

#添加如下内容
# 默认SonarQube服务地址,地址根据实际情况更改
sonar.host.url=http://10.0.45.220:9000
# 默认源代码编码
sonar.sourceEncoding=UTF-8

配置环境变量

vim /etc/profile
末尾添加一行 export PATH="$PATH:/sonarQubeScanner/sonar-scanner-4.4.0.2170-linux/bin"
source /etc/profile

SonarQube Sancenr安装(docker)

参考: https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/

docker run \
    --rm \
    -e SONAR_HOST_URL="http://${SONARQUBE_URL}" \
    -v "${YOUR_REPO}:/usr/src" \
    sonarsource/sonar-scanner-cli

OK

配置pmd 阿里规范

文档:阿里p3c规范.xml

<?xml version='1.0' encoding='UTF-8'?><profile><name>阿里p3c</name><language>java</language><rules><rule><repositoryKey>checkstyle</repositoryKey><key>com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>common-java</repositoryKey><key>FailedUnitTests</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AbstractClassShouldStartWithAbstractNamingRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AbstractMethodOrInterfaceMethodMustUseJavadocRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AccessorClassGeneration</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AppendCharacterWithChar</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ArrayNamingShouldHaveBracketRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AssignmentToNonFinalStatic</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidAccessibilityAlteration</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidApacheBeanUtilsCopyRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidArrayLoops</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidBranchingStatementAsLastInLoop</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidCallStaticSimpleDateFormatRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidCommentBehindStatementRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidComplexConditionRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidConcurrentCompetitionRandomRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidFinalLocalVariable</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidInstantiatingObjectsInLoops</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidMissUseOfMathRandomRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidNewDateGetTimeRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidPatternCompileInMethodRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidReturnInFinallyRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidStartWithDollarAndUnderLineNamingRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidSynchronizedAtMethodLevel</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidThreadGroup</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidUseTimerRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidUsingNativeCode</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidUsingShortType</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>AvoidUsingVolatile</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>BadComparison</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>BeanMembersShouldSerialize</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>BigIntegerInstantiation</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>BooleanGetMethodName</key><priority>MAJOR</priority><parameters><parameter><key>checkParameterizedMethods</key><value>false</value></parameter></parameters></rule><rule><repositoryKey>pmd</repositoryKey><key>BooleanInstantiation</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>BooleanPropertyShouldNotStartWithIsRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ByteInstantiation</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CallSuperFirst</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CallSuperInConstructor</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CallSuperLast</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CheckResultSet</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ClassCastExceptionWithSubListToArrayListRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ClassCastExceptionWithToArray</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ClassCastExceptionWithToArrayRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ClassMustHaveAuthorRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ClassNamingShouldBeCamelRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CloneMethodMustBePublic</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CloneMethodReturnTypeMustMatchClassName</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CollectionInitShouldAssignCapacityRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CommentContent</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CommentDefaultAccessModifier</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CommentRequired</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CommentSize</key><priority>MINOR</priority><parameters><parameter><key>maxLineLength</key><value>80</value></parameter><parameter><key>maxLines</key><value>6</value></parameter></parameters></rule><rule><repositoryKey>pmd</repositoryKey><key>CommentsMustBeJavadocFormatRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ConcurrentExceptionWithModifyOriginSubListRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ConfusingTernary</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ConsecutiveAppendsShouldReuse</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ConsecutiveLiteralAppends</key><priority>MINOR</priority><parameters><parameter><key>threshold</key><value>1</value></parameter></parameters></rule><rule><repositoryKey>pmd</repositoryKey><key>ConstantFieldShouldBeUpperCaseRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>CountDownShouldInFinallyRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>DataflowAnomalyAnalysis</key><priority>MAJOR</priority><parameters><parameter><key>maxViolations</key><value>100</value></parameter><parameter><key>maxPaths</key><value>1000</value></parameter></parameters></rule><rule><repositoryKey>pmd</repositoryKey><key>DefaultPackage</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>DoNotHardCodeSDCard</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>DoNotUseThreads</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>DontModifyInForeachCircleRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>DontUseFloatTypeForLoopIndices</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>DoubleCheckedLocking</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>EmptyMethodInAbstractClassShouldBeAbstract</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>EnumConstantsMustHaveCommentRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>EqualsAvoidNullRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ExceptionClassShouldEndWithExceptionRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>GodClass</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>GuardDebugLogging</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>GuardLogStatement</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>GuardLogStatementJavaUtil</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ImmutableField</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>InefficientEmptyStringCheck</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>InefficientStringBuffering</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>InsufficientStringBufferDeclaration</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>IntegerInstantiation</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>LawOfDemeter</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>LocalHomeNamingConvention</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>LocalInterfaceSessionNamingConvention</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>LocalVariableCouldBeFinal</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>LongInstantiation</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>LowerCamelCaseVariableNamingRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>MDBAndSessionBeanNamingConvention</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>MethodReturnWrapperTypeRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>MissingStaticMethodInNonInstantiatableClass</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>NPathComplexity</key><priority>MAJOR</priority><parameters><parameter><key>minimum</key><value>200</value></parameter></parameters></rule><rule><repositoryKey>pmd</repositoryKey><key>NeedBraceRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>NullAssignment</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>OptimizableToArrayCall</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>PackageNamingRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>PojoMustOverrideToStringRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>PojoMustUsePrimitiveFieldRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>PojoNoDefaultValueRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>RedundantFieldInitializer</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>RemoteInterfaceNamingConvention</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>RemoteSessionInterfaceNamingConvention</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>RemoveCommentedCodeRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ServiceOrDaoClassShouldEndWithImplRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ShortInstantiation</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SimpleDateFormatNeedsLocale</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SimplifiedTernary</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SimplifyConditional</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SimplifyStartsWith</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SingleMethodSingleton</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SingletonClassReturningNewInstance</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SingularField</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>StaticEJBFieldShouldBeFinal</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>StringConcatRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>StringInstantiation</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SuspiciousOctalEscape</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>SwitchStatementRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>TestClassShouldEndWithTestNamingRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ThreadLocalShouldRemoveRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ThreadPoolCreationRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>ThreadShouldSetNameRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>TooManyFields</key><priority>MAJOR</priority><parameters><parameter><key>maxfields</key><value>15</value></parameter></parameters></rule><rule><repositoryKey>pmd</repositoryKey><key>TooManyStaticImports</key><priority>MAJOR</priority><parameters><parameter><key>maximumStaticImports</key><value>4</value></parameter></parameters></rule><rule><repositoryKey>pmd</repositoryKey><key>TransactionMustHaveRollbackRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UndefineMagicConstantRule</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UnnecessaryFinalModifier</key><priority>INFO</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UnnecessaryFullyQualifiedName</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UnnecessaryReturn</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UnsupportedExceptionWithModifyAsListRule</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UnusedModifier</key><priority>INFO</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UnusedNullCheckInEquals</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UpperEllRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseArraysAsList</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseConcurrentHashMap</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseIndexOfChar</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseLocaleWithCaseConversions</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseProperClassLoader</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseStringBufferForStringAppends</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseStringBufferLength</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UseVarargs</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UselessOperationOnImmutable</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>UselessQualifiedThis</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>pmd</repositoryKey><key>WrapperTypeEqualityRule</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>ClassVariableVisibilityCheck</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>ObjectFinalizeCheck</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>ObjectFinalizeOverridenCallsSuperFinalizeCheck</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1143</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1148</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1175</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1201</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1206</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1217</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1221</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1226</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1244</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1313</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1317</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1444</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1656</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1751</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1764</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1849</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1860</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1862</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1872</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S1989</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2039</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2055</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2060</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2061</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2066</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2068</key><priority>BLOCKER</priority><parameters><parameter><key>credentialWords</key><value>password,passwd,pwd</value></parameter></parameters></rule><rule><repositoryKey>squid</repositoryKey><key>S2070</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2089</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2092</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2097</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2109</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2110</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2111</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2114</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2116</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2118</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2122</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2123</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2127</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2134</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2141</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2142</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2151</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2153</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2154</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2159</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2162</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2164</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2167</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2168</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2175</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2177</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2183</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2184</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2189</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2200</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2201</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2204</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2222</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2225</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2226</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2229</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2230</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2236</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2245</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2251</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2252</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2254</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2255</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2257</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2258</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2272</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2273</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2275</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2276</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2277</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2278</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2386</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2441</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2445</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2446</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2583</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2637</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2639</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2653</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2658</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2674</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2676</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2677</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2695</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2755</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2757</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2761</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2789</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2885</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2886</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S2976</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3020</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3034</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3046</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3066</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3067</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3281</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3306</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3329</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3330</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3346</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3355</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3369</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3374</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3422</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3436</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3438</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3439</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3510</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3518</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3599</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3655</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3749</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3750</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3751</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3752</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3753</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3923</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3958</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3959</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3981</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3984</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S3986</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4143</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4275</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4347</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4348</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4351</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4423</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4424</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4426</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4432</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4433</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4434</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4435</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4499</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4502</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4507</key><priority>MINOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4508</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4510</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4529</key><priority>MAJOR</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4544</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4601</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4602</key><priority>BLOCKER</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S4684</key><priority>CRITICAL</priority><parameters/></rule><rule><repositoryKey>squid</repositoryKey><key>S899</key><priority>MINOR</priority><parameters/></rule></rules></profile>

参考: https://blog.csdn.net/zuozewei/article/details/90232808

安装gitlab插件

见常见插件包

安装微信机器人

https://github.com/sjdy521/Mojo-Weixin/blob/master/Docker.md