Skip to content
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

✨ Support .sigstore bundles to check for signed releases #3772

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions checks/signed_releases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with no assests",
name: "Releases with no assets",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -56,7 +56,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with assests without signed artifacts",
name: "Releases with assets without signed artifacts",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -75,7 +75,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with assests with signed artifacts-asc",
name: "Releases with assets with signed artifacts-asc",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -94,7 +94,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with assests with intoto SLSA provenance",
name: "Releases with assets with intoto SLSA provenance",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -113,7 +113,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with assests with signed artifacts-sig",
name: "Releases with assets with signed artifacts-sig",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -132,7 +132,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with assests with signed artifacts-sign",
name: "Releases with assets with signed artifacts-sign",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -151,7 +151,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with assests with signed artifacts-minisig",
name: "Releases with assets with signed artifacts-minisig",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -170,7 +170,26 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Releases with assests with signed and unsigned artifacts",
name: "Releases with assets with signed artifacts-sigstore",
releases: []clients.Release{
{
TagName: "v1.0.0",
URL: "http://foo.com/v1.0.0",
TargetCommitish: "master",
Assets: []clients.ReleaseAsset{
{
Name: "foo.sigstore",
URL: "http://foo.com/v1.0.0/foo.sigstore",
},
},
},
},
expected: checker.CheckResult{
Score: 8,
},
},
{
name: "Releases with assets with signed and unsigned artifacts",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand All @@ -193,7 +212,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Multiple Releases with assests with signed and unsigned artifacts",
name: "Multiple Releases with assets with signed and unsigned artifacts",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand Down Expand Up @@ -231,7 +250,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "Some releases with assests with signed and unsigned artifacts",
name: "Some releases with assets with signed and unsigned artifacts",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand Down Expand Up @@ -265,7 +284,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "6 Releases with assests with signed artifacts",
name: "6 Releases with assets with signed artifacts",
releases: []clients.Release{
{
TagName: "v1.0.0",
Expand Down Expand Up @@ -372,7 +391,7 @@ func TestSignedRelease(t *testing.T) {
},
},
{
name: "9 Releases with assests with signed artifacts",
name: "9 Releases with assets with signed artifacts",
releases: []clients.Release{
release("v0.8.5"),
release("v0.8.4"),
Expand Down
2 changes: 1 addition & 1 deletion probes/releasesAreSigned/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (
ValueTypeReleaseAsset
)

var signatureExtensions = []string{".asc", ".minisig", ".sig", ".sign"}
var signatureExtensions = []string{".asc", ".minisig", ".sig", ".sign", ".sigstore"}

func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
if raw == nil {
Expand Down
Loading