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

"Skip MimeTypes from scanning" Feature is Not Working #2742

Closed
Abilash18 opened this issue May 21, 2024 · 2 comments
Closed

"Skip MimeTypes from scanning" Feature is Not Working #2742

Abilash18 opened this issue May 21, 2024 · 2 comments

Comments

@Abilash18
Copy link

Abilash18 commented May 21, 2024

Description:

We encountered difficulties with the "Skip MimeTypes from scanning" feature in Fossology version 4.4.0. Despite configuring specific MIME types (such as jpg, png, jpeg) to be excluded from scans, these files are still being scanned.

How to reproduce:

Create a FOSSology instance (using public docker image - version 4.4.0)

Scenario 1:

  1. Add MIME type files (jpg, png, jpeg) to the exclude list in the "Skip MimeTypes from scanning" section on the customize page.

  2. Upload a package containing files with these MIME types.

  3. Select the option - "Ignore SCM files (Git, SVN, TFS) and files with particular Mimetype."

  4. Initiate the upload.

Observation:

After the upload, upon browsing the files, it is observed that the files with the specified MIME types are included in the scan, contrary to the expected behavior where they should be skipped.

Scenario 2:

  1. Add MIME type files (png) to the exclude list in the "Skip MimeTypes from scanning" section on the customize page.
    Go to 'admin --> customize'

image

  1. Upload a package containing files with these MIME types(PNG).

  2. Select the option - "Ignore SCM files (Git, SVN, TFS) and files with particular Mimetype."

  3. Initiate the upload.

  4. check the file browser,
    Observation:
    The system skips the PNG files during the upload process

image

  1. Initiated the another scan for the same package. This time, do not select the option "Ignore SCM files (Git, SVN, TFS) and files with particular Mimetype."

Observation:
The system scans all files, including the PNG files that were skipped in the previous upload.

image

Complete Job Flow,

image

Versions: 4.4.0

We would appreciate your guidance on how to properly use the "Skip MimeTypes from scanning" feature. An example would be very helpful.

@shaheemazmalmmd
Copy link
Member

@Abilash18 : This is the expected behavior as you have checked the option "Ignore SCM files (Git, SVN, TFS) and files with particular Mimetype" it ignored and vice versa.

This feature will not work if you don't check "Ignore SCM files (Git, SVN, TFS) and files with particular Mimetype"

@Abilash18
Copy link
Author

Abilash18 commented Jun 7, 2024

@shaheemazmalmmd

We have added MIME type files (jpg, png, jpeg) to the exclude list in the "Skip MimeTypes from scanning" section on the customize page.

(png, .png, image/png)*

Upload: 1
We uploaded a source package, selected the option "Ignore SCM files (Git, SVN, TFS) and files with particular MIME types," initiated the scan, and the system successfully skipped the PNG files that we added for exclusion.

Upload: 2
With the same source package that we uploaded in upload 1, we created a new upload, this time without selecting the option "Ignore SCM files (Git, SVN, TFS) and files with particular MIME types," initiated the scan, and the system included the PNG files in the 2nd upload. However, the system also included the PNG files that were skipped in the previous scan (Upload 1).

We didn't selected the ignore option only for the 2nd upload, but it affected in the 1st upload as well.
Is this an expected behavior?

and also can you able to provide a correct format for adding mime-type files to exclude in "Skip MimeTypes from scanning"
We tried all the mime-type patterns as below which will be the correct format?
(png, .png, image/png)*

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

No branches or pull requests

2 participants