From 84474d0a206d317937ceeb056fb3f0f090f5017d Mon Sep 17 00:00:00 2001 From: ziadhany Date: Tue, 24 Nov 2026 20:38:00 +0200 Subject: [PATCH] fix: enhance_with_exploitdb_v2 pipeline failure on long source_url values Signed-off-by: ziadhany --- .../0145_alter_advisoryexploit_source_url.py | 23 +++++++++++++++++++ vulnerabilities/models.py | 1 + .../exploitdb_improver/files_exploits.csv | 1 + 3 files changed, 25 insertions(+) create mode 100644 vulnerabilities/migrations/0145_alter_advisoryexploit_source_url.py diff --git a/vulnerabilities/migrations/0145_alter_advisoryexploit_source_url.py b/vulnerabilities/migrations/0145_alter_advisoryexploit_source_url.py new file mode 100644 index 000000000..c1a13c91a --- /dev/null +++ b/vulnerabilities/migrations/0145_alter_advisoryexploit_source_url.py @@ -0,0 +1,23 @@ +# Generated by Django 5.2.11 on 2026-11-24 19:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("vulnerabilities", "0144_remove_advisoryv2_advisory_latest_by_avid_idx_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="advisoryexploit", + name="source_url", + field=models.URLField( + blank=True, + help_text="The URL to the exploit as provided in the original upstream data source.", + max_length=500, + null=True, + ), + ), + ] diff --git a/vulnerabilities/models.py b/vulnerabilities/models.py index 521f0ca6a..e4eda85a8 100644 --- a/vulnerabilities/models.py +++ b/vulnerabilities/models.py @@ -4032,6 +4032,7 @@ class AdvisoryExploit(models.Model): ) source_url = models.URLField( + max_length=500, null=True, blank=True, help_text="The URL to the exploit as provided in the original upstream data source.", diff --git a/vulnerabilities/tests/test_data/exploitdb_improver/files_exploits.csv b/vulnerabilities/tests/test_data/exploitdb_improver/files_exploits.csv index a63701d8c..05787cd5c 100644 --- a/vulnerabilities/tests/test_data/exploitdb_improver/files_exploits.csv +++ b/vulnerabilities/tests/test_data/exploitdb_improver/files_exploits.csv @@ -1,2 +1,3 @@ id,file,description,date_published,author,type,platform,port,date_added,date_updated,verified,codes,tags,aliases,screenshot_url,application_url,source_url 16929,exploits/aix/dos/16929.rb,"AIX Calendar Manager Service Daemon (rpc.cmsd) Opcode 21 - Buffer Overflow (Metasploit)",2010-11-11,Metasploit,dos,aix,,2010-11-11,2011-03-06,1,CVE-2009-3699;OSVDB-58726,"Metasploit Framework (MSF)",,,,http://aix.software.ibm.com/aix/efixes/security/cmsd_advisory.asc +44924,exploits/php/webapps/44924.txt,phpMyAdmin 4.8.1 - Authenticated Local File Inclusion (LFI) (1),2018-06-21,ChaMd5,webapps,php,80,2018-06-22,2018-07-17,1,CVE-2018-12613,,,http://www.exploit-db.com/screenshots/idlt45000/44924.png,http://www.exploit-db.comphpmyadmin-RELEASE_4_8_1.tar.gz,https://mp.weixin.qq.com/s?__biz=MzIzMTc1MjExOQ==&mid=2247485036&idx=1&sn=8e9647906c5d94f72564dec5bc51a2ab&chksm=e89e2eb4dfe9a7a28bff2efebb5b2723782dab660acff074c3f18c9e7dca924abdf3da618fb4&mpshare=1&scene=1&srcid=0621gAv1FMtrgoahD01psMZr&pass_ticket=LqhR