-
Notifications
You must be signed in to change notification settings - Fork 168
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
types: refactor multiple fuzzers #1258
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1258 +/- ##
===========================================
- Coverage 63.25% 42.11% -21.15%
===========================================
Files 82 74 -8
Lines 7670 7225 -445
===========================================
- Hits 4852 3043 -1809
- Misses 2205 3874 +1669
+ Partials 613 308 -305
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
c1fc80b
to
792dfa6
Compare
Signed-off-by: AdamKorcz <adam@adalogics.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Feel free to address the review in a follow-up, they're minor.
func FuzzCreateProposedEntry(f *testing.F) { | ||
f.Fuzz(func(t *testing.T, version string) { | ||
initter.Do(fuzzUtils.SetFuzzLogger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be moved to cose v0.0.1 and populate the props with CreateProps
like other types?
if err != nil { | ||
return props, nil, err | ||
} | ||
props.ArtifactPath = artifactURL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases, if ArtifactBytes
are written, then we won't even look at the ArtifactPath
(
rekor/pkg/types/rekord/v0.0.1/entry.go
Lines 343 to 345 in 8fbe9e4
if artifactBytes == nil { | |
var artifactReader io.ReadCloser | |
if props.ArtifactPath == nil { |
ff
to either use ArtifactBytes
directly or use it from ArtifactPath
and clear ArtifactBytes
?
The same goes for SignatureBytes
and SignaturePath
/PublicKeyBytes
and PublicKeyPaths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misread this! If the ArtifactBytes are nil -- lgtm! (Just see about the Signature/PublicKey if there are any issues)
Signed-off-by: AdamKorcz adam@adalogics.com
Summary
Adds a fuzzer for intoto v0.0.2
Does the following changes to multiple types fuzzers:
nil
for the properties.rekor/pkg/types/helm/v0.0.1/entry.go
Lines 46 to 50 in 26f44cd
Release Note
Documentation