Commit a09e86f
committed
[JENKINS-73305] Create .ssh directory with owner only permissions
When the JGit implementation needs to create a `.ssh` directory, create
it with permissions only allowing access to the directory owner. That is
the common pattern used by the OpenSSH project and by POSIX systems to
reduce access to the sensitive information stored in the directory.
Testing done
Ran the CredentialsTest in a debugger with a configured 'auth-data`
directory and confirmed that the modified lines are executed on my
RHEL 8 development computer. Confirmed that the resulting directory
permissions were read, write, and execute for only the owner, with no
other permissions.1 parent f988d25 commit a09e86f
File tree
2 files changed
+49
-11
lines changed- src/main/java/org/jenkinsci/plugins/gitclient
- verifier
2 files changed
+49
-11
lines changedLines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
208 | 223 | | |
209 | 224 | | |
210 | 225 | | |
| |||
3231 | 3246 | | |
3232 | 3247 | | |
3233 | 3248 | | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
3234 | 3254 | | |
Lines changed: 25 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
32 | 51 | | |
33 | 52 | | |
34 | 53 | | |
35 | 54 | | |
36 | 55 | | |
37 | 56 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 57 | + | |
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
| |||
76 | 89 | | |
77 | 90 | | |
78 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
79 | 97 | | |
0 commit comments