pkg: remove viper config from spec definitions#2669
Merged
Hayden-IO merged 1 commit intosigstore:mainfrom Nov 5, 2025
Merged
Conversation
Hayden-IO
previously approved these changes
Nov 4, 2025
Contributor
Hayden-IO
left a comment
There was a problem hiding this comment.
I'm good with this approach, I don't think we need a shared limits package. Thanks!
Contributor
|
Just need to fix the test. |
CLI config reading routines from Viper should not be included in spec definition types under pkg because - this creates unnecessarily huge dependency - it creates unexpected reconfiguration/attack method to applications importing the types. Instead, read viper config in Rekor CLI and pass to the types packages to reconfigure them. Default size limit remains unchanged. Signed-off-by: Tonis Tiigi <[email protected]>
8c0bdd2 to
b5fd8f0
Compare
Contributor
Author
|
@haydentherapper I fixed the test, but I'm a bit confused now. Was this expected to fail by default when packages were used without the flag definition in |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2669 +/- ##
===========================================
- Coverage 66.46% 26.16% -40.30%
===========================================
Files 92 190 +98
Lines 9258 20115 +10857
===========================================
- Hits 6153 5263 -890
- Misses 2359 14023 +11664
- Partials 746 829 +83
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hayden-IO
approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLI config reading routines from Viper should not be included in spec definition types under pkg because
- this creates unnecessarily huge dependency
- it creates an unexpected reconfiguration/attack method to applications importing the types.
Instead, read viper config in Rekor CLI and pass to the types packages to reconfigure them. The default size limit remains unchanged.
Optionally, I could instead create a
limitspkg with no dependencies that spec types import for shared implementation. In that case, let me know where you want that pkg defined.Footprint reduction to
sigstore-go/verifierfrom this change:Release Note
Documentation