> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pastures.farm/llms.txt
> Use this file to discover all available pages before exploring further.

# Advisories Endpoint

> Security and operational advisories relevant to the cluster.

## `GET /api/advisories`

Returns a list of advisories that the Pastures Engine has identified as relevant to the connected clusters. Advisories cover security vulnerabilities, deprecations, configuration drift, and operational recommendations.

## Request

### Headers

| Header          | Required | Description                        |
| --------------- | -------- | ---------------------------------- |
| `Authorization` | No       | `Bearer <api-key>` (if configured) |

No request body is required.

## Response

The Engine may return advisories in one of two formats. The extension normalizes both.

**Wrapped format:**

```json theme={null}
{
  "advisories": [
    {
      "id": "ADV-2026-0042",
      "severity": "CRITICAL",
      "title": "CVE-2026-1234: Container runtime RCE in containerd < 1.7.14",
      "relevance": "3 of 5 clusters are running containerd 1.7.11",
      "recommended_action": "Upgrade containerd to 1.7.14 or later on affected nodes",
      "created_at": "2026-04-20T14:30:00Z"
    },
    {
      "id": "ADV-2026-0039",
      "severity": "HIGH",
      "title": "Kubernetes v1.27 end-of-life in 30 days",
      "relevance": "Cluster prod-us-west-2 is running v1.27.9",
      "recommended_action": "Plan upgrade to v1.28 or v1.29 before support ends",
      "created_at": "2026-04-18T09:15:00Z"
    },
    {
      "id": "ADV-2026-0035",
      "severity": "MEDIUM",
      "title": "Default PodSecurityPolicy detected",
      "relevance": "Namespace 'default' uses the unrestricted PSP on 2 clusters",
      "recommended_action": "Migrate to Pod Security Admission with a 'restricted' profile",
      "created_at": "2026-04-15T11:00:00Z"
    },
    {
      "id": "ADV-2026-0028",
      "severity": "LOW",
      "title": "Unused ConfigMaps consuming etcd storage",
      "relevance": "142 orphaned ConfigMaps found across all clusters",
      "recommended_action": "Review and remove unused ConfigMaps to reduce etcd size",
      "created_at": "2026-04-10T16:45:00Z"
    },
    {
      "id": "ADV-2026-0025",
      "severity": "INFO",
      "title": "New Rancher v2.9.1 release available",
      "relevance": "Current Rancher version is v2.8.5",
      "recommended_action": "Review the changelog and plan an upgrade at your convenience",
      "created_at": "2026-04-08T08:00:00Z"
    }
  ]
}
```

**Array format (also accepted):**

```json theme={null}
[
  { "id": "ADV-2026-0042", "severity": "CRITICAL", "..." : "..." }
]
```

## Response Fields

| Field                | Type     | Description                                           |
| -------------------- | -------- | ----------------------------------------------------- |
| `id`                 | `string` | Unique advisory identifier.                           |
| `severity`           | `string` | One of `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFO`.   |
| `title`              | `string` | Short description of the advisory.                    |
| `relevance`          | `string` | Why this advisory matters to the current environment. |
| `recommended_action` | `string` | Suggested remediation step.                           |
| `created_at`         | `string` | ISO 8601 timestamp of when the advisory was created.  |

## Severity Levels

| Severity   | Description                                                   |
| ---------- | ------------------------------------------------------------- |
| `CRITICAL` | Immediate action required — active exploit risk or data loss  |
| `HIGH`     | Action required soon — significant security or stability risk |
| `MEDIUM`   | Should be addressed — configuration or compliance concern     |
| `LOW`      | Minor improvement — optimization or cleanup opportunity       |
| `INFO`     | Informational — awareness only, no action needed              |
