jenkinsci / jenkinsci/git-client-plugin

[JENKINS-73305] .ssh directory created with default permissions

Open
#1,685 2 comments 0 reactions 0 assignees View on GitHub
component:git-client-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
152
Forks
402
Avg merge
6h 47m
Merged PRs (30d)
4

Description

https://github.com/jenkinsci/git-client-plugin/pull/1127#discussion_r1622367609 reveals that the git-client plugin creates the users ~/.ssh directory with default permissions.

Depending on the umask of the user this can result in insecure permissions of the directory.

This is not a security issue as SSH performs checks of the files it uses and their parent directories and will refuse to utilise a file if it is deemed insecure.

However creating the directory without restriction is bad and if any job would attempt to use any of the native `ssh` command line(s) later it could fail due to the incorrect settings.

As there is no valid reason to not apply the recomended restrictions to the folder the plugin should create the directory appropriately when the file system is one supporting Posix based permissions.   

---
Originally reported by teilo, imported from: .ssh directory created with default permissions


  • assignee: markewaite
  • status: In Review
  • priority: Minor
  • component(s): git-client-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251211-071809

Raw content of original issue

https://github.com/jenkinsci/git-client-plugin/pull/1127#discussion_r1622367609 reveals that the git-client plugin creates the users ~/.ssh directory with default permissions.

Depending on the umask of the user this can result in insecure permissions of the directory.

This is not a security issue as SSH performs checks of the files it uses and their parent directories and will refuse to utilise a file if it is deemed insecure.

However creating the directory without restriction is bad and if any job would attempt to use any of the native `ssh` command line(s) later it could fail due to the incorrect settings.

As there is no valid reason to not apply the recomended restrictions to the folder the plugin should create the directory appropriately when the file system is one supporting Posix based permissions.   

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.