The f-droid app store only contains apps that are made from public available app-s sourcecode (aka open source).
This garanteesmakes it unlikely that the apps do not contain “secret code” with unwanted features.
Softwarelibraries, that help the developer to monetize their free apps (advertising, user tracking) are not open source and therefore
are not available in f-droid.
Since malwareautors do not publish the sourcecode of their malware apps it is very unlikely that apps in the F-Droid store contain malwarecode.