Skip to content

fix: replace raw EJS output with escaped output in chaincode templates#773

Open
MaryamArif7 wants to merge 3 commits into
hyperledger-labs:mainfrom
MaryamArif7:shellinjection
Open

fix: replace raw EJS output with escaped output in chaincode templates#773
MaryamArif7 wants to merge 3 commits into
hyperledger-labs:mainfrom
MaryamArif7:shellinjection

Conversation

@MaryamArif7

@MaryamArif7 MaryamArif7 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #742

Raw EJS output (<%-) was used for chaincodeStartCommand and
chaincode.endorsement in generated shell scripts, allowing
shell injection

Changed <%- to <%= in:

  • chaincode-install-v2.sh (chaincodeStartCommand)
  • chaincode-dev-v2.sh (chaincode.endorsement)

Update:
Add a shellQuote() helper to safely escape chaincode.endorsement and chaincode.chaincodeStartCommand

@MaryamArif7

Copy link
Copy Markdown
Contributor Author

@umegbewe i have made some changes,please take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config driven shell injection in generated chaincode commands

2 participants