Skip to content

Commit

Permalink
add comment explaining the format
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Oct 10, 2024
1 parent 40bd89a commit d18d748
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/security/resolvers/sbom/file_querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ type fileQuerier struct {
pkgs []*Package
}

/*
files are stored in the following format:
| partSize | hash1 | hash2 | ... | partSize | hash3 | hash4 | ... | partSize | hash5 | hash6 | ... |
where partSize is the number of hashes in the part
and each part group is at the index of the given package
for example here hash5 would match pkgs[2]
*/

func newFileQuerier(report *trivy.Report) fileQuerier {
fileCount := 0
pkgCount := 0
Expand Down

0 comments on commit d18d748

Please sign in to comment.