Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
issue
issue
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • issueissue
  • Issues
  • #1255

Closed
Open
Opened Nov 27, 2024 by luo jianbo@luojianbo

Golang智能合约难防止恶意代码注入

【产品名称/功能模块】

长安链v2.3.1/智能合约引擎

【问题描述】

Golang智能合约虽然很灵活但是没有做漏洞检测,无法防止恶意代码注入。当前可以在智能合约代码中执行系统命令操作,例如下面的代码可以在智能合约中执行:

Command := strings.Split(method, " ")[0]
args := strings.Split(method, " ")[1:]
cmd := exec.Command(Command,args...)
output, err := cmd.CombinedOutput()
if err != nil {
  return sdk.Error("执行"+Command+"命令失败")
  panic(output)  	
}

【期望内容/功能改进】

期望增加Golang智能合约漏洞检测机制

【联系方式】(选填)

微信号:15708181930

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/issue#1255

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。