Skip to content

feat: add airs runtime dlp commands#78

Merged
cdot65 merged 28 commits into
mainfrom
cdot65/dlp-commands
May 23, 2026
Merged

feat: add airs runtime dlp commands#78
cdot65 merged 28 commits into
mainfrom
cdot65/dlp-commands

Conversation

@cdot65

@cdot65 cdot65 commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add airs runtime dlp group: 20 commands across filtering-profiles, patterns, profiles, dictionaries
  • Bump @cdot65/prisma-airs-sdk pin: ^0.8.3^0.9.2
  • Add optional PANW_DLP_ENDPOINT env var
  • Shared getOrCreateManagementClient() factory so DLP + mgmt services share OAuth token cache

Subclient surface

  • filtering-profiles: read + full-replace only (no create/patch/delete — not in DLP API)
  • patterns: full CRUD + soft-delete (archive)
  • profiles: no DELETE — stub delete prints patch-profile_status=deleted idiom + exits 2
  • dictionaries: multipart upload; replace may return 200+body or 204 (re-gets; falls back to "(state not echoed)" on transient failure)

Merge-patch UX

patch commands accept JSON Merge Patch via --set k=v / --clear k (mutex with --body-file). Values coerced (numbers/booleans/JSON literals); '"5"' to force string. --set k=null rejected — use --clear.

SDK pin chain

  • ^0.9.0^0.9.1: widened nullable sweep on DataFilteringProfileResponse + AuditResponseSchema (fixed filtering-profiles list against real tenants)
  • ^0.9.1^0.9.2: extended sweep to DataPatternResponseSchema.matching_rules + DataProfileResponseSchema.expression_tree (unblocks patterns/profiles list)

Coverage

src/airs/dlp/**: 95.23% stmts / 96.87% branches / 96.55% funcs / 95.23% lines. Project thresholds pass.

Live validation matrix (SDK 0.9.2, 2026-05-23)

Command Status
filtering-profiles list
filtering-profiles get <id>
patterns list (1118 elements parsed)
patterns get <id> ⚠ API 400 — upstream, not CLI/SDK
profiles list (30 elements parsed)
profiles get <id> ⚠ API 400 — upstream, not CLI/SDK
dictionaries list (32 elements)
dictionaries get <id>

The two get 400s are server-side (reproducible via raw curl); flagged as known issues in docs/runtime/dlp/{patterns,profiles}.md.

Test plan

  • pnpm test — passes
  • pnpm run lint && pnpm exec tsc --noEmit && pnpm run build — all clean
  • pnpm run dev runtime dlp --help shows all 4 subgroups
  • pnpm run dev runtime dlp profiles delete some-id prints stub + exits 2
  • Live tenant validation matrix above

Related SDK work (shipped)

Related CLI work

  • PR #79--debug JSONL allowlist fix (separate, mergeable independently)

cdot65 added 22 commits May 23, 2026 12:41
Pulls in nullable DLP response schema fixes (cdot65/prisma-airs-sdk#159).
Resolves Zod parse failures on filtering-profiles list against live tenant
(null on description, is_end_user_coaching_enabled, euc_template_id, rule1,
rule2; numeric epoch on audit_metadata.updated_at).
cdot65 added 2 commits May 23, 2026 14:27
Unblocks data-patterns list + data-profiles list against live tenant.
Resolves Zod nulls on matching_rules.* and expression_tree.* nested
schemas via SDK PR #161.
Real redacted output captured against live tenant after SDK ^0.9.2 re-pin.
Filtering-profiles and dictionaries: full list+get. Patterns/profiles: list
only — added known-issue notes flagging the upstream GET-by-id 400 (verified
server-side via curl, not addressable from CLI/SDK).
@cdot65 cdot65 changed the title feat: add airs runtime dlp commands (SDK 0.9.0) feat: add airs runtime dlp commands May 23, 2026
@cdot65 cdot65 merged commit fd9b7a7 into main May 23, 2026
4 checks passed
@cdot65 cdot65 deleted the cdot65/dlp-commands branch May 23, 2026 19:42
cdot65 added a commit that referenced this pull request May 23, 2026
- feat(runtime): airs runtime dlp full CRUD across filtering-profiles,
  patterns, profiles, dictionaries (#78)
- fix(debug): include api.dlp.paloaltonetworks.com in --debug allowlist (#79)
- deps: @cdot65/prisma-airs-sdk ^0.9.2 (DLP nested nullable sweep)

Changesets: 0019, 0020, 0021.
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.

DLP: nested helper schemas still reject null from live API (v0.9.1 follow-up) DLP response schemas reject null + numeric timestamps from live API

1 participant