Test files can cause "Trojan" warnings on some systems #1292

Closed
opened 2026-02-05 00:30:55 +03:00 by OVERLORD · 20 comments
Owner

Originally created by @infario on GitHub (Aug 2, 2019).

While I tried to install this on my server my cpanel antivirus reported trojan virus infection this source files

Originally created by @infario on GitHub (Aug 2, 2019). While I tried to install this on my server my cpanel antivirus reported trojan virus infection this source files
OVERLORD added the 🔧 Maintenance:octocat: Admin/Meta labels 2026-02-05 00:30:55 +03:00
Author
Owner

@Abijeet commented on GitHub (Aug 2, 2019):

Hi @infario

Can you add some more info or logs from the antivirus?

@Abijeet commented on GitHub (Aug 2, 2019): Hi @infario Can you add some more info or logs from the antivirus?
Author
Owner

@infario commented on GitHub (Aug 2, 2019):

image
The file you uploaded, BookStack-master.zip, contains a virus so the upload was canceled: Win.Trojan.Hide-2 FOUND

@infario commented on GitHub (Aug 2, 2019): ![image](https://user-images.githubusercontent.com/9401329/62355797-5c683600-b52d-11e9-8534-92c12629f170.png) The file you uploaded, BookStack-master.zip, contains a virus so the upload was canceled: Win.Trojan.Hide-2 FOUND
Author
Owner

@Abijeet commented on GitHub (Aug 2, 2019):

Can you share what hosting provider you use? Any ideas about what AV software they use?

On a side note, you can download the latest release of BookStack from the release section here - https://github.com/BookStackApp/BookStack/releases

The master branch is for development purpose.

@Abijeet commented on GitHub (Aug 2, 2019): Can you share what hosting provider you use? Any ideas about what AV software they use? On a side note, you can download the latest release of BookStack from the release section here - https://github.com/BookStackApp/BookStack/releases The master branch is for development purpose.
Author
Owner

@infario commented on GitHub (Aug 2, 2019):

I tried the release BookStack Beta v0.26.3 and still get same error. We use Panel secure hosting. I guess they are using ClamAV Antivirus

@infario commented on GitHub (Aug 2, 2019): I tried the release BookStack Beta v0.26.3 and still get same error. We use Panel secure hosting. I guess they are using ClamAV Antivirus
Author
Owner

@dawolf commented on GitHub (Aug 2, 2019):

Automated malware scanners seem to pick up files in the /tests/test-data directory.

./tests/test-data/bad.php: Win.Trojan.Hide-2 FOUND
./tests/test-data/bad.phtml: Win.Trojan.Hide-2 FOUND
@dawolf commented on GitHub (Aug 2, 2019): Automated malware scanners seem to pick up files in the `/tests/test-data` directory. ``` ./tests/test-data/bad.php: Win.Trojan.Hide-2 FOUND ./tests/test-data/bad.phtml: Win.Trojan.Hide-2 FOUND ```
Author
Owner

@infario commented on GitHub (Aug 2, 2019):

Can i delete "tests" folder and upload?

@infario commented on GitHub (Aug 2, 2019): Can i delete "tests" folder and upload?
Author
Owner

@Abijeet commented on GitHub (Aug 2, 2019):

@infario - Yes that should work fine.

@Abijeet commented on GitHub (Aug 2, 2019): @infario - Yes that should work fine.
Author
Owner

@infario commented on GitHub (Aug 2, 2019):

Yes now the virus error gone. Thanks @dawolf and @Abijeet

@infario commented on GitHub (Aug 2, 2019): Yes now the virus error gone. Thanks @dawolf and @Abijeet
Author
Owner

@Abijeet commented on GitHub (Aug 2, 2019):

Re-opening this in order to bring to @ssddanbrown's attention, and maybe make a more long term fix.

@Abijeet commented on GitHub (Aug 2, 2019): Re-opening this in order to bring to @ssddanbrown's attention, and maybe make a more long term fix.
Author
Owner

@dawolf commented on GitHub (Aug 2, 2019):

These files should be removed from the release if they get picked up by malware scanners.

edit: ninja'd by @Abijeet

@dawolf commented on GitHub (Aug 2, 2019): These files should be removed from the release if they get picked up by malware scanners. edit: ninja'd by @Abijeet
Author
Owner

@ssddanbrown commented on GitHub (Aug 3, 2019):

Thanks @Abijeet for responding to this.

Yeah, Once we get to a point where we have packaged releases then the test files should not be included. GitHub just provides the current zip as a straight ZIP of the source. Have updated the title and will leave this open as a reminder for when we come to change the release process.

@ssddanbrown commented on GitHub (Aug 3, 2019): Thanks @Abijeet for responding to this. Yeah, Once we get to a point where we have packaged releases then the test files should not be included. GitHub just provides the current zip as a straight ZIP of the source. Have updated the title and will leave this open as a reminder for when we come to change the release process.
Author
Owner

@LordSimal commented on GitHub (Sep 14, 2019):

I just want to mention, that my hoster https://all-inkl.com/ reported those 2 PHP files as described above.
I now have deleted the tests folder but a "real solution" would be nice.

@LordSimal commented on GitHub (Sep 14, 2019): I just want to mention, that my hoster https://all-inkl.com/ reported those 2 PHP files as described above. I now have deleted the tests folder but a "real solution" would be nice.
Author
Owner

@stenootje commented on GitHub (Apr 9, 2020):

April 2020 and this is still not removed... why?
even more, why is this included? a php-file and phtml-file that are images!!

@stenootje commented on GitHub (Apr 9, 2020): April 2020 and this is still not removed... why? even more, why is this included? a php-file and phtml-file that are images!!
Author
Owner

@ssddanbrown commented on GitHub (Apr 9, 2020):

April 2020 and this is still not removed... why?

@stenootje Because we have not developed a packaged release system yet.

even more, why is this included? a php-file and phtml-file that are images!!

Because we have tests to ensure these types of files cannot be uploaded.

@ssddanbrown commented on GitHub (Apr 9, 2020): > April 2020 and this is still not removed... why? @stenootje Because we have not developed a packaged release system yet. > even more, why is this included? a php-file and phtml-file that are images!! Because we have tests to ensure these types of files cannot be uploaded.
Author
Owner

@stenootje commented on GitHub (Apr 9, 2020):

so this directory can be removed from installation without causing other problems?

@stenootje commented on GitHub (Apr 9, 2020): so this directory can be removed from installation without causing other problems?
Author
Owner

@ssddanbrown commented on GitHub (Apr 9, 2020):

@stenootje The directory can be removed. If you installed using git clone to pull down the files, then it's possible you may get some warnings or error when pulling down the code for an update.

@ssddanbrown commented on GitHub (Apr 9, 2020): @stenootje The directory can be removed. If you installed using `git clone` to pull down the files, then it's possible you may get some warnings or error when pulling down the code for an update.
Author
Owner

@LordSimal commented on GitHub (Apr 9, 2020):

If these files are "just" to test the upload (while developing) why does it have to be in a production environment?
Could this be solved with a production and development branch?

@LordSimal commented on GitHub (Apr 9, 2020): If these files are "just" to test the upload (while developing) why does it have to be in a production environment? Could this be solved with a production and development branch?
Author
Owner

@ssddanbrown commented on GitHub (Apr 9, 2020):

If these files are "just" to test the upload (while developing) why does it have to be in a production environment?

It's ideal to be able to run the tests against the exact branch of code that people are using, They'll never run in production but they're useful to be there.

Could this be solved with a production and development branch?

Yeah, most likely. We pretty much already have that with master as our development branch and release as our production branch, is just working around the above (ensure we're testing production-intended code) and putting process in place. Just wasn't looking to spend time updating our dev/release process to account for just this since I ultimately want to change the release process anyway.

@ssddanbrown commented on GitHub (Apr 9, 2020): > If these files are "just" to test the upload (while developing) why does it have to be in a production environment? It's ideal to be able to run the tests against the exact branch of code that people are using, They'll never run in production but they're useful to be there. > Could this be solved with a production and development branch? Yeah, most likely. We pretty much already have that with `master` as our development branch and `release` as our production branch, is just working around the above (ensure we're testing production-intended code) and putting process in place. Just wasn't looking to spend time updating our dev/release process to account for just this since I ultimately want to change the release process anyway.
Author
Owner

@liudass84 commented on GitHub (May 12, 2020):

FILE HIT LIST:
{CAV}Win.Trojan.Hide-2 : /.../tests/test-data/bad.php
{CAV}Win.Trojan.Hide-2 : /.../tests/test-data/bad.phtml

@liudass84 commented on GitHub (May 12, 2020): FILE HIT LIST: {CAV}Win.Trojan.Hide-2 : /.../tests/test-data/bad.php {CAV}Win.Trojan.Hide-2 : /.../tests/test-data/bad.phtml
Author
Owner

@ssddanbrown commented on GitHub (Feb 6, 2021):

Within f25e585008 I've re-worked these files for our testing usage to avoid them getting picked up by AV, Have tested with ClamAV. Will be part of the next feature release.

@ssddanbrown commented on GitHub (Feb 6, 2021): Within f25e585008178010c5fede256b4d9e7638da1070 I've re-worked these files for our testing usage to avoid them getting picked up by AV, Have tested with ClamAV. Will be part of the next feature release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1292