when running gitlab SAST pipeline, it throws an exception saying permission denied for mvn install
.

looking at file system, the script is however with execution permission

turned out however in git, it’s maintaining a different permission

the command to sort this is
git update-index --chmod=+x mvnw
followed by
git commit ..
git push
however, one caveat is, if git filemode is tunred on, it would keep trying to revert the file permission change.
https://git-scm.com/docs/git-config#Documentation/git-config.txt-corefileMode
so turn this off, would work
git config core.fileMode false