# codes.tcm.advisory

> An advisory about some tcm code, by its namespace hash: a vulnerability or a bad bug, how bad, and what fixes it.

- Kind: record
- Record key: tid
- Authority: tcm.codes
- Lexicon: 1
- Published by [tcm.codes](https://lexicon.garden/identity/did:plc:vh4czvu5aijkaqge5huayq53), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:vh4czvu5aijkaqge5huayq53/codes.tcm.advisory)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:vh4czvu5aijkaqge5huayq53/codes.tcm.advisory/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:vh4czvu5aijkaqge5huayq53/codes.tcm.advisory/analytics)

## Record (`codes.tcm.advisory`)

Type: record · key tid

### Properties

- `body` (string, required): What's wrong, and what to do about it, as markdown.
  - Constraints: maxLength: 30000
- `createdAt` (string · datetime, required): When it was written.
- `fixedIn` (string): The version that fixes it.
  - Constraints: maxLength: 64
- `severity` (string, required): How bad it is.
  - Constraints: maxLength: 32, knownValues: low | moderate | high | critical
- `subject` (ref, required)
  - Reference: `#subject`

## #subject (`codes.tcm.advisory#subject`)

Type: object

The code it's about, by its namespace's whole hash; the release it is, and its author, for showing.

### Properties

- `author` (string · did): The release's author, if it was announced.
- `namespace` (string, required): The namespace's whole hash.
  - Constraints: maxLength: 128
- `release` (string): The release it is: package@version.
  - Constraints: maxLength: 300

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "An advisory about some tcm code, by its namespace hash: a vulnerability or a bad bug, how bad, and what fixes it.",
      "key": "tid",
      "record": {
        "properties": {
          "body": {
            "description": "What's wrong, and what to do about it, as markdown.",
            "maxLength": 30000,
            "type": "string"
          },
          "createdAt": {
            "description": "When it was written.",
            "format": "datetime",
            "type": "string"
          },
          "fixedIn": {
            "description": "The version that fixes it.",
            "maxLength": 64,
            "type": "string"
          },
          "severity": {
            "description": "How bad it is.",
            "knownValues": [
              "low",
              "moderate",
              "high",
              "critical"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "subject": {
            "ref": "#subject",
            "type": "ref"
          }
        },
        "required": [
          "subject",
          "body",
          "severity",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "subject": {
      "description": "The code it's about, by its namespace's whole hash; the release it is, and its author, for showing.",
      "properties": {
        "author": {
          "description": "The release's author, if it was announced.",
          "format": "did",
          "type": "string"
        },
        "namespace": {
          "description": "The namespace's whole hash.",
          "maxLength": 128,
          "type": "string"
        },
        "release": {
          "description": "The release it is: package@version.",
          "maxLength": 300,
          "type": "string"
        }
      },
      "required": [
        "namespace"
      ],
      "type": "object"
    }
  },
  "description": "An advisory about some tcm code.",
  "id": "codes.tcm.advisory",
  "lexicon": 1
}
```
