Maybe it is not possible to auto identify only communications with third parties.
E.g. I’m developing Anki Leaderboard (fork), which auto sends user statistics to the server as data. To simplify this part of the code, it looks like this:
import requests
url = "server URL"
data = "statistics data"
response = requests.post(url, data=data, timeout=15)
This function is almost the same as when accessing a URL to retrieve data, e.g. if I want to only receive data without sending it looks like this:
import requests
response = requests.get(url, timeout=15)
So if we were to identify a function that sends data add-ons that merely receive data would be mis-detected, e.g. getting a definition from a dictionary, getting an image from Google, IPA, translating via google or DeepL, audio, using AI, etc. This is a very common feature in Anki add-ons.
Other challenging tasks such as these:
-
Developers can also use “urllib” instead of “requests”.
-
Developers can rename the module when importing.
import requests as req
response = req.post(url, data=data, timeout=15)
-
Developers can incorporate different apps that are not easily readable, e.g. my add-ons:
- AnkiRestart : There is a small app built in to restart the system.
- Bulk Image Downloader : There is a small app built in to convert png and jpeg to the webp. (cwebp)
-
Some of the add-ons have extremely large source code, so I don’t think they can be auto parsed by AnkiWeb’s server. (maybe AnkiWeb does not have the ability to parse the source code.)
Another way would be to read the code of the add-on, many add-ons have simple source code and can be easily read. The most commonly used programming language in Anki is Python which is the easiest to learn and recently you can also use AI such as ChatGPT.
However even if we completely check them I don’t think it is completely safe to do so, e.g. add-ons can be auto updated so even if you read the source code completely there is a possibility that features will be added later.
So I think a practical solution is to check if the developer is trustworthy, e.g. Anking and Migaku are reliable because they are third party organizations they hire professional programmers, some well-known individual add-ons developers on Anki are Glutanimate, Abdo, ijgnd, Tatsumoto, Arthur Milchior, etc. they have been active on Anki for many years and are very reliable.