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

[Feat]: Add support for dirhash #446

Open
matglas opened this issue May 17, 2024 · 1 comment
Open

[Feat]: Add support for dirhash #446

matglas opened this issue May 17, 2024 · 1 comment
Assignees

Comments

@matglas
Copy link
Contributor

matglas commented May 17, 2024

Describe the solution you'd like:

Add support for creating dirhash for subjects/products as described in the in-toto attestation spec for the digestset (here).

User value:

This functionality would allow us to collapse folders into something that is easier to consume like 1k small files on nodes modules. These are not valuable as separate subjects one by one. But as a whole they could be valuable.

We have had a scenario where because of the large amount of small files we generated a 2gb files capturing a hash for each one. This could have been minimized a lot by using dirhash's.

Expected behavior:

Instead of a hash for each files allow a dirhash to be captured (following spec). Based on a glob pattern certain paths could be captured as dirhash and all other stuff could be file hashes.

Proposed solution:

Use a argument to specify which path or paths (glob based) should be hashed.

Anything else you would like to add:

I already have the implementation for this.

Testing changes required:

Tests should be added to test dirhash functionality.

Documentation changes required:

Apart from the cli argument no documentation is required additionally unless we want to create a tutorial with examples. For example for node_modules.

@matglas
Copy link
Contributor Author

matglas commented May 17, 2024

You can assign me.

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

1 participant