mirror of
https://github.com/vee1e/krply.git
synced 2026-09-01 17:57:03 +00:00
fix(audit,web,deploy): audit ids, web dry-run view, hardened chart, docs
Audit: correlation event_ids include stage and response code so the multi-stage lines of one request no longer collapse under dedup; match scans are bounded to a time window and a page instead of the object's full history. Web: dry-run results are read from dry_run_result (nested) so the verdict is rendered correctly and conflicts/errors/skipped are shown; the plans view no longer POSTs an unsolicited plan on page load; coverage and streams surface API errors instead of showing a misleading empty state and follow cursor pagination so they are not stuck on the oldest page; the diff path tokenizer handles backslash-escaped dotted keys. Deploy/CI: the chart no longer grants the query server a cluster-wide read ClusterRole, runs as non-root with a read-only root filesystem, adds liveness/readiness probes, wires the ConfigMap as env (STORE_PATH, LISTEN_ADDR), defaults the journal to a PVC instead of an ephemeral emptyDir, and adds imagePullSecrets; the replay ClusterRole drops the unused update verb; a Dockerfile builds a static distroless image; GitHub actions are pinned by commit SHA, jobs set least-privilege permissions, the Vercel deploy skips fork PRs, CI passes the Makefile test timeouts, and make lint runs a real web syntax check. Docs: event-schema/consistency no longer describe an ingest_sequence field, an observed-time-based event_id, or restart-from-checkpoint; the threat model documents the unauthenticated HTTP API surface and the chart's RBAC change; replay-safety matches the enforced dry-run gate.
This commit is contained in:
parent
44fbd878a1
commit
9f4b6c2c5a
23 changed files with 251 additions and 96 deletions
|
|
@ -79,10 +79,11 @@ func seedDemo(ctx context.Context, store storage.Store, demoPath string) error {
|
|||
|
||||
func run() error {
|
||||
var (
|
||||
storePath = flag.String("store", "krply.db", "path to the SQLite journal")
|
||||
listen = flag.String("listen", ":8080", "listen address")
|
||||
demoPath = flag.String("demo", "", "seed an empty journal from this SQLite demo fixture")
|
||||
showVer = flag.Bool("version", false, "print version and exit")
|
||||
storePath = flag.String("store", "krply.db", "path to the SQLite journal")
|
||||
listen = flag.String("listen", ":8080", "listen address")
|
||||
demoPath = flag.String("demo", "", "seed an empty journal from this SQLite demo fixture")
|
||||
showVer = flag.Bool("version", false, "print version and exit")
|
||||
storeFlagSet bool
|
||||
)
|
||||
flag.Parse()
|
||||
|
||||
|
|
@ -97,10 +98,19 @@ func run() error {
|
|||
if f.Name == "listen" {
|
||||
listenFlagSet = true
|
||||
}
|
||||
if f.Name == "store" {
|
||||
storeFlagSet = true
|
||||
}
|
||||
})
|
||||
if !listenFlagSet && os.Getenv("PORT") != "" {
|
||||
listenAddr = ":" + os.Getenv("PORT")
|
||||
}
|
||||
if !listenFlagSet && os.Getenv("LISTEN_ADDR") != "" {
|
||||
listenAddr = os.Getenv("LISTEN_ADDR")
|
||||
}
|
||||
if !storeFlagSet && os.Getenv("STORE_PATH") != "" {
|
||||
*storePath = os.Getenv("STORE_PATH")
|
||||
}
|
||||
|
||||
slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, nil)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue