Skip to content

Commit 590d65d

Browse files
committed
chore(oci): add security warning for insecure OCI registry connections
Add warning log when using insecure OCI registry configuration to alert users about potential security risks. This helps ensure the feature is only used in appropriate testing/development environments.
1 parent e484b16 commit 590d65d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/chains/storage/oci/legacy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ func (b *Backend) buildRemoteOptions(ctx context.Context, obj objects.TektonObje
124124
}
125125
opts = append(opts, auth)
126126
if b.cfg.Storage.OCI.Insecure {
127+
logger := logging.FromContext(ctx)
128+
logger.Warn("Using insecure OCI registry connection. This skips TLS certificate verification and poses security risks. Only use this in testing or development environments.")
127129
// InsecureSkipVerify is used only when explicitly configured for testing or development environments
128130
// This is controlled by the user through configuration and should not be used in production
129131
opts = append(opts, remote.WithTransport(&http.Transport{

0 commit comments

Comments
 (0)