Skip to content

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

Description

@LaughingQuan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions