anchore / anchore/syft

Support XXH and other performant hash algorithms

Open
#3,966 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
9.6k
Forks
954
Avg merge
23h 27m
Merged PRs (30d)
48

Description

Today we support hashing sources as well as files within sources, which is all configurable:

```yaml
# .syft.yaml

file:
metadata:
# the file digest algorithms to use when cataloging files (options: "md5", "sha1", "sha224", "sha256", "sha384", "sha512") (env: SYFT_FILE_METADATA_DIGESTS)
digests:
- 'sha1'
- 'sha256'

source:
file:
# the file digest algorithms to use on the scanned file (options: "md5", "sha1", "sha224", "sha256", "sha384", "sha512") (env: SYFT_SOURCE_FILE_DIGESTS)
digests:
- 'SHA-256'
```

We should add more performant algorithms such as XXH64 (insert more here, open to suggestions!).

Contributor guide

Open the contributing guide

Research direction

Start by tracing the file.metadata.digests and source.file.digests configuration, including SYFT_FILE_METADATA_DIGESTS and SYFT_SOURCE_FILE_DIGESTS, to find their validation and hashing entry points. Determine which performant algorithms are in scope and how they should be exposed; done means both source and file hashing accept the agreed algorithms without breaking existing options, with corresponding tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.