Skip to content

feat(secrets): harden the secret form - #2939

Draft
camielvs wants to merge 1 commit into
cvs/team-run-methodsfrom
cvs/secret-form-hardening
Draft

camielvs wants to merge 1 commit into
cvs/team-run-methodsfrom
cvs/secret-form-hardening

Conversation

@camielvs

@camielvs camielvs commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Four fixes to the add and replace secret form. They apply to Settings → Secrets today, and to the team secrets screens later in this stack.

  • The value field sets autocomplete="new-password", so browsers stop offering a saved login password for it.
  • A name containing / is refused. The name is a path segment in the replace and delete requests, so such a secret could be created but never changed or removed.
  • Deleting asks first. A deleted secret makes every run that uses it fail at launch. Once secrets are shared with a team, that's everyone's runs.
  • Description and expiry fields. The backend writes either one only when a value is sent, so neither can be cleared once set. Replacing a secret keeps its description and expiry unless new ones are given, and the form says so. The backend doesn't enforce expiry, so the form calls it a reminder. The Settings list shows a secret's description under its name.

The E2E removeSecret helper now confirms the delete dialog.

Related Issue and Pull requests

Type of Change

  • Improvement

Line Breakdown

Category Added Removed
Production code 222 30
Tests 287 0
Total 509 30

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

None yet.

Test Instructions

pnpm vitest run src/components/shared/SecretsManagement

In Settings → Secrets:

  1. Add a secret with a description and an expiry date. The description shows under its name.
  2. Try a name containing /. The form refuses it.
  3. Replace the secret without filling in the description or expiry. Both are kept, and the form's hints say so.
  4. Delete the secret. A confirmation names the secret before anything is removed.

Additional Comments

None.

🤖 Generated with Claude Code

Four fixes to the add and replace form, carried over from the
superseded workspace-secrets draft (#2886). They apply to Settings →
Secrets today and to the team secrets screens that follow.

- The value field sets `autocomplete="new-password"`, so browsers stop
  offering a saved login password for it.
- A name containing `/` is refused. The name is a path segment in the
  replace and delete requests, so such a secret could be created but
  never changed or removed.
- Deleting asks first. A deleted secret makes every run that uses it
  fail at launch, and once secrets are shared with a team that is
  everyone's runs.
- Description and expiry fields, using the expiry picker from #2886.
  The backend only writes either when a value is sent, so neither can
  be cleared once set: replacing keeps the current description and
  expiry unless a new one is given, and the form says so. Expiry is not
  enforced by the backend, so the form calls it a reminder. The
  Settings list shows a secret's description under its name.

The E2E `removeSecret` helper now confirms the delete dialog.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cvs/secret-form-hardening/4b24e0c

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant