From ab624b4e0a1ebafcd3e606a8e8bdf14444b5ec66 Mon Sep 17 00:00:00 2001 From: wuhaoyang <2507865306@qq.com> Date: Fri, 19 Jan 2024 19:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=86=E5=88=99:=E5=BA=94?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8D=95=E5=90=91=E5=8A=A0=E5=AF=86=E7=AE=97?= =?UTF-8?q?=E6=B3=95=E5=AF=B9=E5=8F=A3=E4=BB=A4=E8=BF=9B=E8=A1=8C=E5=8A=A0?= =?UTF-8?q?=E5=AF=86=E5=B9=B6=E5=AD=98=E5=82=A8=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sonar/cxx/rules/checkers/EncryptionAlgorithmChecker.java | 2 +- .../cxx/rules/checkers/EncryptionAlgorithmCheckerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmChecker.java b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmChecker.java index 5c69301..abe3e3c 100644 --- a/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmChecker.java +++ b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmChecker.java @@ -65,7 +65,7 @@ public class EncryptionAlgorithmChecker extends SquidCheck { } cache.values().forEach(item->{ System.out.println("特定字段"+item.getFirstDescendant(CxxGrammarImpl.declaratorId).getTokenOriginalValue()+"未使用单向加密算法对口令进行加密并存储"); - getContext().createLineViolation(this, "单向加密算法对口令进行加密并存储", item); + getContext().createLineViolation(this, "特定字段未使用单向加密算法对口令进行加密并存储", item); }); } } diff --git a/sonar-keyware-plugins-cxx/src/test/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmCheckerTest.java b/sonar-keyware-plugins-cxx/src/test/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmCheckerTest.java index 03ddd5b..f71abf9 100644 --- a/sonar-keyware-plugins-cxx/src/test/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmCheckerTest.java +++ b/sonar-keyware-plugins-cxx/src/test/java/com/keyware/sonar/cxx/rules/checkers/EncryptionAlgorithmCheckerTest.java @@ -29,7 +29,7 @@ public class EncryptionAlgorithmCheckerTest { var tester = CxxFileTesterHelper.create("EncryptionAlgorithmChecker.cc"); SourceFile file = CxxAstScanner.scanSingleInputFile(tester.asInputFile(), checker); CheckMessagesVerifier.verify(file.getCheckMessages()) - .next().atLine(8).withMessage("特定字段未使用VirtualLock()函数锁定存放敏感信息的内存") + .next().atLine(8).withMessage("特定字段未使用单向加密算法对口令进行加密并存储") .noMore(); }