Skip to content

Commit ce04a1b

Browse files
committed
ci: secure known_hosts permissions with chmod 600
1 parent 380eb00 commit ce04a1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ jobs:
341341
# Add SSH key
342342
mkdir -p /home/runner/.ssh
343343
ssh-keyscan dev-websites.cpp.al >> /home/runner/.ssh/known_hosts
344+
chmod 600 /home/runner/.ssh/known_hosts
344345
echo "${{ secrets.DEV_WEBSITES_SSH_KEY }}" > /home/runner/.ssh/github_actions
345346
chmod 600 /home/runner/.ssh/github_actions
346347
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
@@ -452,8 +453,8 @@ jobs:
452453
# Add SSH key
453454
set -x
454455
mkdir -p /home/runner/.ssh
455-
chmod 600 /home/runner/.ssh/known_hosts
456456
ssh-keyscan dev-websites.cpp.al >> /home/runner/.ssh/known_hosts
457+
chmod 600 /home/runner/.ssh/known_hosts
457458
echo "${{ secrets.DEV_WEBSITES_SSH_KEY }}" > /home/runner/.ssh/github_actions
458459
chmod 600 /home/runner/.ssh/github_actions
459460
ssh-agent -a $SSH_AUTH_SOCK > /dev/null

0 commit comments

Comments
 (0)