Skip to content

Sign() uses Plaintext(ctx) instead of WithSecretVariable for registry password #951

@Sypher845

Description

@Sypher845

AttestSBOM() already uses WithSecretVariable + $REGISTRY_PASSWORD for credential handling, but Sign() still extracts the secret via Plaintext(ctx) and passes it as a direct CLI argument.

Before (Sign function logs):

104 : ┆ Secret.plaintext: String!
110 : ┆ withExec cosign sign ... --registry-password ***

After (matching AttestSBOM pattern):

164 : ┆ Container.withSecretVariable(name: "REGISTRY_PASSWORD", secret: Secret!)
169 : ┆ withExec sh -c 'cosign sign ... --registry-password $REGISTRY_PASSWORD ...'

Dagger does mask the value as ***, so it's not a critical leak but making Sign() follow the same pattern as AttestSBOM() improves consistency and makes the logs less confusing (a *** in logs can alarm anyone reviewing them).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions