
    |*&i;                     2    S SK Jr  S SKJr   " S S\5      rg)    )BaseHandler)VulnerabilityIntelligencec                   "    \ rS rSrS\4S jrSrg)GitHubHandler   vuln_intelligencec                 T  ^  U R                   R                  S/ 5      nUR                  R                  U5        U R                   R                  S/ 5      nU(       a7  U H1  nUR                  R                  U R                  S5      USS.5        M3     U R                   R                  S/ 5      nUR                  R                  U5        U R                   R                  S/ 5      nUR                  R                  U5        U R                   R                  S/ 5      nUR                  R                  U5        U R                   R                  S	/ 5      nUR                  R                  U5        U R                   R                  S
/ 5      n	UR                  R                  U	5        U R                   R                  S/ 5      n
UR                  R                  U
5        U R                   R                  S5      nU(       a@  UR                  SS5      nUR                  R                  U R                  S5      USS.5        U R                   R                  S5      nU(       ad  UR                  SS5      m[        U4S jUR                   5       5      (       d.  UR                  R                  U R                  S5      TSS.5        U R                   R                  S5      nU(       a  UR                  R                  U5        g g ! [         a  n[!        SU 35         S nAg S nAff = f)Ngithub_related_urlsgithub_pocsz!Trickest CVE GitHub - PoC ExploitzN/A)sourceurldategithub_references
github_cwegithub_vulnerability_typegithub_productsgithub_versionsgithub_tagsgithub_mitigation
 zTrickest CVE GitHub)r   textr   github_descriptionc              3   2   >#    U  H  oS    T:H  v   M     g7f)r   N ).0descformatted_descriptions     S/home/kali/cveseeker/services/vulnerability_intelligence/handlers/github_handler.py	<genexpr>&GitHubHandler.apply.<locals>.<genexpr>1   s     lMkT<+@@Mks   cve_linkz&[!] Error applying GitHub enrichment: )datagetreference_urlsupdateurlsappendenrich_source_name
weaknessesvulnerable_componentstagsreplacedescriptionsenrich_source_name_mitigationanyadd	Exceptionprint)selfr   related_urlsr   pocr   r   r   r   r   r   r   formatted_mitigationr   r"   er   s                   @r   applyGitHubHandler.apply   s   7	@99==)>CL,,33LA))--r:K&C%**11&*&=&=@a&c#&$)3  ' !%		.A2 F,,334EF|R8J((//
;(,		6QSU(V%((//0IJ"iimm,=rBO33::?K"iimm,=rBO33::?K))--r:K""))+6 $		.A B '8'@'@s'K$!..55"@@AVW0!7  "&/C!D!(:(B(B4(M%lM^MkMklll%2299"&"9"9:O"P 5 %;  yy}}Z0H!0044X>   	@:1#>??	@s   L L 
L'L""L'r   N)__name__
__module____qualname____firstlineno__r   r9   __static_attributes__r       r   r   r      s    8@'@ 8@r@   r   N)9services.vulnerability_intelligence.handlers.base_handlerr   !models.vulnerability_intelligencer   r   r   r@   r   <module>rC      s    Q G9@K 9@r@   