All scripts
sase
Expert
3–10 min
Netskope DLP Policy Deployer
Deploy and reconcile Netskope DLP rules/profiles from declarative YAML — dictionary/profile/rule sync, drift detection vs the live tenant, dry-run diff and idempotent apply with rollback.
Netskope
You're viewing a preview
The full script, parameters, and execution console are available with a free account.
Already have access? Sign in →
Capabilities
- Netskope REST API v2 auth
- DLP dictionary + profile sync
- Rule-to-profile binding
- Declarative YAML desired-state
- Drift detection vs live tenant
- Dry-run diff preview
- Idempotent apply + rollback
- Scored HTML report
Required inputs
Parameters the script accepts. Defaults shown; some are vendor- or context-gated.
| Parameter | Type | Default | Notes |
|---|---|---|---|
Desired-state YAML desired_state | string | dlp_policies.yaml | — |
Reconcile mode (drift|enforce) reconcile_mode | string | drift | — |
Minimum DLP severity managed severity_floor | string | medium | — |
Rollback on apply error rollback_on_error | bool | true | — |
Sample inventory schema
Authoritative shape of the device/policy data this script consumes.
dlp_policies.yaml
yaml
Mock declarative desired-state — DLP profiles, rules, actions and severityyaml
# Desired-state DLP policy for the Netskope tenant. # The deployer reconciles this against the live tenant (dry-run by default). profiles: PCI-Profile:
tenants.csv
csv
Target Netskope tenant(s) — host + Vault path for the API tokenterminal
tenant,base_url,vault_path,severity_floor acme-prod,https://acme.goskope.com,netops/netskope/prod,medium acme-stage,https://acme-stage.goskope.com,netops/netskope/stage,low
Expected output
Reference terminal output the script should produce — used as a stylistic and structural target.
terminal
[2026-06-12] INFO Netskope DLP: loading desired-state dlp_policies.yaml... [2026-06-12] INFO Fetching live DLP profiles + rules from tenant... ==================== DRY-RUN · PLANNED CHANGES ==================== ACTION PROFILE RULE RESULT + ADD GDPR-Profile EU-PII-Block would create (block) ~ UPDATE PCI-Profile CC-Number-Alert block → alert - DRIFT Legacy-Profile SSN-Test live-only (enforce would delete) = KEEP PCI-Profile CC-Number-Block in-sync ==================================================================