Datasets:

Modalities:
Text
Libraries:
Datasets
License:

Unsafe warning for github code clean

#3
by severo HF staff - opened

copied from https://github.com/huggingface/datasets-server/issues/1775

The Github Code Clean data set shows 47 unsafe files. May I request a re-scan with ClamAV to confirm that these are indeed unsafe? I have seen elsewhere (#882) that a re-scan resulted in files that were previously deemed unsafe were in fact OK.

cc @mcpotato

It seems some of the files are clean, the report is from Feb 15th 2023. I've implemented periodic re-scanning but it seems it's not going through I'll investigate, sorry about that!

FWIW, I have a scan result and thus hoping you can replicate:

[root@test OUT]# clamscan
WARNING: Failed to set locale
/root/unsafe_files/OUT/train-00535-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00505-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00217-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00223-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00272-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00764-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00715-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00511-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00516-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00171-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00253-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00739-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00310-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00464-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00307-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00720-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00494-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00709-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00166-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00818-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00117-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00195-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00238-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00240-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00540-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00160-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00767-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00191-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00385-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00036-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00098-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00225-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00209-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00839-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00716-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00849-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00601-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00566-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00732-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00550-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00817-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00071-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00627-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00091-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00579-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00746-of-00880.parquet: OK
/root/unsafe_files/OUT/train-00261-of-00880.parquet: OK

----------- SCAN SUMMARY -----------
Known viruses: 8672006
Engine version: 0.103.9
Scanned directories: 1
Scanned files: 47
Infected files: 0
Data scanned: 0.00 MB
Data read: 15966.27 MB (ratio 0.00:1)
Time: 20.971 sec (0 m 20 s)
Start Date: 2023:09:01 03:57:28
End Date: 2023:09:01 03:57:49
[root@test OUT]#

Try with clamscan --max-scansize=4000M --max-filesize=4000M ..., clamav won't scan files larger than 100MB by default

Thanks, we will try again. Are you also running it again on your end?

@mcpotato we followed your suggestion. clam scan now shows all 47 infected. Thanks for the suggestion.

I did a little experiment with the Parquet files detected as being infected. Scanning each Parquet file with ClamAV as a single input file does show infections. However, if I break out the all of the code column contents from one of those Parquet files into separate files, then scan the directory containing all of those files, no infections are detected. I suspect that scanning entire Parquet files as a single input might be giving false positives. For example, the signature for one of the detections is:

VIRUS NAME: Win.Exploit.Hacktool-1831
TDB: Engine:51-255,Target:0
LOGICAL EXPRESSION: (0&1&2&3)
 * SUBSIG ID 0
 +-> OFFSET: ANY
 +-> SIGMOD: NONE
 +-> DECODED SUBSIGNATURE:
lost
 * SUBSIG ID 1
 +-> OFFSET: ANY
 +-> SIGMOD: NONE
 +-> DECODED SUBSIGNATURE:
host1!
 * SUBSIG ID 2
 +-> OFFSET: ANY
 +-> SIGMOD: NONE
 +-> DECODED SUBSIGNATURE:
1.error
 * SUBSIG ID 3
 +-> OFFSET: ANY
 +-> SIGMOD: NONE
 +-> DECODED SUBSIGNATURE:
exit

I think this will match any input file that contains all of the strings "lost", "host1!", "1.error", and "exit". Lumping together ~100K code fragments into a single input file is going to give a much higher change of the signature producing a match.

Sign up or log in to comment