tis-grype-portable icon

grype

Paquet d'installation silencieuse pour grype

0.122.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.122.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: 31.63 Mo
  • homepage : https://github.com/anchore/grype

package           : tis-grype-portable
version           : 0.122.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      : 88d82eae-c1c2-47cf-8149-407bf1a003b1
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-11-16T21:01:40.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         : TG0aLQIyrm6AhrK/4yb3Co5qvb8qV+F+Kpd6dj+yDTg5IONvX8Ab9ohYLcc7TGKqEYa6H38ZvT18ARtQzoLBU/Z9eobZnpZkgmySsegHvKEgmeTcXYSEnIf1inDGHBokvm0Ogj+s8dMrpJkiSaNIGVLCOIemz5bFjoH+ppiKRu4D25fHevU6Rt7wPVCE2LM2oCkc1feh9fAXL2okpTanDEAFwXpErMyufRsN7BW2xAQIfhl9B6InmVZqPxoMii3lBbLdxJdPynvzT61xRdYZzw/oCSlqdOTSlYhr4Yw2pe4axU6p6CmmZmlEnRESCy6gAiKJCXCVjBjRFqKpp8Vpmw==

# -*- 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
c948f241c66b4c49f07a36d78c82eee99c27c9f0e034f51e8b68fb593bf2aacc : WAPT/control
b003c383713a71e50199faede2438368cf65b9faea43021065292a9ff2e08627 : WAPT/icon.png
617017fbf9078bb9dff57c04c9e59e4dd7b9c93f861640e136fdd5af20263891 : grype_0.122.0_windows_amd64.zip
cc75c713ecfc8b28902b59da2a0477ea82fe3f2368af4e91026ba0c316511cb7 : luti.json
ae2b6deeafef4bdca37792cd82d4348b40c2f30ca53a6a5f25f13007ab909747 : setup.py
79fd331601884223c245f1eccbb64fd8d7e58e34b07a7bb79f8853af66f5990f : update_package.py