advsec_get_alerts
Retrieve Azure DevOps Advanced Security alerts for a repository, filtering by type, state, severity, or rule. Manage code and dependency vulnerabilities effectively with specified criteria.
Instructions
Retrieve Advanced Security alerts for a repository.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
alertType | No | Filter alerts by type. If not specified, returns all alert types. | |
confidenceLevels | Yes | Filter alerts by confidence levels. Only applicable for secret alerts. Defaults to both 'high' and 'other'. | |
continuationToken | No | Continuation token for pagination. | |
onlyDefaultBranch | No | If true, only return alerts found on the default branch. Defaults to true. | |
orderBy | No | Order results by specified field. Defaults to 'severity'. | severity |
project | Yes | The name or ID of the Azure DevOps project. | |
ref | No | Filter alerts by git reference (branch). If not provided and onlyDefaultBranch is true, only includes alerts from default branch. | |
repository | Yes | The name or ID of the repository to get alerts for. | |
ruleId | No | Filter alerts by rule ID. | |
ruleName | No | Filter alerts by rule name. | |
severities | No | Filter alerts by severity level. If not specified, returns alerts at any severity. | |
states | No | Filter alerts by state. If not specified, returns alerts in any state. | |
toolName | No | Filter alerts by tool name. | |
top | No | Maximum number of alerts to return. Defaults to 100. | |
validity | No | Filter alerts by validity status. Only applicable for secret alerts. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"alertType": {
"description": "Filter alerts by type. If not specified, returns all alert types.",
"enum": [
"Unknown",
"Dependency",
"Secret",
"Code",
"License"
],
"type": "string"
},
"confidenceLevels": {
"default": [
"high",
"other"
],
"description": "Filter alerts by confidence levels. Only applicable for secret alerts. Defaults to both 'high' and 'other'.",
"items": {
"enum": [
"High",
"Other"
],
"type": "string"
},
"type": "array"
},
"continuationToken": {
"description": "Continuation token for pagination.",
"type": "string"
},
"onlyDefaultBranch": {
"default": true,
"description": "If true, only return alerts found on the default branch. Defaults to true.",
"type": "boolean"
},
"orderBy": {
"default": "severity",
"description": "Order results by specified field. Defaults to 'severity'.",
"enum": [
"id",
"firstSeen",
"lastSeen",
"fixedOn",
"severity"
],
"type": "string"
},
"project": {
"description": "The name or ID of the Azure DevOps project.",
"type": "string"
},
"ref": {
"description": "Filter alerts by git reference (branch). If not provided and onlyDefaultBranch is true, only includes alerts from default branch.",
"type": "string"
},
"repository": {
"description": "The name or ID of the repository to get alerts for.",
"type": "string"
},
"ruleId": {
"description": "Filter alerts by rule ID.",
"type": "string"
},
"ruleName": {
"description": "Filter alerts by rule name.",
"type": "string"
},
"severities": {
"description": "Filter alerts by severity level. If not specified, returns alerts at any severity.",
"items": {
"enum": [
"Low",
"Medium",
"High",
"Critical",
"Note",
"Warning",
"Error",
"Undefined"
],
"type": "string"
},
"type": "array"
},
"states": {
"description": "Filter alerts by state. If not specified, returns alerts in any state.",
"items": {
"enum": [
"Unknown",
"Active",
"Dismissed",
"Fixed",
"AutoDismissed"
],
"type": "string"
},
"type": "array"
},
"toolName": {
"description": "Filter alerts by tool name.",
"type": "string"
},
"top": {
"default": 100,
"description": "Maximum number of alerts to return. Defaults to 100.",
"type": "number"
},
"validity": {
"description": "Filter alerts by validity status. Only applicable for secret alerts.",
"items": {
"enum": [
"None",
"Unknown",
"Active",
"Inactive"
],
"type": "string"
},
"type": "array"
}
},
"required": [
"project",
"repository",
"confidenceLevels"
],
"type": "object"
}