JFrog · Arazzo Workflow

JFrog Xray Policy and Watch

Version 1.0.0

Create a security policy then a watch that assigns it to a repository.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArtifactoryCI/CDContainer RegistryDevOpsMLOpsPackage ManagementSecuritySoftware Supply ChainArazzoWorkflows

Provider

jfrog

Workflows

policy-and-watch
Create a security policy and a watch that enforces it on a repository.
Creates a security policy that fails builds above a severity threshold, creates a watch over a repository referencing that policy, then fetches the watch to confirm.
3 steps inputs: minSeverity, policyName, repoKey, watchName outputs: assignedPolicies, watchName
1
createPolicy
Create a security policy with a rule that blocks downloads and fails builds at or above the supplied minimum severity.
2
createWatch
Create a watch that monitors the repository and assigns the newly created security policy.
3
verifyWatch
Read the watch back to confirm it was created with the assigned policy.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: JFrog Xray Policy and Watch
  summary: Create a security policy then a watch that assigns it to a repository.
  description: >-
    The standard Xray governance setup. The workflow creates a security policy
    with a minimum-severity rule, creates a watch that monitors a repository and
    assigns the new policy, then reads the watch back to confirm the binding.
    Every step spells out its request inline so the flow can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: policiesApi
  url: ../openapi/jfrog-policies-api-openapi.yml
  type: openapi
- name: watchesApi
  url: ../openapi/jfrog-watches-api-openapi.yml
  type: openapi
workflows:
- workflowId: policy-and-watch
  summary: Create a security policy and a watch that enforces it on a repository.
  description: >-
    Creates a security policy that fails builds above a severity threshold,
    creates a watch over a repository referencing that policy, then fetches the
    watch to confirm.
  inputs:
    type: object
    required:
    - policyName
    - watchName
    - repoKey
    - minSeverity
    properties:
      policyName:
        type: string
        description: The name of the security policy to create.
      watchName:
        type: string
        description: The name of the watch to create.
      repoKey:
        type: string
        description: The repository key the watch will monitor.
      minSeverity:
        type: string
        description: The minimum severity that triggers the policy (Low, Medium, High, Critical).
  steps:
  - stepId: createPolicy
    description: >-
      Create a security policy with a rule that blocks downloads and fails
      builds at or above the supplied minimum severity.
    operationId: createPolicy
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.policyName
        description: Created by the policy-and-watch workflow
        type: security
        rules:
        - name: severity-gate
          priority: 1
          criteria:
            min_severity: $inputs.minSeverity
          actions:
            block_download:
              unscanned: false
              active: true
            fail_build: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      policyName: $inputs.policyName
  - stepId: createWatch
    description: >-
      Create a watch that monitors the repository and assigns the newly created
      security policy.
    operationId: createWatch
    requestBody:
      contentType: application/json
      payload:
        general_data:
          name: $inputs.watchName
          description: Created by the policy-and-watch workflow
          active: true
        project_resources:
          resources:
          - type: repository
            name: $inputs.repoKey
        assigned_policies:
        - name: $steps.createPolicy.outputs.policyName
          type: security
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      watchName: $inputs.watchName
  - stepId: verifyWatch
    description: >-
      Read the watch back to confirm it was created with the assigned policy.
    operationId: getWatch
    parameters:
    - name: watchName
      in: path
      value: $steps.createWatch.outputs.watchName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      assignedPolicies: $response.body#/assigned_policies
  outputs:
    watchName: $steps.createWatch.outputs.watchName
    assignedPolicies: $steps.verifyWatch.outputs.assignedPolicies

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/jfrog-xray-policy-and-watch-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.