Fortify SCA 中文乱码及中文规则库配置方案

Fortify SCA 中文乱码及中文规则库配置方案

1.中文乱码配置

单个文件配置

Edit - Set Encoding:

在这里插入图片描述

选择其他编码,配置UTF-8编码:

在这里插入图片描述

全局配置

打开productlaunch.cmd:

Fortify_SCA\Core\private-bin\awb\productlaunch.cmd

在最后这一行末添加-Dfile.encoding=utf-8

修改前:

start "%FORTIFY_CORE%" /B /MIN "%FORTIFY_CORE%\private-bin\awb\eclipse\eclipse.exe" -vm "%JAVA_CMD%" -startup "%FORTIFY_CORE%\lib\awb-startup-18.20.1071.jar" -os win32 -ws win32 -arch x86_64 %USER_OPTS% %AWB_ARGS% -vmargs -Xmx2G -XX:-UseCompressedOops %AWB_VM_OPTS% %USER_VM_OPTS% -Dcom.fortify.InstallRoot="%FORTIFY_HOME%" >NUL

修改后:

start "Fortify" /B /MIN "%FORTIFY_CORE%\private-bin\awb\eclipse\eclipse.exe" -vm "%JAVA_CMD%" -startup "%FORTIFY_CORE%\lib\awb-startup-20.2.2.0003.jar" -os win32 -ws win32 -arch x86_64 %USER_OPTS% %AWB_ARGS% -vmargs -Xmx2G -XX:-UseCompressedOops %AWB_VM_OPTS% %USER_VM_OPTS% -Dcom.fortify.InstallRoot="%FORTIFY_HOME%" -Dfile.encoding=utf-8 >NUL

重启SCA,解决了中文乱码的问题:

在这里插入图片描述


2.配置中文规则库

下载规则库:

Fortify SCA 中文规则库

将解压出来的rulesExternalMetadata放置到Fortify\Fortify_SCA_xxx\Core\config

运行scapostinstall.cmd

在这里插入图片描述

配置语言:

在这里插入图片描述

设置Options:

在这里插入图片描述

更新规则库:

在这里插入图片描述

OK了:

在这里插入图片描述

测试一下导出,成功配置了中文规则:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Gherbirthday0916/article/details/130176036
SCA