(entry, keys)
| 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}") |
no test coverage detected