HXSecurity / DongTai

Dongtai IAST is an open-source Interactive Application Security Testing (IAST) tool that enables real-time detection of common vulnerabilities in Java applications and third-party components through passive instrumentation. It is particularly suitable for use in the testing phase of the development pipeline.
https://dongtai.io
Apache License 2.0
1.24k stars 145 forks source link

agent初始化path存在空格会找不到目标jar报错导致无法启动 #180

Closed liode1s closed 3 years ago

liode1s commented 3 years ago

Preflight Checklist

Version

1.0.3

Installation Type

Official Docker Compose

Service Name

DongTai-Engine

Describe the details of the bug and the steps to reproduce it

java环境1.8

java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)

由于path路径存在空格导致dongtai agent IastProperties geninstance 无法找到对应应用目录报错,且创建不存在目录

agentFile = new File(IastProperties.class.getProtectionDomain().getCodeSource().getLocation().getFile());
basePath = agentFile.getParentFile().getPath();

报错日志

JAVA_Demo java -javaagent:agent.jar -Ddebug.name=true -Dproject.name='publiccms' -jar webgoat-server-8.0.0.M14.jar
Not running with JDK!
[cn.huoxian.dongtai.iast] The engine configuration file is initialized successfully. file is /Users/xxx/Documents/My%20Project/IAST/JAVA_Demo/config/iast.properties
开启延时加载模式,检测引擎将在10s后启动

image

Additional Information

No response

Logs

No response

exexute commented 3 years ago

Thanks for the feedback, the test recurrence has been arranged.

exexute commented 3 years ago

We expect to fix this issue in version 1.0.4

Nizernizer commented 3 years ago

bug fixed.

liode1s commented 3 years ago

this issue has been solve