cloudflare / cloudflare/workers-sdk
Move command arg sanitization allow list to command definition behaviours
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 186
Description
Should probably be tackled with others related issues, see https://github.com/cloudflare/workers-sdk/issues/12197
We have a general purpose `getAllowedArgs()` function that currently only uses the `COMMAND_ARG_ALLOW_LIST` object to determine which args can appear in telemetry. Now that we are moving `sendCommandEvent()` calls to a place where there is access to the `CommandDefinition` we should refactor the code to put this information in the `CommandDefinition.behaviour` field.
Related to https://github.com/cloudflare/workers-sdk/issues/12029.
See https://github.com/cloudflare/workers-sdk/pull/12063#discussion_r2726400289
Contributor guide
Assessment
This issue has not been assessed yet.