dagger.Secret used? #142

Closed
opened 2026-05-22 08:15:12 +00:00 by guettli · 1 comment
guettli commented 2026-05-22 08:15:12 +00:00 (Migrated from codeberg.org)

Dagger requires developers to explicitly define sensitive data using a special data type called dagger.Secret (rather than a standard String).

--> check the code-base if this is the case.

Write result into comment of this issue.

Dagger requires developers to explicitly define sensitive data using a special data type called dagger.Secret (rather than a standard String). --> check the code-base if this is the case. Write result into comment of this issue.
guettlibot commented 2026-05-22 14:06:46 +00:00 (Migrated from codeberg.org)

Result of code review: dagger.Secret usage

All actual sensitive credentials in ci/main.go properly use dagger.Secret:

Parameter Type Used in
sshKey *dagger.Secret Deployer, GenerateBuildHistory, BuildWebsite, PublishWebsite, DeployLinux, DeployApk
keystoreBase64 *dagger.Secret setupKeystore, BuildAndroidApk, DeployApk, SignAndroidBundle, PublishAndroid
keystorePassword *dagger.Secret same as above
playStoreConfig *dagger.Secret UploadToPlayStore, PublishAndroid
serviceAccountKey *dagger.Secret TestAndroidFirebase

The secrets are consumed via WithMountedSecret (for files, e.g. SSH key) and WithSecretVariable (for env vars, e.g. keystore, Play Store config) — both prevent the values from appearing in Dagger logs.

The only credentials NOT typed as dagger.Secret are the test passwords in WithStalwart (STALWART_PASS_B="secret", STALWART_PASS_C="secret"). These are hardcoded development passwords for the local Stalwart test server defined in the repo's stalwart-dev/ config — they are not production secrets and require no protection.

Conclusion: dagger.Secret is used correctly throughout the codebase. No changes needed.

## Result of code review: dagger.Secret usage All actual sensitive credentials in `ci/main.go` properly use `dagger.Secret`: | Parameter | Type | Used in | |---|---|---| | `sshKey` | `*dagger.Secret` | `Deployer`, `GenerateBuildHistory`, `BuildWebsite`, `PublishWebsite`, `DeployLinux`, `DeployApk` | | `keystoreBase64` | `*dagger.Secret` | `setupKeystore`, `BuildAndroidApk`, `DeployApk`, `SignAndroidBundle`, `PublishAndroid` | | `keystorePassword` | `*dagger.Secret` | same as above | | `playStoreConfig` | `*dagger.Secret` | `UploadToPlayStore`, `PublishAndroid` | | `serviceAccountKey` | `*dagger.Secret` | `TestAndroidFirebase` | The secrets are consumed via `WithMountedSecret` (for files, e.g. SSH key) and `WithSecretVariable` (for env vars, e.g. keystore, Play Store config) — both prevent the values from appearing in Dagger logs. **The only credentials NOT typed as `dagger.Secret`** are the test passwords in `WithStalwart` (`STALWART_PASS_B="secret"`, `STALWART_PASS_C="secret"`). These are hardcoded development passwords for the local Stalwart test server defined in the repo's `stalwart-dev/` config — they are not production secrets and require no protection. **Conclusion: `dagger.Secret` is used correctly throughout the codebase.** No changes needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#142