Skip to content

Conversation

@shepilov
Copy link
Contributor

Files are now checked against their antivirus scan status before download, preview, share, and delete operations. When an action is blocked based on configuration, the API returns HTTP 451 (Unavailable For Legal Reasons) with details about the blocked action and detected threat.

@shepilov shepilov requested a review from a team as a code owner December 17, 2025 13:32
Comment on lines +1456 to +1462
// Check antivirus status for files
if file != nil {
if err = CheckAntivirusAction(instance, file, ActionDelete); err != nil {
return err
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will prevent trashing files with viruses. I don't think we want that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it depends on the configuration. If we configure the stack to prevent it, we should do it

Comment on lines +1612 to +1618
// Check antivirus status for files
if file != nil {
if err = CheckAntivirusAction(inst, file, ActionDelete); err != nil {
return err
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will prevent permanently deleting files with viruses. This is the opposite of what we want I believe :).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can delete them with vfs API, we just forbid actions to users/konnectors that are configured as forbidden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants