Skip to content

Commit 6705cfd

Browse files
committed
fix(OVH): harden security
1 parent 190ce21 commit 6705cfd

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/ovh.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,18 @@ jobs:
7070
mkdir -p ${HOME}/.ssh/
7171
ssh-keyscan "${OVH_HOSTNAME}" >> "${HOME}/.ssh/known_hosts"
7272
cat > .htaccess <<EOF
73-
Options -Indexes
73+
Options -ExecCGI -Indexes
7474
ErrorDocument 403 https://${MAIN_WEBSITE}
75+
76+
RemoveHandler .php .phtml .phar .cgi .pl .py
77+
RemoveType .php .phtml .phar
78+
79+
<FilesMatch "\.(php|phtml|phar|cgi|pl|py)$">
80+
Require all denied
81+
</FilesMatch>
82+
<IfModule mod_php.c>
83+
php_flag engine off
84+
</IfModule>
7585
EOF
7686
lftp --env-password -u ${OVH_USERNAME} sftp://${OVH_HOSTNAME} \
7787
-e "put .htaccess -o /home/${OVH_USERNAME}/pulls/.htaccess"

0 commit comments

Comments
 (0)