nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: EnMasseProject/enmasse
Pull request #2409 (2019-03-05 18:15:24)

Re-add surefire provider to exclude tests

lulf: @enmasse-ci run tests
lulf: @enmasse-ci run tests
lulf: @enmasse-ci run tests

Patch:
diff --git a/pom.xml b/pom.xml
index ffc962410..64d516e9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,6 +62,7 @@
         <hamcrest.version>1.3</hamcrest.version>
         <junit.jupiter.version>5.4.0</junit.jupiter.version>
         <junit.platform.runner.version>1.4.0</junit.platform.runner.version>
+        <junit.platform.surefire.provider.version>1.3.2</junit.platform.surefire.provider.version>
         <junit.platform.launcher.version>1.4.0</junit.platform.launcher.version>
         <artemis.version>2.6.4</artemis.version>
         <ngwebdriver.version>1.1.4</ngwebdriver.version>
@@ -843,6 +844,13 @@
                       <vertx.logger-delegate-factory-class-name>io.vertx.core.logging.SLF4JLogDelegateFactory</vertx.logger-delegate-factory-class-name>
                     </systemPropertyVariables>
                 </configuration>
+                <dependencies>
+                  <dependency>
+                    <groupId>org.junit.platform</groupId>
+                    <artifactId>junit-platform-surefire-provider</artifactId>
+                    <version>${junit.platform.surefire.provider.version}</version>
+                  </dependency>
+                </dependencies>
             </plugin>
             <plugin>
                 <groupId>com.mycila</groupId>


Test patch:
diff --git a/systemtests/pom.xml b/systemtests/pom.xml
index 2ca34b816..24b0d0b8e 100644
--- a/systemtests/pom.xml
+++ b/systemtests/pom.xml
@@ -124,6 +124,13 @@
                         <enmasse.version>${release.version}</enmasse.version>
                     </systemProperties>
                 </configuration>
+                <dependencies>
+                  <dependency>
+                    <groupId>org.junit.platform</groupId>
+                    <artifactId>junit-platform-surefire-provider</artifactId>
+                    <version>${junit.platform.surefire.provider.version}</version>
+                  </dependency>
+                </dependencies>
             </plugin>
             <plugin>
                 <groupId>org.owasp</groupId>
Repository: smallstep/crypto
Pull request #7 (2020-09-01 18:00:37)

Do not enforce signature algorithm when no templates are used.
### Description
This PR creates a certificate template without enforcing the CSR signature algorithm when no JSON templates are used.

This was causing step-ca failing to start with RSA keys.


Patch:
diff --git a/x509util/certificate.go b/x509util/certificate.go
index 7732bc1..d86dda1 100644
--- a/x509util/certificate.go
+++ b/x509util/certificate.go
@@ -52,9 +52,12 @@ func NewCertificate(cr *x509.CertificateRequest, opts ...Option) (*Certificate,
 	}
 
 	// If no template use only the certificate request with the default leaf key
-	// usages.
+	// usages. And do not enforce signature algorithm from the CSR, it might not
+	// be compatible with the certificate signer.
 	if o.CertBuffer == nil {
-		return newCertificateRequest(cr).GetLeafCertificate(), nil
+		cert := newCertificateRequest(cr).GetLeafCertificate()
+		cert.SignatureAlgorithm = 0
+		return cert, nil
 	}
 
 	// With templates


Test patch:
diff --git a/x509util/certificate_test.go b/x509util/certificate_test.go
index a14d520..152dc04 100644
--- a/x509util/certificate_test.go
+++ b/x509util/certificate_test.go
@@ -140,7 +140,7 @@ func TestNewCertificate(t *testing.T) {
 			Extensions:         newExtensions(cr.Extensions),
 			PublicKey:          priv.Public(),
 			PublicKeyAlgorithm: x509.Ed25519,
-			SignatureAlgorithm: SignatureAlgorithm(x509.PureEd25519),
+			SignatureAlgorithm: SignatureAlgorithm(x509.UnknownSignatureAlgorithm),
 		}, false},
 		{"okDefaultTemplate", args{cr, []Option{WithTemplate(DefaultLeafTemplate, CreateTemplateData("commonName", []string{"foo.com"}))}}, &Certificate{
 			Subject:  Subject{CommonName: "commonName"},
Repository: smallstep/crypto
Pull request #10 (2020-09-21 19:18:50)

Create a new default template for admin provisioners.
### Description

This PR adds a new template were only the SANs and subject is read from the CR. The key usage and extended key usages are set in the template.

This template would become the default in k8ssa and admin-OIDC provisioners instead of using `{{ toJson .Insecure.CR }}`


Patch:
diff --git a/x509util/templates.go b/x509util/templates.go
index c1c32bf..45ad9a3 100644
--- a/x509util/templates.go
+++ b/x509util/templates.go
@@ -129,6 +129,23 @@ const DefaultIIDLeafTemplate = `{
 	"extKeyUsage": ["serverAuth", "clientAuth"]
 }`
 
+// DefaultAdminLeafTemplate is a template used by default by K8sSA and
+// admin-OIDC provisioners. This template takes all the SANs and subject from
+// the certificate request.
+const DefaultAdminLeafTemplate = `{
+	"subject": {{ toJson .Insecure.CR.Subject }},
+	"dnsNames": {{ toJson .Insecure.CR.DNSNames }},
+	"emailAddresses": {{ toJson .Insecure.CR.EmailAddresses }},
+	"ipAddresses": {{ toJson .Insecure.CR.IPAddresses }},
+	"uris": {{ toJson .Insecure.CR.URIs }},
+{{- if typeIs "*rsa.PublicKey" .Insecure.CR.PublicKey }}
+	"keyUsage": ["keyEncipherment", "digitalSignature"],
+{{- else }}
+	"keyUsage": ["digitalSignature"],
+{{- end }}
+	"extKeyUsage": ["serverAuth", "clientAuth"]
+}`
+
 // DefaultIntermediateTemplate is a template that can be used to generate an
 // intermediate certificate.
 const DefaultIntermediateTemplate = `{


Test patch:
diff --git a/x509util/options_test.go b/x509util/options_test.go
index 7d2ee72..89a867b 100644
--- a/x509util/options_test.go
+++ b/x509util/options_test.go
@@ -112,6 +112,26 @@ func TestWithTemplate(t *testing.T) {
 	"extKeyUsage": ["serverAuth", "clientAuth"]
 }`),
 		}, false},
+		{"admin", args{DefaultAdminLeafTemplate, TemplateData{}, cr}, Options{
+			CertBuffer: bytes.NewBufferString(`{
+	"subject": {"commonName":"foo"},
+	"dnsNames": ["foo.com"],
+	"emailAddresses": ["foo@foo.com"],
+	"ipAddresses": ["::1"],
+	"uris": ["https://foo.com"],
+	"keyUsage": ["digitalSignature"],
+	"extKeyUsage": ["serverAuth", "clientAuth"]
+}`)}, false},
+		{"adminRSA", args{DefaultAdminLeafTemplate, TemplateData{}, crRSA}, Options{
+			CertBuffer: bytes.NewBufferString(`{
+	"subject": {"commonName":"foo"},
+	"dnsNames": ["foo.com"],
+	"emailAddresses": ["foo@foo.com"],
+	"ipAddresses": ["::1"],
+	"uris": ["https://foo.com"],
+	"keyUsage": ["keyEncipherment", "digitalSignature"],
+	"extKeyUsage": ["serverAuth", "clientAuth"]
+}`)}, false},
 		{"fail", args{`{{ fail "a message" }}`, TemplateData{}, cr}, Options{}, true},
 		{"error", args{`{{ mustHas 3 .Data }}`, TemplateData{
 			"Data": 3,
Repository: smallstep/crypto
Pull request #801 (2025-07-08 08:53:27)

Remove underscore from `bcrypt_pbkdf` package
CI was flaky, sometimes triggering on the underscore, and sometimes not. For example, this [merge commit](https://github.com/smallstep/crypto/actions/runs/16138378521/job/45539789357) failed, whereas the [PR itself](https://github.com/smallstep/crypto/pull/800) was green. Let's deal with it once and for all.


Patch:
diff --git a/internal/bcrypt_pbkdf/bcrypt_pbkdf.go b/internal/bcrypt_pbkdf/bcrypt_pbkdf.go
index 65010b5..e5d37e4 100644
--- a/internal/bcrypt_pbkdf/bcrypt_pbkdf.go
+++ b/internal/bcrypt_pbkdf/bcrypt_pbkdf.go
@@ -2,11 +2,9 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Package bcrypt_pbkdf implements password-based key derivation function based
+// Package bcryptpbkdf implements password-based key derivation function based
 // on bcrypt compatible with bcrypt_pbkdf(3) from OpenBSD.
-//
-//nolint:staticcheck // ignore underscore in package
-package bcrypt_pbkdf
+package bcryptpbkdf
 
 import (
 	"crypto/sha512"


Test patch:
diff --git a/internal/bcrypt_pbkdf/bcrypt_pbkdf_test.go b/internal/bcrypt_pbkdf/bcrypt_pbkdf_test.go
index f6f1027..3ab05c4 100644
--- a/internal/bcrypt_pbkdf/bcrypt_pbkdf_test.go
+++ b/internal/bcrypt_pbkdf/bcrypt_pbkdf_test.go
@@ -1,9 +1,7 @@
 // Copyright 2014 Dmitry Chestnykh. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
-//
-//nolint:staticcheck // ignore underscore in package
-package bcrypt_pbkdf
+package bcryptpbkdf
 
 import (
 	"bytes"