Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change avscanner results priority #1890

Open
PE39806 opened this issue Feb 5, 2025 · 0 comments
Open

Change avscanner results priority #1890

PE39806 opened this issue Feb 5, 2025 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed javascript Pull requests that update Javascript code

Comments

@PE39806
Copy link
Contributor

PE39806 commented Feb 5, 2025

Currently, when multiple scanners are run against a given file, we get multiple possible results and only one is shown in the preview window. The priority is defined in https://github.com/gchq/Bailo/blob/main/frontend/src/entry/model/releases/FileDownload.tsx#L43-L55. However, if a file >100MB is uploaded then ClamAV will always fail to scan the file (due to a max size limit) and this is shown as higher priority than another scanner e.g. ModelScan finding that the file is infected.

Image

This priority should be reordered to be (highest to lowest): if file.avScan === undefined, if threatsFound(file), if file.avScan.some((scan) => scan.state === ScanState.Error), and finally default return value.

@PE39806 PE39806 added bug Something isn't working good first issue Good for newcomers javascript Pull requests that update Javascript code help wanted Extra attention is needed enhancement New feature or request and removed bug Something isn't working labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

1 participant