Can I apply a confusion matrix to classification tasks outside of ML? I would like to know if it's possible to use a confusion matrix to measure the performance of a classification tool outside the realm of ML or a statistical model.
For example, if I had a small script that scanned for a virus within a file. If I were to run it over n many files, and collect the results into a confusion matrix, would metrics like accuracy, recall, and precision remain valid / applicable?

Sure you can. Those metrics are older than machine learning. For example, the ROC curves calculated based on TPR and FPR were designed during World War II for judging the accuracy of radars. The metrics calculated based on the confusion matrix are also commonly used in medicine for judging the performance of diagnostic tests. For example, below I posted a table from the report mentioning such results for a rapid COVID test (not advertising it, it was the first such result that I found online), as you can see, it has many of the "machine learning" metrics.

There are also used in many other scenarios regarding information retrieval, signal detection, classification, etc.
