Incorrect file permission when using built-in project template to create Spring project
Summary
When using the built-in project template to create a Spring project, the file mvnw is not executable while the original project https://gitlab.com/gitlab-org/project-templates/spring has it correct.
Steps to reproduce
- Create a public project on gitlab.com by using the built-in template Spring
- Enable Auto DevOps on the newly created project
- Run a pipeline if it's not triggered automatically when turned on AutoDevops.
Example Project
https://gitlab.com/xiaogang_gitlab/ruby-from-template
https://gitlab.com/xiaogang_gitlab/ruby-from-template/-/jobs/231319829
What is the current bug behavior?
In sast job, it fails to run mvnw due to permission issue.
What is the expected correct behavior?
It runs correctly to execute mvnw.
Relevant logs and/or screenshots
Digest: sha256:fb1706ffa042a43c2597c250ff0a3338e08b2feeb8e2df58fe2f9eb5bfc3765a
Status: Downloaded newer image for registry.gitlab.com/gitlab-org/security-products/analyzers/spotbugs:2
Found project in /tmp/app
Found Mvnw project in /tmp/app directory
Found 1 analyzable projects.
Building Mvnw project at /tmp/app.
Error: Project couldn't be built: Command couldn't be executed: fork/exec /tmp/app/mvnw: permission denied
Warning: Building failed for /tmp/app. Attempting scan anyway.
Output of checks
This bug happens on GitLab.com.
Results of GitLab environment info
N/A
Results of GitLab application Check
N/A
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
Edited by Xiaogang Wen