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

Method from_id

vulnerabilities/references.py:134–145  ·  view source on GitHub ↗

Return a new WireSharkReference from an wnpa-sec-XXXX id.

(cls, wnpa_sec_id)

Source from the content-addressed store, hash-verified

132
133 @classmethod
134 def from_id(cls, wnpa_sec_id):
135 """
136 Return a new WireSharkReference from an wnpa-sec-XXXX id.
137 """
138 if not wnpa_sec_id or not wnpa_sec_id.lower().startswith("wnpa-sec"):
139 return ValueError(
140 f"Not a WireShark reference. Does not start with wnpa-sec: {wnpa_sec_id!r}"
141 )
142 return ReferenceV2(
143 reference_id=wnpa_sec_id,
144 url=f"https://www.wireshark.org/security/{wnpa_sec_id}.html",
145 )

Callers

nothing calls this directly

Calls 1

ReferenceV2Class · 0.90

Tested by

no test coverage detected