mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
fix: treat zero archive limits as the default
`ArchiveSearchConfig{MaxDepth: 2}` is the natural literal, but zero memory and zero disk meant "forbid both", so every archive was truncated to nothing and only unknowns came out.
- `MaxMemoryBytes` / `MaxDiskBytes` of `0` now mean the default, negative is still unbounded
- the limiter keeps its own zero-forbids semantics internally; it's just no longer reachable from config
- tests that relied on zero to force spilling now pass `archive.Limits` directly, and the two "both limits zero" tests are gone since that config no longer exists
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -10,9 +10,9 @@ configs: # AUTO-GENERATED - config structs and their fields
|
||||
- key: MaxDepth
|
||||
description: 'MaxDepth is how many levels of nested archives to catalog: 0 disables it, negative is unbounded.'
|
||||
- key: MaxMemoryBytes
|
||||
description: MaxMemoryBytes bounds the archive content held in memory at once; content that does not fit is written to disk. Zero writes everything to disk, negative is unbounded.
|
||||
description: MaxMemoryBytes bounds the archive content held in memory at once; content that does not fit is written to disk. Zero means DefaultArchiveMaxMemoryBytes, negative is unbounded.
|
||||
- key: MaxDiskBytes
|
||||
description: MaxDiskBytes bounds the archive content written to disk at once; an archive whose content does not fit is skipped or truncated. Zero writes nothing to disk, negative is unbounded.
|
||||
description: MaxDiskBytes bounds the archive content written to disk at once; an archive whose content does not fit is skipped or truncated. Zero means DefaultArchiveMaxDiskBytes, negative is unbounded.
|
||||
- key: UseNetwork
|
||||
description: UseNetwork enables network operations for java package metadata enrichment, such as fetching parent POMs and license information.
|
||||
app_key: java.use-network
|
||||
|
||||
Reference in New Issue
Block a user