Generate SecObserve VEX Document
secobserve_vex_documentGenerate a VEX document from assessed vulnerability observations in CSAF, OpenVEX, or CycloneDX format. Pass a document_base_id to revise an existing document and bump its version.
Instructions
Generate a CSAF, OpenVEX or CycloneDX VEX document from assessed observations, or revise one.
The document's content comes from the assessments already recorded: statuses like "Not affected" plus their VEX justification. Assess first, generate second. Passing document_base_id revises that document and bumps its version instead of creating a new one. The generated file is written to the server's export directory.
Args: params (VexDocumentInput): Validated input containing: - format (str): "csaf", "openvex" or "cyclonedx". - document_id_prefix (Optional[str]): Required to create, and to identify a document to update. - document_base_id (Optional[str]): Present only when updating. - product_id (Optional[int]) and/or vulnerability_names (Optional[List[str]]): the scope when creating; at least one is required. - branch_ids (Optional[List[int]]): Restrict to these branches. - fields (Optional[dict]): Format-specific metadata (CSAF: title, publisher_name, publisher_category, publisher_namespace, tracking_status, tlp_label; OpenVEX: id_namespace, author, role; CycloneDX: author, manufacturer). - filename (Optional[str]): Base filename for the written document.
Returns: str: A line giving the absolute path and byte size of the document written to the export directory.
Examples: - Use when: "publish an OpenVEX for product 12" -> format="openvex", document_id_prefix="acme-vex", product_id=12, fields={"id_namespace": "https://acme.example", "author": "Acme Security"} - Use when: "a CSAF advisory for CVE-2024-3094 across our products" -> format="csaf", vulnerability_names=["CVE-2024-3094"], fields={...} - Use when: reissuing after new assessments -> pass document_base_id. - Don't use when: importing someone else's VEX (use secobserve_upload_file, kind="vex").
Error Handling: 400 names the missing format-specific field; read the exact set with secobserve_describe_resource on the matching vex_* resource. A document with no qualifying assessments is generated but empty of statements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |