Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
# If no files are changed at all, then `grep -v` will match even though no change outputs
# should be true. Skipping output on an empty set of changes eliminates the false positive
if [[ -n "${CHANGED_FILES}" ]]; then
NON_DOCS=$(echo "${CHANGED_FILES}" | grep -Eqv '\.md$' && echo 'true' || echo 'false')
YAML=$(echo "${CHANGED_FILES}" | grep -Eq '\.ya?ml$' && echo 'true' || echo 'false')
NON_DOCS=$(echo "${CHANGED_FILES}" | grep -Ev '\.md$' > /dev/null 2>&1 && echo 'true' || echo 'false')
YAML=$(echo "${CHANGED_FILES}" | grep -E '\.ya?ml$' > /dev/null 2>&1 && echo 'true' || echo 'false')
echo "non-docs=${NON_DOCS}" | tee -a $GITHUB_OUTPUT
echo "yaml=${YAML}" | tee -a $GITHUB_OUTPUT
fi
Expand Down
343 changes: 179 additions & 164 deletions go.mod

Large diffs are not rendered by default.

831 changes: 411 additions & 420 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/chains/signing/x509/x509.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func cosignSigner(ctx context.Context, secretPath string, privateKey []byte) (*S
if err != nil {
return nil, errors.Wrap(err, "reading cosign.password file")
}
signer, err := cosign.LoadPrivateKey(privateKey, password)
signer, err := cosign.LoadPrivateKey(privateKey, password, nil)
if err != nil {
return nil, err
}
Expand Down
6 changes: 4 additions & 2 deletions pkg/chains/signing/x509/x509_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ const ed25519Priv = `-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIGQn0bJwshjwuVdnd/FylMk3Gvb89aGgH49bQpgzCY0n
-----END PRIVATE KEY-----`

// npx jwtgen -a HS256 -s "my-secret" -c "iss=user123" -e 3600
const token = `eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2Nzc1NjAyMTgsImV4cCI6MTY3NzU2MzgxOCwiaXNzIjoidXNlcjEyMyJ9.c-sDgCyuZA6VaIGl7Y3-9XxttW1PUkBeNBLE9gCKG8s`
// Generated with RS256 algorithm (required for cosign v2.6.0+)
// openssl genrsa -out private.pem 2048
// python3 -c "import jwt; import time; private_key = open('/tmp/private.pem').read(); payload = {'iat': int(time.time()), 'exp': int(time.time()) + 3600 * 24 * 365 * 10, 'iss': 'user123'}; print(jwt.encode(payload, private_key, algorithm='RS256'))"
const token = `eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjIzMTIzOTQsImV4cCI6MjA3NzY3MjM5NCwiaXNzIjoidXNlcjEyMyJ9.Adm27mf955gZA2pcWLqF4LLrqzFbXYsdYNg1sScF9MbyeuE-4eVpqV91Rk-iRwwIrtKuOVkEDdulrAqeuIhMxGB7jNXWXxf6sVEHV57_QgB0KR_z-JVxEbTZBu6nIVBwDxmVFGQFVMtZbqsyX8J4F_jp0pSInFPqYQbS9xAGhvOnni_owp325Siev2Z-kWsnTTFOTi0C9g9BApPxXQEE17COYdXjxsBCJQQttb1Ww7IQLCf59wU5ZpNM7npzxvKuOBT1kmHPp1ZDCNxfA_a6JMIB4NQAzYV0ULRbXNftxwglFoyitWge-SyxohnTVfV1gplE8qi6kR2CQJORBMvx6w`

func TestCreateSignerFulcioEnabledDefaultTokenFileMissing(t *testing.T) {
ctx := logtesting.TestContextWithLogger(t)
Expand Down
2 changes: 1 addition & 1 deletion test/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func setupSecret(ctx context.Context, t *testing.T, c kubernetes.Interface, opts
}
s.StringData[p] = string(b)
}
cosignPriv, err := cosign.LoadPrivateKey([]byte(s.StringData["cosign.key"]), []byte(s.StringData["cosign.password"]))
cosignPriv, err := cosign.LoadPrivateKey([]byte(s.StringData["cosign.key"]), []byte(s.StringData["cosign.password"]), nil)
if err != nil {
t.Fatal(err)
}
Expand Down
1 change: 0 additions & 1 deletion vendor/cel.dev/expr/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 6 additions & 24 deletions vendor/cel.dev/expr/MODULE.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading