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

Function matcher_url

vulnerabilities/importers/fireeye.py:111–120  ·  view source on GitHub ↗

Returns URL of the reference markup from reference url in Markdown format

(ref)

Source from the content-addressed store, hash-verified

109
110
111def matcher_url(ref) -> str:
112 """
113 Returns URL of the reference markup from reference url in Markdown format
114 """
115 markup_regex = r"\[([^\[]+)]\(\s*(http[s]?://.+)\s*\)"
116 matched_markup = re.findall(markup_regex, ref)
117 if matched_markup:
118 return matched_markup[0][1]
119 else:
120 return ref
121
122
123def get_aliases(database_id, cve_ref) -> List:

Callers 1

get_referencesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected