1. Resources
  2. Detection sources
  3. DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED

DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED: Custom JavaScript was added to a PingOne DaVinci flow

Recorded when a DaVinci flow gains custom JavaScript, created directly, cloned or imported. Script in a sign-on flow runs while users authenticate and can read what they enter, so every new script deserves a review.

Log source
PingOne audit activities
Detection value
Supporting
Volume
Low (estimate)
Last updated
Log
PingOne audit activities (PingOne audit activities, on by default)
Service
PingOne audit activities
Operation
DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED
Detects
1 attack (1 rule · 1 detection logic)
MITRE ATT&CK
2 techniques in 4 tactics
Threat groups
4 groups that MITRE ATT&CK records using these techniques
Fields the rules read
action.type

When it is written

A DaVinci flow is the path a user's sign-on or registration follows, built from nodes that each perform one task. PingOne writes this activity when custom JavaScript enters a flow. Ping's administration guide gives three example descriptions: script added during flow creation, during flow cloning and during flow import; _embedded.davinciFlow.creationSource says which (DIRECT, CLONE, IMPORT), and targetNodeId lists the nodes that hold the script. Importing or cloning a flow that already contains script therefore writes the activity too.

Ping writes the type in two ways: the API event reference lists DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED, the administration guide DAVINCI.FLOW.CUSTOM_JAVASCRIPT.ADDED. In the guide's form the same type also covers custom JavaScript added or updated in a connector, told apart by resources.type (DAVINCI_FLOW or DAVINCI_CONNECTOR); the API reference has separate connector types. Check one activity in your own log and keep the form you see.

The activity does not contain the script. A saved change is not live until the flow is deployed (DAVINCI_FLOW.DEPLOYED).

How to turn it on

PingOne audit activities records DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED calls to PingOne audit activities without any setup. Vendor documentation

PingOne records audit activities in every environment without any setup. Administrators read them under Monitoring > Audit, and the Audit Activities API returns the same records. Neither is a collection point: to keep the records and send them to a SIEM, create a webhook (a subscription) in every environment.

  • Retention: Ping keeps user events (authentications, user changes) for 90 days, configuration events of the admin console for 2 years and DaVinci administrative events for 90 days. Data up to 14 days old is available at once; older data has to be retrieved first, at most 14 days per request, which takes 2 to 24 hours.
  • A webhook sends only the event types it lists (filterOptions.includedActionTypes), so add the types the rules read. Choose the Ping Activity Format, the format of the API and of these pages; the Splunk and New Relic formats name fields differently.
  • Not every audit event type can be sent by a webhook. The webhook service accepts only the types on its own supported list and rejects a request that names another one; Ping gives TRUSTED_ISSUER.CREATED and SSO_COOKIE_SETTINGS.UPDATED, both audit events, as examples. Ping does not publish that list (the error message returns it), so check for each type the rules read that your webhook accepted it, and read a type it refuses through the Audit Activities API.
  • The source IP address and user agent are left out of webhook events unless Include IP address and Include User Agent are selected. Rules that count by source.ipAddress need the address.
  • A webhook request carries up to 500 events, and Ping holds events no more than 2 seconds before sending. If the destination is down, PingOne retries and queues the events; after 7 days it starts to lose them.
  • Ping documents that the Audit Activities API has a lower rate limit than other endpoints and points to webhooks for high-volume events.

The commands below call the PingOne API with curl and jq. Set API_PATH to the API base URL of your region (for example https://api.pingone.com), ENV_ID to the environment ID and TOKEN to an access token whose roles grant subscriptions:read:subscription, orgmgt:read:environment and audit_reporting:read:activity.

List the webhooks of an environment, the event types each sends and whether it includes the IP address (read only)
curl -s "$API_PATH/v1/environments/$ENV_ID/subscriptions" -H "Authorization: Bearer $TOKEN" | jq '._embedded.subscriptions[] | {name, enabled, format, ipAddressExposed: .filterOptions.ipAddressExposed, types: .filterOptions.includedActionTypes}'
Based on vendor documentation.
List the environments of the organization, each of which needs its own webhook (read only)
curl -s "$API_PATH/v1/environments" -H "Authorization: Bearer $TOKEN" | jq '._embedded.environments[] | {id, name, type}'
Based on vendor documentation.
Find recent DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED records (read only)
curl -s -G "$API_PATH/v1/environments/$ENV_ID/activities" -H "Authorization: Bearer $TOKEN" --data-urlencode "filter=recordedat gt \"$(date -u -d '-7 days' +%FT%TZ)\" AND recordedat lt \"$(date -u +%FT%TZ)\" AND action.type eq \"DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED\""
Based on vendor documentation.

Fields

The operation’s own fields first, then the fields every PingOne audit activities record has. Field names are the JSON paths of the record as the vendor documents it.

FieldWhat it holds
_embedded.davinciFlow.creationSourceHow the script entered the flow, DIRECT, CLONE or IMPORT, per the administration guide.
_embedded.davinciFlow.targetNodeIdIDs of the flow nodes that contain the custom JavaScript.
_embedded.davinciFlow.flowIdThe flow's own DaVinci ID (the audit maps it to a UUID in resources.id).
_embedded.davinciFlow.flowNameThe flow's name.
_embedded.davinciFlow.flowStatusState of the flow; the guide gives ACTIVE and DISABLED as examples.
_embedded.davinciFlow.flowTypeHow the flow is started; the guide gives DEFAULT, PINGONE and SCHEDULED as examples.
tagsTags of the activity; the event reference lists it for this action without describing its values.
Fields every PingOne audit activities record has (23)
FieldWhat it holds
idIdentifier (UUID) of the audit activity.
recordedAtWhen PingOne recorded the activity (ISO 8601). The Audit page and the API filter on this time.
createdAtWhen the event was created (ISO 8601).
correlationIdIdentifier (UUID) that PingOne gives the messages of one transaction.
action.typeRead by 1 ruleThe event type, <RESOURCE>.<ACTION> (USER.CREATED). The operation this page is about.
action.descriptionThe event type as a label (User Created).
actors.user.idIdentifier (UUID) of the user who performed the action; absent when an application acted on its own.
actors.user.nameName of that user for PingOne sign-on; the DaVinci guide shows it as the user's email address.
actors.user.population.idPopulation (UUID) of the acting user.
actors.client.idIdentifier of the application (client) through which the action was made; for a worker application acting alone, the actor.
actors.client.nameName of that application.
resources.typeType of the resource the action affected (USER, APPLICATION, ENVIRONMENT...). resources is an array.
resources.idIdentifier (UUID) of the affected resource. Ping maps DaVinci IDs to a UUID here and keeps the original in resources.davinciId.
resources.nameName of the affected resource, such as the user name or the environment name.
resources.hrefURL of the affected resource in the PingOne API. Ping's example records carry it, and its event reference lists it for nearly every event type.
resources.environment.idEnvironment (UUID) the affected resource belongs to.
resources.population.idPopulation (UUID) of the affected resource, when it is a user.
result.statusWhether the action succeeded. Ping's example records carry SUCCESS; the data model lists succeeded and failed, and the DaVinci guide FAILURE. Check the values your own records carry.
result.descriptionWhat happened, in words (Created Group Managers), with the reason when it failed.
source.ipAddressAddress of the HTTP request that caused the action, as PingOne saw it (it can be a proxy). In webhook events only when the webhook includes it.
source.userAgentUser-Agent header of that request. In webhook events only when the webhook includes it.
internalCorrelation.sessionIdPingOne session identifier (UUID) of the actor.
internalCorrelation.transactionIdPingOne transaction identifier. Ping's data model marks it optional, and its event reference lists it for about a quarter of the event types, so do not expect it on every record.

Values to know

_embedded.davinciFlow.creationSource

ValueMeaningSignal
DIRECTScript written into the flowNew code in the sign-on path; review it before the flow is deployed.Worth knowing
CLONEThe flow was cloned with its scriptThe script already existed in the source flow.Expected
IMPORTAn imported flow brought its scriptCommon when flows are promoted between environments; compare with the exported original.Expected

Volume and noise

Low to moderate where teams build DaVinci flows: client-side script for form behavior or branding is common, and imports of flows between environments repeat it. Script added directly (DIRECT) to a production flow by someone outside the flow team is the one to read.

Keeping it manageable

  • Read the nodes in _embedded.davinciFlow.targetNodeId and review the script like application code; look for calls to outside addresses.
  • Separate CLONE and IMPORT (copies of script that already exists) from DIRECT (new script), and review the direct ones first.
  • Look for a deployment of the same flow (resources.id) by the same actor soon after; that is when the script reaches users.
  • If your records use the dotted form, filter on resources.type: DAVINCI_CONNECTOR marks connector script, which has its own page.

Sample event

A PingOne audit activities record in the vendor’s format, with made-up values.

{
  "id": "7d2c4e1a-5b3f-4c8d-9e0a-1b2c3d4e5f60",
  "recordedAt": "2026-11-18T09:30:12.418Z",
  "createdAt": "2026-11-18T09:30:12.431Z",
  "correlationId": "3f4e5d6c-7b8a-4960-8a1b-2c3d4e5f6a7b",
  "actors": {
    "user": {
      "id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "name": "idadmin@corp.example.com",
      "type": "USER",
      "environment": {
        "id": "5c3a9b2e-1f4d-4e6a-9b8c-7d2e1f0a3b4c"
      },
      "population": {
        "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b"
      }
    },
    "client": {
      "id": "adminui",
      "name": "adminui",
      "type": "CLIENT"
    }
  },
  "action": {
    "type": "DAVINCI_FLOW.CUSTOM_JAVASCRIPT_ADDED",
    "description": "DaVinci Flow Custom JavaScript Added"
  },
  "resources": [
    {
      "type": "DAVINCI_FLOW",
      "id": "3a1f9c0e-7b2d-4e8f-9a6c-5b4d3e2f1a0b",
      "davinciId": "3a1f9c0e7b2d4e8f9a6c5b4d3e2f1a0b",
      "name": "Workforce Sign On",
      "environment": {
        "id": "5c3a9b2e-1f4d-4e6a-9b8c-7d2e1f0a3b4c"
      }
    }
  ],
  "result": {
    "status": "SUCCESS",
    "description": "Custom JavaScript added during flow creation for DaVinci Flow 'Workforce Sign On'"
  },
  "source": {
    "ipAddress": "203.0.113.24",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0 Safari/537.36"
  },
  "internalCorrelation": {
    "sessionId": "6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d"
  },
  "_embedded": {
    "davinciFlow": {
      "flowId": "3a1f9c0e7b2d4e8f9a6c5b4d3e2f1a0b",
      "flowName": "Workforce Sign On",
      "flowStatus": "ACTIVE",
      "flowType": "PINGONE",
      "logLevel": "INFO",
      "creationSource": "DIRECT",
      "targetNodeId": [
        "n7k2qx"
      ]
    }
  },
  "tags": []
}

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Does this activity mean the script is running for users?

Not yet. DaVinci keeps a saved version and a deployed version of each flow; the script runs for users once the flow is deployed, which writes its own activity.

References