HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/uaclient/cli/__pycache__/cves.cpython-310.pyc
o

��Jh�@s�ddlZddlmZmZddlmZmZddlmZddl	m
Z
mZmZddl
mZmZddlmZddlmZejejd	�d
efdd��Zd
d�Zdd�Zd
efdd�Zd
efdd�Zedejejeejdee
dejdd�e
dejdd�gd�gd�Z dS)�N)�
exceptions�messages)�CVEsOptions�_cves)�cli_util)�ProArgument�ProArgumentGroup�
ProCommand)�Table�create_link)�HelpCategory)�UAConfig)�msg�cfgcKs>t|j|jd�}z	t||d�}W|Stjyd}Y|Sw)N)�fixable�	unfixable)�optionsr)rrrrr�VulnerabilityDataNotFound)�argsr�kwargs�cve_options�result�r�3/usr/lib/python3/dist-packages/uaclient/cli/cves.py�_get_cve_vulnerabilitiess���rcCsVg}|j��D]!\}}|jD]}|j�|j�}|r'|�||j|jp"d|jf�qq|S)N�-)�packages�items�cves�get�name�append�priority�
fix_origin)�cve_vulnerabilities�rows�package_name�package_info�cve�cve_inforrr�_get_cve_table_rowss
����
r*cCsXg}t|dd�d�D]}|�|dt�|d�|dt|dd�|d�d	�f�q
|S)
NcSs|dd�|d�fS)Nr)�critical�high�medium�low�
negligible�)�index)�rowrrr�<lambda>3s�z"_format_cve_rows.<locals>.<lambda>)�keyrr0��zhttps://ubuntu.com/security/{})�text�url)�sortedr!r�colorize_priorityr�format)�cve_rows�formatted_rowsr2rrr�_format_cve_rows/s 
����r>cCs�t||d�}|st���|jr>tt|��}|r#ttgd�|d��dS|jr-tt	j
�dS|jr7tt	j�dStt	j
�dS|jrHtt	j
�dS|jrRtt	j�dStt	j
�dS)N)r)�Package�Priority�Origin�
Vulnerability)�headersr%)rrrrr>r*�printr
rr�CLI_UNFIXABLE_CVES_NOT_AFFECTEDr�CLI_FIXABLE_CVES_NOT_AFFECTED�CLI_CVES_NOT_AFFECTED)rrr$r%rrr�
_list_cvesGs,��rHcKsL|jr
|jr
tjddd��z	t||d�WdSty%tj��YdSw)Nrr)�option1�option2)rr)	rrr�InvalidOptionCombinationrH�BrokenPipeError�sys�stderr�close)rrrrrr�action_cvesgs��rPrTz--unfixable�
store_true)�help�actionz	--fixable)�	arguments)rR�descriptionrS�
help_category�preserve_description�argument_groups)!rM�uaclientrr�#uaclient.api.u.pro.security.cves.v1rr�uaclient.clir�uaclient.cli.commandsrrr	�uaclient.cli.formatterr
r�uaclient.cli.parserr�uaclient.configr
�with_spinner�CLI_CVES_SPINNER_MSGrr*r>rHrP�CLI_CVES�
CLI_CVES_DESC�SECURITY�CLI_CVES_UNFIXABLE�CLI_CVES_FIXABLE�cves_commandrrrr�<module>sH �����
�