cloudflare / cloudflare/developer-platform

'scopes' for Secret Store's secrets not retained in local development

Offen
#10 7 Kommentare 7 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
product:secrets-store
Vorherrschende Sprache
Keine Sprachdaten
Sterne
1
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### What versions & operating system are you using?

Wrangler 4.16.1 | MacOS | Node v22.14.0

### Please provide a link to a minimal reproduction

_No response_

### Describe the Bug

When creating a secret using `wrangler secrets-store secret create` with the `--scopes` parameter, the scopes are correctly set during creation but are not displayed when listing secrets with `wrangler secrets-store secret list`.

The secrets are also unavailable during runtime: `Error: Secret "EXAMPLE_SECRET" not found`

### Steps to Reproduce
1. Create a secret with scopes specified:
```bash
pnpm exec wrangler secrets-store secret create --name EXAMPLE_SECRET --scopes workers
```
2. List secrets in the store:
```bash
pnpm exec wrangler secrets-store secret list
```

### Expected Behavior
The `Scopes` column in the list output should display the scopes that were specified during secret creation (in this case, "workers").

### Actual Behavior
The `Scopes` column is empty when listing secrets, even though the scope was specified during creation and appeared in the creation confirmation.

### Please provide any relevant error logs

```bash
➜ my-project git:(main) ✗ pnpm exec wrangler secrets-store secret create --name EXAMPLE_SECRET --scopes workers
```

```
⛅️ wrangler 4.16.1
-------------------
▲ [WARNING] 🚧 `wrangler secrets-store secret create` is an alpha command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose
✔ Enter a secret value: … **********************
🔐 Creating secret... (Name: EXAMPLE_SECRET, Value: REDACTED, Scopes: workers, Comment: undefined)
✅ Created secret! (ID: )
```

| Name | ID | StoreID | Comment | Scopes | Status | Created | Modified |
|------|----|---------|---------|---------|---------|---------|---------|
| EXAMPLE_SECRET | `` | `` | | workers | pending | 5/23/2025, 9:25:04 PM | 5/23/2025, 9:25:04 PM |

### Secret Listing (scopes missing)
```bash
➜ my-project git:(main) ✗ pnpm exec wrangler secrets-store secret list
```

```
⛅️ wrangler 4.16.1
-------------------
▲ [WARNING] 🚧 `wrangler secrets-store secret list` is an alpha command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose
🔐 Listing secrets... (store-id: , page: 1, per-page: 10)
```

| Name | ID | Comment | Scopes | Status | Created | Modified |
|------|----|---------|---------|---------|---------|---------|
| EXAMPLE_SECRET | `` | | | active | 5/23/2025, 9:25:14 PM | 5/23/2025, 9:25:14 PM |

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reproducing the issue with the provided `wrangler secrets-store secret create --scopes workers` and `secret list` commands, then trace the Wrangler secrets-store create and list entry points. Done means the listed secret retains and displays its `workers` scope, and the created secret is available at runtime as described.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
node.js
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.