feat: scan history store and trend subcommand
- Dominant language
- Go
- Stars
- 791
- Forks
- 146
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 35
Description
## Summary
Persist scan results to a **JSONL history file** and add a `trend` subcommand that shows how findings have changed between scans over time.
## Motivation
A one-off scan tells you where you are today. History tells you whether things are getting better or worse. Tracking findings across multiple runs lets teams measure progress and catch regressions early.
## Changes
- New `--history` flag on `scan` to append results to a JSONL history file (`--history-file` to set the path)
- Scope ID computed as a SHA-256 hash of the scanned subscriptions/resource groups, so records from different scopes never mix
- New `trend` subcommand renders a table comparing the last N scans for a given scope
- New `internal/history` package with JSONL store, file locking, and trend rendering
Contributor guide
Research direction
Start by tracing the existing scan command and subcommand entry points, then review the proposed internal/history package boundaries. Done means scan can append scope-specific results to JSONL history and trend can compare the last N scans for that scope, including the requested history options and file locking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cli, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100