# Contrast Security

> Read Contrast Security applications, vulnerabilities, servers and libraries, and change vulnerabilities' status, severity, notes and tags.

App · 21 actions. Web page: https://docs.lodol.com/docs/integrations/contrast-security

## Actions

### Add application tag

Put a tag on an application.

**Inputs**

- Application (`application_id`, text, required): The application.
- Tag (`tag`, text, required): The tag.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "messages": [
      "example"
    ],
    "success": true
  }
}
```

### Add vulnerability note

Add a note to a vulnerability.

**Inputs**

- Application (`application_id`, text, required): The application.
- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).
- Note (`note`, text, required): The note.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "note": {
      "creation": 1,
      "creator": "example",
      "deletable": true,
      "id": "example",
      "last_modification": 1,
      "last_updater": "example",
      "note": "example"
    },
    "success": true
  }
}
```

### Add vulnerability tag

Put a tag on a vulnerability.

**Inputs**

- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).
- Tag (`tag`, text, required): The tag.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "messages": [
      "example"
    ],
    "success": true
  }
}
```

### Delete vulnerability note

Delete a note from a vulnerability.

**Inputs**

- Application (`application_id`, text, required): The application.
- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).
- Note ID (`note_id`, text, required): The note's ID.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "messages": [
      "example"
    ],
    "success": true
  }
}
```

### Get application

Read an application, with its scores and vulnerability counts.

**Inputs**

- Application (`application_id`, text, required): The application.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "application": {
      "appArchived": true,
      "appContext": "example",
      "appDisplayName": "example",
      "appId": "example",
      "appLanguage": "example",
      "appName": "example",
      "importance": "example",
      "lastSeen": 1,
      "parentAppId": "example",
      "scores": {},
      "status": "example",
      "trace_breakdown": {}
    },
    "success": true
  }
}
```

### Get vulnerability

Read a vulnerability, with its application, servers, request and notes.

**Inputs**

- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "success": true,
    "trace": {
      "application": {
        "app_id": "example",
        "name": "example"
      },
      "category": "example",
      "closed_time": 1,
      "confidence": "example",
      "first_time_seen": 1,
      "impact": "example",
      "language": "example",
      "last_time_seen": 1,
      "likelihood": "example",
      "request": {},
      "rule_name": "example",
      "rule_title": "example",
      "servers": [
        {}
      ],
      "severity": "example",
      "severity_label": "example",
      "status": "example",
      "sub_status": "example",
      "tags": [
        "example"
      ],
      "title": "example",
      "total_notes": 1,
      "uuid": "example",
      "visible": true
    }
  }
}
```

### Get vulnerability recommendation

Read how to fix a vulnerability, with its CWE and OWASP references.

**Inputs**

- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "custom_recommendation": {},
    "cwe": "example",
    "owasp": "example",
    "recommendation": {},
    "rule_references": {},
    "success": true
  }
}
```

### List application libraries

List the open-source libraries an application uses.

**Inputs**

- Application (`application_id`, text, required): The application.
- Quick filter (`quick_filter`, text): Only vulnerable, policy-violating or high-risk libraries. One of: `ALL`, `VULNERABLE`, `VIOLATION`, `HIGH_RISK` (High risk), `PRIVATE`, `PUBLIC`.
- Limit (`limit`, number): Most records to return. From 1 to 50.
- Offset (`offset`, number): Records to skip before the first one returned. At least 0.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "count": 1,
    "libraries": [
      {
        "app_language": "example",
        "apps": [
          {}
        ],
        "file_name": "example",
        "grade": "example",
        "group": "example",
        "hash": "example",
        "high_vulnerabilities": 1,
        "latest_version": "example",
        "licenses": [
          "example"
        ],
        "months_outdated": 1,
        "total_vulnerabilities": 1,
        "version": "example",
        "vulns": [
          {}
        ]
      }
    ],
    "success": true
  }
}
```

### List application tags

List the tags on an application.

**Inputs**

- Application (`application_id`, text, required): The application.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "success": true,
    "tags": [
      "example"
    ]
  }
}
```

### List applications

List the organization's applications, optionally by name, tag or language.

**Inputs**

- Filter text (`filter_text`, text): Part of the application name.
- Tags (`tags`, list): Only applications with these tags.
- Languages (`languages`, list): Only applications in these languages. One or more of: `JAVA`, `DOTNET`, `DOTNET_CORE` (Dotnet core), `NODE`, `PYTHON`, `RUBY`, `GO`, `PHP`.
- Include archived (`include_archived`, true/false): Include archived applications.
- Sort (`sort`, text): Order of the applications. One of: `appName`, `-appName`, `appImportance`, `-appImportance`.
- Limit (`limit`, number): Most records to return. From 1 to 500.
- Offset (`offset`, number): Records to skip before the first one returned. At least 0.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "applications": [
      {
        "app_id": "example",
        "archived": true,
        "assess": true,
        "created": 1,
        "defend": true,
        "first_seen": 1,
        "importance": 1,
        "importance_description": "example",
        "language": "example",
        "last_seen": 1,
        "name": "example",
        "path": "example",
        "scores": {},
        "short_name": "example",
        "status": "example",
        "tags": [
          "example"
        ],
        "techs": [
          "example"
        ],
        "trace_breakdown": {}
      }
    ],
    "count": 1,
    "success": true
  }
}
```

### List libraries

List the open-source libraries in the organization's applications.

**Inputs**

- Search (`q`, text): Text to search for.
- Quick filter (`quick_filter`, text): Only vulnerable, policy-violating or high-risk libraries. One of: `ALL`, `VULNERABLE`, `VIOLATION`, `HIGH_RISK` (High risk), `PRIVATE`, `PUBLIC`.
- Applications (`application_ids`, list): Only libraries of these applications.
- Sort (`sort`, text): Order of the libraries. One of: `fileName`, `-fileName`, `score`, `-score`.
- Limit (`limit`, number): Most records to return. From 1 to 50.
- Offset (`offset`, number): Records to skip before the first one returned. At least 0.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "count": 1,
    "libraries": [
      {
        "app_language": "example",
        "apps": [
          {}
        ],
        "file_name": "example",
        "grade": "example",
        "group": "example",
        "hash": "example",
        "high_vulnerabilities": 1,
        "latest_version": "example",
        "licenses": [
          "example"
        ],
        "months_outdated": 1,
        "total_vulnerabilities": 1,
        "version": "example",
        "vulns": [
          {}
        ]
      }
    ],
    "success": true
  }
}
```

### List organizations

List the Contrast organizations the connected user belongs to.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "organizations": [
      {
        "date_format": "example",
        "name": "example",
        "organization_uuid": "example",
        "timezone": "example"
      }
    ],
    "success": true
  }
}
```

### List servers

List the servers running Contrast agents.

**Inputs**

- Search (`q`, text): Part of a server's name, hostname or path.
- Applications (`application_ids`, list): Only servers running these applications.
- Quick filter (`quick_filter`, text): Only online, offline, protected, unprotected or out-of-date servers. One of: `ALL`, `ONLINE`, `OFFLINE`, `PROTECTED`, `UNPROTECTED`, `OUT_OF_DATE` (Out of date).
- Sort (`sort`, text): Order of the servers. One of: `serverName`, `-serverName`, `lastActivity`, `-lastActivity`.
- Limit (`limit`, number): Most records to return. From 1 to 500.
- Offset (`offset`, number): Records to skip before the first one returned. At least 0.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "count": 1,
    "servers": [
      {
        "agent_version": "example",
        "assess": true,
        "defend": true,
        "environment": "example",
        "first_activity": 1,
        "hostname": "example",
        "language": "example",
        "last_activity": 1,
        "last_startup": 1,
        "name": "example",
        "num_apps": 1,
        "out_of_date": true,
        "path": "example",
        "server_id": 1
      }
    ],
    "success": true
  }
}
```

### List users

List the organization's users.

**Inputs**

- Search (`q`, text): Part of a user's email or name.
- Limit (`limit`, number): Most records to return. From 1 to 500.
- Offset (`offset`, number): Records to skip before the first one returned. At least 0.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "count": 1,
    "success": true,
    "users": [
      {
        "api_only": true,
        "email": "example",
        "enabled": true,
        "first_name": "example",
        "groups": [
          {}
        ],
        "last_name": "example",
        "role": {},
        "status_description": "example",
        "user_uid": "example"
      }
    ]
  }
}
```

### List vulnerabilities

List the organization's vulnerabilities, optionally of one application or by severity, status, tag or when they were seen.

**Inputs**

- Application (`application_id`, text): The application.
- Severities (`severities`, list): Only these severities. One or more of: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `NOTE`.
- Status (`status`, list): Only these statuses. One or more of: `Reported`, `Suspicious`, `Confirmed`, `NotAProblem`, `Remediated`, `Fixed`.
- Filter text (`filter_text`, text): Text to search for.
- Tags (`tags`, list): Only vulnerabilities with these tags.
- Environments (`environments`, list): Only vulnerabilities seen in these environments. One or more of: `DEVELOPMENT`, `QA`, `PRODUCTION`.
- Start date (`start_date`, date and time): Only vulnerabilities seen at or after this time.
- End date (`end_date`, date and time): Only vulnerabilities seen at or before this time.
- Timestamp filter (`timestamp_filter`, text): Whether the times are when each was first or last seen. One of: `FIRST`, `LAST`.
- Sort (`sort`, text): Order of the vulnerabilities. One of: `-lastTimeSeen`, `lastTimeSeen`, `-severity`, `severity`, `status`, `title`.
- Limit (`limit`, number): Most records to return. From 1 to 500.
- Offset (`offset`, number): Records to skip before the first one returned. At least 0.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "count": 1,
    "success": true,
    "traces": [
      {
        "application": {
          "app_id": "example",
          "name": "example"
        },
        "category": "example",
        "closed_time": 1,
        "confidence": "example",
        "first_time_seen": 1,
        "impact": "example",
        "language": "example",
        "last_time_seen": 1,
        "likelihood": "example",
        "request": {},
        "rule_name": "example",
        "rule_title": "example",
        "servers": [
          {}
        ],
        "severity": "example",
        "severity_label": "example",
        "status": "example",
        "sub_status": "example",
        "tags": [
          "example"
        ],
        "title": "example",
        "total_notes": 1,
        "uuid": "example",
        "visible": true
      }
    ]
  }
}
```

### List vulnerability notes

List the notes on a vulnerability.

**Inputs**

- Application (`application_id`, text, required): The application.
- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "notes": [
      {
        "creation": 1,
        "creator": "example",
        "deletable": true,
        "id": "example",
        "last_modification": 1,
        "last_updater": "example",
        "note": "example"
      }
    ],
    "success": true
  }
}
```

### List vulnerability tags

List the tags on a vulnerability.

**Inputs**

- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "success": true,
    "tags": [
      "example"
    ]
  }
}
```

### Remove application tag

Take a tag off an application.

**Inputs**

- Application (`application_id`, text, required): The application.
- Tag (`tag`, text, required): The tag.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "success": true,
    "tags": [
      "example"
    ]
  }
}
```

### Remove vulnerability tag

Take a tag off a vulnerability.

**Inputs**

- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).
- Tag (`tag`, text, required): The tag.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "success": true,
    "tags": [
      "example"
    ]
  }
}
```

### Update vulnerability severity

Change a vulnerability's severity.

**Inputs**

- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).
- Severity (`severity`, text, required): The new severity. One of: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `NOTE`.
- Override (`override`, true/false): Also give this severity to the rule's other vulnerabilities.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "messages": [
      "example"
    ],
    "success": true
  }
}
```

### Update vulnerability status

Change a vulnerability's status, with a note. Not a Problem needs a reason.

**Inputs**

- Vulnerability ID (`vulnerability_id`, text, required): The vulnerability's ID (its uuid, such as ABCD-1234-EFGH-5678).
- Status (`status`, text, required): The new status. One of: `Reported`, `Suspicious`, `Confirmed`, `NotAProblem`, `Remediated`, `Fixed`.
- Reason (`reason`, text): Why it is not a problem. Only for Not a Problem. One of: `Attack is defended by an external control`, `False Positive`, `Goes through an internal security control`, `URL is only accessible by trusted power users`, `Other`.
- Note (`note`, text): A note explaining the change.

**Outputs**

- `data` (object): The response from Contrast Security.

**Example output**

```json
{
  "data": {
    "messages": [
      "example"
    ],
    "success": true
  }
}
```
