openSUSE / cavil

The legal review and SBOM system used by SUSE and openSUSE
GNU General Public License v2.0
34 stars 6 forks source link

Diffiicult to navigate to sources from report with nested archives #50

Open AdamMajer opened 3 years ago

AdamMajer commented 3 years ago

A given report with .obscpio archive which contains other archives would have a report like,

MPL-Unspecified: 3 files

node_modules.obscpio._/package._1281/index.js
node_modules.obscpio._/package._1282/index.js
node_modules.obscpio._/package._943/node_modules/spdx-correct/index.js

It would be a lot more helpful to have the output include the name of the inner archives in the filenames. Even if you filter it to only include limited characters set [0-9a-zA-Z_+\-\.] (think XSS) it would be a lot more helpful than the current format.

MPL-Unspecified: 3 files

node_modules.obscpio._/package._1281.some_program_5.4.tgz/index.js
node_modules.obscpio._/package._1282.another_program_1.4.tgz/index.js
node_modules.obscpio._/package._943.magics_23.tgz/node_modules/spdx-correct/index.js
kraih commented 3 years ago

This is pretty much a duplicate of #8, the naming is decided by File::Unpack.

AdamMajer commented 3 years ago

Not sure a duplicate. Maybe the solution is the same but the problem looks different.

kraih commented 3 years ago

I've actually renamed the other issue so we can collect all problems with File::Unpack in one place. Maybe that will raise the priority of creating our own module.

kraih commented 13 hours ago

As it happens, we have our own module now and can theoretically make changes. https://github.com/openSUSE/perl-File-Unpack2