Skip to content

feat(security): add --page-size and --page-number to rules list - #663

Merged
platinummonkey merged 3 commits into
DataDog:mainfrom
clementgbcn:feat/security-rules-list-pagination
Jul 21, 2026
Merged

feat(security): add --page-size and --page-number to rules list#663
platinummonkey merged 3 commits into
DataDog:mainfrom
clementgbcn:feat/security-rules-list-pagination

Conversation

@clementgbcn

@clementgbcn clementgbcn commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Adds --page-size and --page-number flags to pup security rules list, wiring them into ListSecurityMonitoringRulesOptionalParams.
  • Without pagination, the API silently caps results at 10 rules, making it impossible to retrieve more than the first page of a large ruleset.

No JIRA ticket — standalone usability fix.

The implementation follows the existing pattern used by pup users list and the internal backend_rules_list function in csm_threats.rs, both of which already use page_size/page_number on the same SDK type.

Will it impact other teams?

Only users of pup security rules list — no cross-team service impact.

Deploy plan

CLI binary only — no service deployments required.

Rollback plan

Revert the commit or pin to the previous pup binary version via Homebrew (brew switch pup <prev-version>).

Testing Guidelines

  • Is this change retro-compatible? Yes — --page-size defaults to 10 (matching the API's implicit default) and --page-number to 0, so existing callers with no flags get identical behaviour.
  • Tested in staging — CLI tool, not a service; verified locally that cargo check passes clean.
  • Acceptable performance — no performance concern.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@clementgbcn
clementgbcn requested a review from a team as a code owner July 20, 2026 21:28
@datadog-prod-us1-6

This comment has been minimized.

clementgbcn and others added 2 commits July 20, 2026 23:32
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@platinummonkey
platinummonkey merged commit 72b91c9 into DataDog:main Jul 21, 2026
6 checks passed
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.

2 participants