I have an GCP provided Unix/Linux (RHEL7 and CentOS7 in this case, at the time of writing this SO question) files, for example:
/etc/sysctl.d/60-gce-network-security.conf
The check can be done by simply grepping/catting/sedding , but it will be hardcoded, unmantainable and simply stupid.
Therefore, is there a way to actually scan the files and try to guess if they are native to distribution or not?
My idea is to scan all files, used by sysctl / systemd unit files, but I want to have more input before implementing the logic, if that is really a viable solution by industry professionals.