aizatto / clair

curl scripts to help navigate clair api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clair

Purpose:

To play around with clair api and see what I can get from it.

Requirements

  1. gum
  2. jq
  3. curl

Check with ./check.sh

Check: success Check: failed

Preparation

Copy .env.example to .env

Create JWT Token

Use jwt.io.

Header:

{
  "alg": "HS256",
  "typ": "JWT"
}

Payload:

{
  "iss": "quay"
}

Verify Signature:

  1. Put your clair secret
  2. Click the checkbox "secret base64 encoded"

Store the encoded JWT token in .env

JWT_TOKEN=...

Usage

Get Notification

Example:

./get_notification.sh f917505f-4690-4706-88cf-0fe356688515

Get Notification

Get Vulnerability Report

Example:

./get_vulnerability_report.sh fd3b94f4a63a9651ba186b8813bda39503dd1ff558b4a9d3fefaa62f785eb71b

Reference

  1. Api

About

curl scripts to help navigate clair api

License:MIT License


Languages

Language:Shell 100.0%