MCPcopy Create free account
hub / github.com/OWASP/APTS / extract_target

Function extract_target

scripts/check_internal_markdown_links.py:22–37  ·  view source on GitHub ↗
(raw_target: str)

Source from the content-addressed store, hash-verified

20
21
22def extract_target(raw_target: str) -> str:
23 target = raw_target.strip()
24
25 if target.startswith("<") and ">" in target:
26 target = target[1 : target.index(">")]
27
28 try:
29 parts = shlex.split(target)
30 if parts:
31 target = parts[0]
32 except ValueError:
33 parts = target.split()
34 if parts:
35 target = parts[0]
36
37 return target.strip()
38
39
40def is_external_target(target: str) -> bool:

Callers 1

resolve_local_targetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected