Skip to content

Commit dac735e

Browse files
Update pullRemote.js to set appropriate directory permissions
This commit modifies the directory creation permissions in the pullRemote function of pullRemote.js. Previously, the function was setting directory permissions to 0777 (full read, write, and execute permissions for user, group, and others). This approach is not aligned with best practices for security, particularly in secure environments such as OpenShift, where overly permissive settings can lead to vulnerabilities. The updated code now sets the permissions to 0755 (read, write, and execute for the user; read and execute for group and others). This change enhances security by restricting write access to the owner only while still allowing necessary read and execute permissions.
1 parent 39dd45c commit dac735e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/proxy/processors/push-action/pullRemote.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const exec = async (req, action) => {
1616
}
1717

1818
if (!fs.existsSync(action.proxyGitPath)) {
19-
fs.mkdirSync(action.proxyGitPath, '0777', true);
19+
fs.mkdirSync(action.proxyGitPath, '0755', true);
2020
}
2121

2222
const cmd = `git clone ${action.url} --bare`;

0 commit comments

Comments
 (0)