Sharing html files created with Rmd: "Your file may violate Google Drive's Terms of Service"

Starting yesterday, after sharing in Google Drive html reports created with Rmarkdown, I received emails from Google Drive Safety ( with the following content:

Your file may violate Google Drive's Terms of Service

"report_DF_clean.html" contains content that may violate Google Drive's Malware and Similar Malicious Content policy. Some features related to this file may have been restricted. If you think this is an error and would like the Trust & Safety team to review this file, request a review below.

The html report in question is just a bunch of DT::datatable() tables in tabsets.

Any idea what exactly is labeled as malware and how to avoid it?

Afterwards, I received a second email from Google Policy Violation Warning telling me If this behavior continues, your access to this product may be disabled. (this product being Google Drive).

Thanks for the help.

This happened to me over the weekend too. My html files are more complicated, but the earliest (simplest) one I can find that screams "Virus warning!" when attaching to an email doesn't have any tabsets in it, just a kableExtra table and a DT table (and headers, graphs, table of contents). I wonder if it's something about the interactivity of the DT::datatable() tables that google is flagging?

Update - just made a couple of test files and it looks like it is the DT output that google doesn't like. I have no idea what to do about this though. Hoping someone else can pop in with some solutions (and/or a way to convince google that DT::datatable isn't malware)

1 Like

Thanks for the info @Kim.Cressman !

I reported the issue to DT. Hopefully there is something they can do about it.


1 Like

To clarify, I had the same issue with google drive and the emails about violating service - the email thing happened as well and was how I figured out the issue was with the DT outputs. Hopefully this can be solved! Thanks and best wishes!

@Kim.Cressman just a heads up.

The issue seems to be caused by a comment inside the html files:

// dynamic scoping, when 'code' is eval()'ed, JavaScript does not know objects

That eval() bit triggers the alarm. ¯_(ツ)_/¯

If you replace that line for this one, no more Virus warnings:

// dynamic scoping, when 'code' is eval'ed, JavaScript does not know objects

1 Like

Thanks! I'm following along in the github convo! (I'm 'swmpkim' over there) That is some good investigating, and what a wacky trigger for google. I'll let y'all know over on github if that doesn't fix it for me.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.