MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _extract_value

Function _extract_value

webapp_modern.py:5559–5567  ·  view source on GitHub ↗
(entry, keys)

Source from the content-addressed store, hash-verified

5557 files_found = []
5558 for filename in os.listdir(vuln_results_dir):
5559 if filename.endswith('.txt') and not filename.startswith('.'):
5560 files_found.append(filename)
5561 filepath = os.path.join(vuln_results_dir, filename)
5562 try:
5563 with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
5564 content = f.read()
5565 if content.strip():
5566 # Count CVEs or files with vulnerability content
5567 cve_matches = re.findall(r'CVE-\d{4}-\d+', content)
5568 if cve_matches:
5569 vuln_count += len(cve_matches)
5570 logger.debug(f"Found {len(cve_matches)} CVEs in {filename}: {cve_matches}")

Callers 1

Calls 1

getMethod · 0.45

Tested by

no test coverage detected