cloudflare / cloudflare/developer-platform
'scopes' for Secret Store's secrets not retained in local development
- Dominant language
- No language data
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### 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 |
Contributor guide
Assessment
This issue has not been assessed yet.