MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / from_id

Method from_id

vulnerabilities/references.py:116–125  ·  view source on GitHub ↗

Return a new ZbxReference from an ZBX-XXXX id.

(cls, zbx_id)

Source from the content-addressed store, hash-verified

114
115 @classmethod
116 def from_id(cls, zbx_id):
117 """
118 Return a new ZbxReference from an ZBX-XXXX id.
119 """
120 if not zbx_id or not zbx_id.lower().startswith("zbx"):
121 return ValueError(f"Not a Zabbix reference. Does not start with ZBX: {zbx_id!r}")
122 return ReferenceV2(
123 reference_id=zbx_id,
124 url=f"https://support.zabbix.com/browse/{zbx_id}",
125 )
126
127
128class WireSharkReferenceV2:

Callers

nothing calls this directly

Calls 1

ReferenceV2Class · 0.90

Tested by

no test coverage detected