file check is problematic "green" when not test with chmod

Created on 15 June 2024, 7 months ago

Problem/Motivation

The file check currently only tries to write into module folder. This shows green even if the webserver is the owner of the folder and the files inside but the write permission is not set. When malware will do just a chmod 0755 on directory and files it can change the files.

Steps to reproduce

For testing you need something which is not recommended. Change the owner of the security_check module folder to the webserver which usually needs root permissions. When chmod command is called before file check as chown in upcoming merge request the new file an be placed and IGNOREME.txt gets a fresh timestamp.

Proposed resolution

Maybe we can additionally check webserver username and file owner.
But adding chmod commands will do a real test.
When this can be done successful the system is changed in this place a little bit less secure.

Remaining tasks

Maybe add additionally warnings to fix the concrete file permissions of the.

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany c-logemann Frankfurt/M, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024