Build Your Own Queries
Speed up filtering and reporting by working with enriched JSON data dumps
Scanning package manifests is resource-intensive as it involves enriching package metadata by querying the Insights API. However, filtering and reporting may be done multiple times on the same manifest. To speed up this process, you can dump enriched data as JSON and load it for subsequent filtering and reporting operations.
Query Workflow
The BYOQ workflow consists of two main phases:
Data Collection
Scan and enrich package data, then dump to JSON files for reuse
Analysis & Reporting
Load enriched data for fast filtering, querying, and report generation
Phase 1: Dump Enriched JSON Manifests
Collect and enrich package data, then save to a directory for reuse:
The JSON dump contains all enriched metadata including vulnerabilities, scorecard data, licenses, and project information.
Phase 2: Load and Query Enriched Metadata
Use the dumped data for fast filtering and reporting:
Security Guardrails with Filters
Implement security guardrails in CI/CD pipelines using the --filter-fail
argument, which causes the command to fail if any package matches the given filter.
Example: Fail Build on Unmaintained Packages
When packages match the filter criteria, the command exits with a non-zero status: