Skip to content

Allow ignoring specific files using a configuration property#422

Open
lars-sh wants to merge 57 commits into
nextcloud:stable6.2from
lars-sh:ignore-config
Open

Allow ignoring specific files using a configuration property#422
lars-sh wants to merge 57 commits into
nextcloud:stable6.2from
lars-sh:ignore-config

Conversation

@lars-sh
Copy link
Copy Markdown

@lars-sh lars-sh commented Feb 8, 2025

Hi everyone,

this Pull Request does not follow any standards as I'm not involved in PHP or Nextcloud development usually.
Though, I was working on a quick-fix to implement some simple way to ignore false-positive findings and it might be interesting for others, too.

This might relate to #88 and #178.
Feel free to copy, rework or modify my changes.

The idea is to introduce a simple config.php property called antivirus_ignore that takes either an array of full file paths or a string that needs to be a valid regular expression which needs to match the file path using preg_match. If so, the file is ignored and no more warning is reported.

You can check this e.g. using occ files_antivirus:scan on the command line but it applies to the background scanner in the same way.

@github-actions
Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
st3iny and others added 14 commits May 5, 2025 07:46
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
[stable6.0] fix: exclude groupfolder trash and version files
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
The oci8 PHP package does not support PHP 8.4 yet.

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
[stable6.0] fix: clean up obsolete etag column
[stable6.0] fix: handle null mount points gracefully
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
[stable6.0] fix: wrap encrypted group folders
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
st3iny and others added 7 commits May 12, 2025 14:57
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
[stable6.0] fix: handle ClamAV not responding properly
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
[stable6.0] faster loading for SharedStorage
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
[stable6.0] fix: check if groupfolder encryption is enabled before wrapping a jail
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
icewind1991 and others added 27 commits August 22, 2025 15:37
Signed-off-by: Robin Appelman <robin@icewind.nl>
[stable6.0] feat: block uploads when av scanner is not reachable
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>

[skip ci]
[stable6.0] fix: extract actual path when scanning ocTransferId files
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
[stable6.0] fix: use given limit when retrieving unscanned files
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
[stable6.0] fix: handle null path gracefully when building infected activity
Signed-off-by: Robin Appelman <robin@icewind.nl>
[stable6.0] fix: don't try to scan content twice if stream is seeked backwards
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
# Conflicts:
#	.github/workflows/phpunit-oci.yml
#	CHANGELOG.md
#	appinfo/info.xml
#	lib/AppConfig.php
#	lib/AppInfo/Application.php
#	lib/AvirWrapper.php
#	tests/AvirWrapperTest.php
# Conflicts:
#	appinfo/info.xml
#	lib/AppInfo/Application.php
#	lib/Scanner/ExternalKaspersky.php
#	lib/Scanner/ScannerBase.php
@lars-sh lars-sh changed the base branch from master to stable6.2 March 15, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants