diff --git a/scripts/archive_pocs.py b/scripts/archive_pocs.py index 73d879ed866..3850d615b47 100644 --- a/scripts/archive_pocs.py +++ b/scripts/archive_pocs.py @@ -288,11 +288,15 @@ def verify_snapshot(snap: dict, original: str, expected_blobs=(), repo_id=None) if not body: return False raw = parse.urlsplit(original).hostname == 'raw.githubusercontent.com' + verified_raw = False if raw and expected_blobs and len(body) >= 256: digest = hashlib.sha1(b'blob ' + str(len(body)).encode() + b'\0' + body).hexdigest() if digest not in expected_blobs: return False - if not raw and ('html' in mime or body.lstrip().startswith(b'404 Not Found', b'Sign in to GitHub'): response.read.return_value = body self.assertFalse(archive.verify_snapshot(copy.deepcopy(snap), URL)) + self.assertFalse(archive.verify_snapshot(copy.deepcopy(snap), 'https://raw.githubusercontent.com/owner/poc/' + 'a' * 40 + '/poc.py')) response.read.return_value = b'PoC for CVE-2026-4044
research
' self.assertTrue(archive.verify_snapshot(snap, URL)) self.assertFalse(archive.verify_snapshot(snap, 'https://hackerone.com/reports/1234'))