tis-grype-portable icon

grype

Paquet d’installation silencieuse pour grype

0.107.0-1
System and network
System and network

Les paquets PREPROD sont des paquets construits via LUTI. Ils restent généralement 5 jours en PREPROD, après quoi un deuxième scan VirusTotal est effectué pour vérifier que le status n'a pas changé.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.

  • package: tis-grype-portable
  • name: grype
  • version: 0.107.0-1
  • categories: System and network
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: opensource_free,wapt_public
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 28.62 Mo
  • homepage : https://github.com/anchore/grype

package           : tis-grype-portable
version           : 0.107.0-1
architecture      : x64
section           : base
priority          : optional
name              : grype
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : A vulnerability scanner for container images and file systems
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Un scanner de vulnérabilité pour les images de conteneurs et les systèmes de fichiers
description_pl    : Skaner podatności dla obrazów kontenerów i systemów plików
description_de    : Ein Schwachstellen-Scanner für Container-Images und Dateisysteme
description_es    : Un escáner de vulnerabilidades para imágenes de contenedores y sistemas de archivos
description_pt    : Um scanner de vulnerabilidades para imagens de contentores e sistemas de ficheiros
description_it    : Uno scanner di vulnerabilità per immagini e file system dei container
description_nl    : Een kwetsbaarheidsscanner voor container-images en bestandssystemen
description_ru    : Сканер уязвимостей для образов контейнеров и файловых систем
audit_schedule    : 
editor            : 
keywords          : 
licence           : opensource_free,wapt_public
homepage          : https://github.com/anchore/grype
package_uuid      : ecbfd4c5-c1a1-4c96-b7e1-a6bc82f06468
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : b003c383713a71e50199faede2438368cf65b9faea43021065292a9ff2e08627
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-01-29T23:05:42.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : NWCWZ37lI42ZkvyVGKjZHm59E9HBbO/cD6/VQOJ2fJ2gXWDMFtDR/A4WcsvGNNxGEq0tDwoEmGx+EycwvkrjmQR4Iy4DyTjQrs75ZYmqMpa4trmIaoD5rALVxsU2c/+FPuaQnYTSEnu5s+2GULyZt9beUBMxDA23riW+ldEnp+1ZHsfK+iEcDxXY2H1FqZJ+tQiBqzmBp3POiUSobwf/dFwO92/PYvaZYeJoCfSICawMdyzasaoOzfCiMqkfnNaKyKgmYUBjlgtLRvTWvPvnl2btRyfLIclLRS2lr8De2IFekxAmaH1GWv6potO4zai5AL0QHg1/CwULm/G/XF+KvA==

# -*- coding: utf-8 -*-
from setuphelpers import *

"""


"""


app_name = "grype "
editor_dir = makepath(programfiles, "grype")
app_dir = makepath(editor_dir, "grype")
app_path = makepath(app_dir, "grype.exe")
audit_version = False


def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")


def install():
    # Declaring local variables
    zip_name = glob.glob(f"grype*.zip")[0]

    unzipped_dir = "grype"


    # Installing software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir) and force:
        remove_tree(app_dir)
    mkdirs(app_dir)
    print("Extracting: %s to: %s" % (zip_name, unzipped_dir))
    unzip(zip_name, unzipped_dir)
    print('Copy grype to %s' % app_dir)
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)
    add_to_system_path(app_path)
    

    

def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = get_installed_version(app_path)
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status


def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)
    if dir_is_empty(editor_dir):
        remove_tree(editor_dir)

   

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import json

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()

    if not proxies:
        proxies = get_proxies_from_wapt_console()
    dict_arch = {
        "x64" :"_windows_amd64.zip" ,
    }
    git_repo = "anchore/grype"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo   
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith('.zip') and dict_arch[control.architecture] in download["browser_download_url"]:
            url_dl = download["browser_download_url"]
            version = json_load["name"].replace('v','')
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.zip'):
        if f != filename:
            remove_file(f)

    
    control.set_software_version(version)
    control.save_control_to_wapt()

01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
c6aece404424257cfb693f75642485a4d4785cd186f5a4d09fe7e10d099e3e2f : WAPT/control
b003c383713a71e50199faede2438368cf65b9faea43021065292a9ff2e08627 : WAPT/icon.png
aa35f4db5a5b54e484550df8b858aed8529bb9e01cec863524c00237e77649ce : grype_0.107.0_windows_amd64.zip
8dc2f67ce8163ff012af098a0b0369ce05d201a5aa0ec48e8e1df46d0c98a67f : luti.json
ae2b6deeafef4bdca37792cd82d4348b40c2f30ca53a6a5f25f13007ab909747 : setup.py
79fd331601884223c245f1eccbb64fd8d7e58e34b07a7bb79f8853af66f5990f : update_package.py