Skip to content

Commit

Permalink
Update pullRemote.js to set appropriate directory permissions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yadnyeshkolte authored Nov 6, 2024
1 parent e14ee57 commit b8d1736
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/proxy/processors/push-action/pullRemote.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const exec = async (req, action) => {
}

if (!fs.existsSync(action.proxyGitPath)) {
fs.mkdirSync(action.proxyGitPath, '0777', true);
fs.mkdirSync(action.proxyGitPath, '0755', true);
}

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

0 comments on commit b8d1736

Please sign in to comment.