← Back to issue list

feat: add secrets API

View original Github issue

Metadata

Project
craft-cli
Number
#185
Type
pull request
State
merged
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #185 (commit e988947) adds Emitter.set_secrets(), masking registered strings as "*****" across emitter messages, log calls, spinner, progress bar and streaming brief prefix via Printer._apply_secrets.

Resolution: closed resolved

Reason: The PR was merged into main as commit e988947 ('feat: add secrets API (#185)') after approval by two reviewers. The public API landed as Emitter.set_secrets() in craft_cli/messages.py delegating to Printer.set_secrets()/_apply_secrets() in craft_cli/printer.py, with unit and integration tests, and it states 'Fixes #184'.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The public API consists of a single method, `Emitter.set_secrets()`, that receives a list of strings and causes said strings to be masked by "*****" in every output generated by the emitter's printer. This includes regular emitter messages, messages generated by log calls, spinner, progress bar and the "streaming brief" prefix. Fixes #184 (CRAFT-2107)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #185 (commit e988947) adds Emitter.set_secrets(), masking registered strings as "*****" across emitter messages, log calls, spinner, progress bar and streaming brief prefix via Printer._apply_secrets.
stealth/space-bunny-alpha — closed resolved Merged PR #185 (commit e988947), adding Emitter.set_secrets() to mask registered strings across emitter, log, spinner, progress, and streaming output. Fixes #184.
stealth/space-bunny-alpha — closed resolved Merged PR #185 (commit e988947), adding Emitter.set_secrets() to mask configured strings as "*****" across emitter, log, spinner, progress-bar, and streaming output; fixes #184.
qwen/qwen3.6-35b-a3b — — Merged the secrets API feature, adding Emitter.set_secrets to mask sensitive strings across all CLI outputs. Approved by two reviewers, passed CI checks, and achieved 100% diff coverage. Resolves issue 184.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-cli#184 (confidence 95%)

    Feature request 'Add a "secrets" API' that this PR's body claims to fix; that issue's later summary says it was closed as not planned in favour of prototype service build-secrets, but the emitter-side API shipped here.

Related issues

Issue Project State Summary Similarity
#657 feat!(secrets): remove secrets craft-application merged Merged PR #657 in commit ad52b56b, removing built-in secrets support; applications can instead integrate secrets through the prototype secrets service.
72%
#483 feat(secrets): support for 'basic' secrets fetch-service merged Merged PR #483 as commit 83d6fa6, adding support for basic-auth secrets, including validation, HTTP Authorization header injection, session plumbing, and tests.
70%