Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: go agent装配启动参数与本身服务参数冲突导致无法装配bug #43

Open
3 tasks done
LaughingQuan opened this issue Sep 27, 2022 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@LaughingQuan
Copy link

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.

Version

1.8.5

Installation Type

Official Docker Compose

Service Name

Doc(DongTai-Doc), DongTai-Core

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

go agent装配命令go run -gcflags "all=-N -l" main.go -DongtaiGoProjectVersion="版本" -DongtaiGoProjectName="项目名" -DongtaiGoProjectCreate="true",当需装配agent的应用服务本身需要添加额外参数时,参数无法被识别;即为需要检测的服务A中运行时需要解析输入的参数a,但是在IAST服务中已经解析了参数flag.Parse(),因此不会再重新解析,运行A时输入参数会报错,无法解析参数a;

lQLPJxa5adTRF-zMu80BxbA-gD4xaCG9fwMw2P6DwDYA_453_187

Additional Information

建议解决方案:
在github.com/HXSecurity/DongTai-agent-go/run/base包中的Inint函数中把flag.Parse()去掉,只在A服务中调用一次;
lQLPJxa5adTRGF_M2s0D77ChF_yqYJwU9wMw2P6BAJEA_1007_218

Logs

No response

@LaughingQuan LaughingQuan added the bug Something isn't working label Sep 27, 2022
@tscuite tscuite transferred this issue from HXSecurity/DongTai Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant