defenseunicorns / uds-security-hub-v1-archive

All things about securing UDS
Apache License 2.0
2 stars 6 forks source link

E2E Test for Offline DB Access #123

Open naveensrinivasan opened 3 months ago

naveensrinivasan commented 3 months ago

Description:

With the integration of Offline DB access in PR #119, we need to implement end-to-end (E2E) tests to ensure its functionality.

Background:

Currently, we lack an automated E2E test for offline DB access. Testing requires an initialized folder containing trivy.db. More details can be found in Issue #486 on the Trivy repository.

Steps to Reproduce:

  1. Initialize Offline DB:

    go run main.go -p ./pkg/scan/testdata/zarf-package-mattermost-arm64-9.9.1-uds.0.tar.zst -d /var/folders/pf/bq3t19j505xg4pprmb3ls7r0000gn/T/trivy-db-2535363142/db
  2. Offline DB Directory Structure: The directory for the offline DB should be structured as follows:

    tree /var/folders/pf/bq3t19j505xg4pprmb3ls7r0000gn/T/trivy-db-2535363142/db
    ├── db
    │   ├── metadata.json
    │   ├── trivy.db
    │   └── fanal.db

Tasks:

Notes:

References:

partkyle commented 3 weeks ago

related #225