jenkinsci / jenkinsci/gitlab-plugin
gitlabMergeRequestDescription env var is set without proper escaping
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
## Issue
### Context
- **Gitlab plugin version**: 1.5.10
- **Gitlab version**: 10.8.7-ee
- **Jenkins version**: 2.138.2
- **Job type**: Pipeline
### Logs & Traces
Irrelevant portions omitted with ...
```
...
gitlabMergeRequestDescription=Sample command:
...
HUDSON_URL=https://jenkinsci.gogoair.com/
It uses DEV lruportal to determine the besthost, If no host is selected then it tries with stage lruportal.
JENKINS_HOME=/var/lib/jenkins
...
USER=fedora
_=/usr/bin/env
`vacpu -v start_stack --pool=pipeline_pool --stack-name=JENKINS_TRIGGER --box-name=acpu2-nightly --box-version=10.11.0.246-acpu-nightly --timeout=28800 --retry-delay=60`
WORKSPACE=/tmp/workspace/a_vacpu_vacpu_py_ci
...
docker: poorly formatted environment: variable '`vacpu -v start_stack --pool' has white spaces.
See 'docker run --help'.
[Pipeline] }
[Pipeline] // gitlabCommitStatus
[Pipeline] }
[Pipeline] // stage
[Pipeline] echo
=========================== PIPELINE FAILED ===========================
```
### Problem description
Build was triggered from MR whose description was:
```
Sample command:
`vacpu -v start_stack --pool=pipeline_pool --stack-name=JENKINS_TRIGGER --box-name=acpu2-nightly --box-version=10.10.10.10-acpu-nightly --timeout=28800 --retry-delay=60`
It uses DEV lruportal to determine the besthost, If no host is selected then it tries with stage lruportal.
```
Contributor guide
Assessment
This issue has not been assessed yet.