Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syft Packages Extractor

This package is designed to analyze container images and extract package information using the Syft tool by Anchore.

Table of Contents

  1. Overview
  2. Features
  3. Installation
  4. Usage
  5. Contributing
  6. License

Overview

The Syft Packages Extractor analyzes container images to extract detailed package information. It uses the Syft tool to examine images and provides information on the packages found within those images.

Features

  • Analyze container images and extract package information.
  • Handle multiple image formats and locations.
  • Log the analysis process and results.

Installation

To install this package, you must have Go installed on your machine.

  1. Clone the repository:

    git clone https://github.com/Checkmarx/containers-syft-package-extractor.git
  2. Navigate to the project directory:

    cd containers-syft-package-extractor
  3. Install dependencies:

    go mod tidy

Usage

Here is an example of how to use the SyftPackagesExtractor:

package main

import (
    "github.com/Checkmarx/containers-types/types"
    "github.com/Checkmarx/containers-syft-package-extractor/syftPackagesExtractor"
    "log"
)

func main() {
    extractor := syftPackagesExtractor.SyftPackagesExtractor{}

    images := []types.ImageModel{
        // Populate with ImageModel objects
    }

    // Analyze images
    containerResolution, err := extractor.AnalyzeImages(images)
    if err != nil {
        log.Fatalf("Error analyzing images: %v", err)
    }

    // Handle the container resolution as needed
    log.Printf("Analyzed images: %v", containerResolution)
}

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages