> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.astropods.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.astropods.com/_mcp/server.

# Get a build's vulnerability findings

GET https://astropods.com/api/v1/agents/{account}/{name}/builds/{build_id}/vulnerabilities

The latest Trivy scan of each image in a published build, with its findings. Readable by anyone who can read the blueprint, so a consumer sees what it deploys.

Reference: https://docs.astropods.com/api-reference/astropods-api/agents/get-a-builds-vulnerability-findings

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `account` (string, required) — Account name
- `name` (string, required) — Agent name
- `build_id` (string, required) — Build ID

## Response

### 200

OK

- `build_id` (string, optional)
- `components` (list of ComponentVulnerabilities, optional)
- `summary` (BuildVulnerabilitySummary, optional)

## Errors

### 500 Internal Server Error

Internal Server Error

- `code` (string, optional)
- `details` (string, optional)
- `error` (string, optional)

## Types

### ComponentVulnerabilities

- `component` (string, optional)
- `counts` (VulnerabilityCounts, optional)
- `db_updated_at` (string, optional)
- `findings` (list of VulnerabilityFinding, optional)
- `image_digest` (string, optional)
- `scanned_at` (string, optional)
- `status` (string, optional)

### BuildVulnerabilitySummary

- `critical` (integer, optional)
- `fixable` (integer, optional)
- `high` (integer, optional)
- `low` (integer, optional)
- `medium` (integer, optional)
- `status` (string, optional)
- `unknown` (integer, optional)

### VulnerabilityCounts

- `critical` (integer, optional)
- `fixable` (integer, optional)
- `high` (integer, optional)
- `low` (integer, optional)
- `medium` (integer, optional)
- `unknown` (integer, optional)

### VulnerabilityFinding

- `fixed_version` (string, optional)
- `id` (string, optional)
- `installed_version` (string, optional)
- `package` (string, optional)
- `package_type` (string, optional)
- `severity` (string, optional)
- `title` (string, optional)
- `url` (string, optional)

## Examples

**Response**

```json
{
  "build_id": "string",
  "components": [
    {
      "component": "string",
      "counts": {
        "critical": 1,
        "fixable": 1,
        "high": 1,
        "low": 1,
        "medium": 1,
        "unknown": 1
      },
      "db_updated_at": "string",
      "findings": [
        {
          "fixed_version": "string",
          "id": "string",
          "installed_version": "string",
          "package": "string",
          "package_type": "string",
          "severity": "string",
          "title": "string",
          "url": "string"
        }
      ],
      "image_digest": "string",
      "scanned_at": "string",
      "status": "string"
    }
  ],
  "summary": {
    "critical": 1,
    "fixable": 1,
    "high": 1,
    "low": 1,
    "medium": 1,
    "status": "string",
    "unknown": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://astropods.com/api/v1/agents/account/name/builds/build_id/vulnerabilities")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```