Git Product home page Git Product logo

audit's Introduction

Go Report Card Coverage Status


Audit

IMPORTANT This project is a POC. Before running the reports, ensure that you have its latest version by running git pull and git status.

Overview

The audit is an experimental analytic tool which uses the Operator Framework solutions. Its purpose is to obtain and report and aggregate data provided by checks and analyses done in the operator bundles, packages and channels from an index catalog image.

Note that the latest version of the reports generated for all images can be checked in testdata/report. The file names are create by using the kind/type of the report, image name and date. (E.g. testdata/report/bundles_quay.io_operatorhubio_catalog_latest_2021-04-22.xlsx).

Goals

  • Be able to audit and gathering aspects all bundles, packages and channel of an OLM index catalog and output a report
  • Be able to extract a report with the audit results and in some formats such as json.
  • Be able to perform validations and analyses in the index catalog for the bundle and catalog level.

For further information about its motivation see the EP Audit command operation.

Pre-requirements

  • go 1.16
  • docker
  • access to the registry where the index catalog and operator bundle images are distribute
  • access to a Kubernetes cluster
  • operator-sdk installed >= `1.5.0

NOTE that you can run the reports without SDK and the cluster running with by using the flag --disable-scorecard. That is only required for the scorecard results.

Install

To get the project and install the binary:

$ git clone [email protected]:operator-framework/audit.git
$ cd audit
$ make install

Usage

Ensure that you have access to pull the images

You must run docker login to have access to the images.

Generating the reports

Now, you can audit all operator bundles of an image catalog with:

audit-tool index bundles --index-image=registry.redhat.io/redhat/redhat--operator-index:v4.7 --head-only --output-path=testdata/xls

Now, you can audit all packages of an image catalog with:

audit-tool index packages --index-image=registry.redhat.io/redhat/redhat--operator-index:v4.7 --output-path=testdata/xls

Note that you can also output the results in JSON format:

audit-tool index bundles \
    --index-image=registry.redhat.io/redhat/redhat-operator-index:v4.7 \
    --limit=3 \
    --head-only \
    --output=json \  
    --output-path=testdata/json

Options

Use the --help flag to check the options and the further information about its commands. Following an example:

$ audit-tool index bundles --help
Provides reports with the details of all bundles operators ship in the index image informed according to the criteria defined via the flags.

 **When this report is useful?** 

This report is useful when is required to check the operator bundles details.

Usage:
  audit-tool bundles [flags]

Flags:
...

Filtering results by names

See that you can use the --filter --flag to filter the results by the package name:

audit-tool index [bundles|packages|channels] --index-image=registry.redhat.io/redhat/redhat-operator-index:v4.5 --filter="mypackagename"

Option to run in dedicated environments

Use the flag --server-mode to generate the reports in dedicated environments. By using this flag option the images which are downloaded will not be removed, allowing the reports to be generated faster after the first execution.

Also, ensure that you have enough space to store all images. Note that the default behavior is to remove them, when this option is not used.

Reports

Report Type Command Description
bundles audit index bundle --index-image [OPTIONS] Audit all Bundles
packages audit index packages --index-image [OPTIONS] Audit all Packages
channels audit index channels --index-image [OPTIONS] Audit all Channels

Testdata

The samples in testdata/samples which are generated by running make generate-samples. Also, to run make generate-testdata to re-generate all reports in the testdata.

Custom Dashboards

In order to address specific needs, audit has been used to generate custom dashboards. The dashboards are generated using the JSON results provided by the audit index reports, e.g.:

audit-tool dashboard deprecate-apis --file=testdata/report/bundles_quay.io_operatorhubio_catalog_latest_2021-04-22.json 

Index page

The index.html page is generated via make generate-index. It will aggregate in its results all dashboards found per image which are available in the testdata. To check it, see https://operator-framework.github.io/audit/ .

FAQ

How Audit works?

Following the steps performed by Audit.

  • Extract the database from the image informed
  • Perform SQL queries to obtain the data from the index db
  • Download and extract all bundles files by using the operator bundle path which is stored in the index db
  • Get the required data for the report from the operator bundle manifest files
  • Use the operator-framework/api to execute the bundle validator checks
  • Use SDK tool to execute the Scorecard bundle checks
  • Output a report providing the information obtained and processed.

For some detailed information about its implementation check here.

What means UNKNOWN ?

The UNKNOWN status means that was not possible gathering the information, usually because was not possible to download the operator bundle to check it.

What means NOT USED ?

If you see a column with this information than that means that the specific criteria is not useful or applied to none operator bundle of a package or the specific bundle itself.

What are the images used to generate the full reports?

audit's People

Contributors

camilamacedo86 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.