feat(go): port FIM/pkgdb/rootcheck integrity engines and add go-sidecar dashboard consumer
Adds sidecar-only, --state-dir-gated FIM, package-DB-anchor, and rootcheck
engines to the Go migration sidecar, wired into agent.Sweep/Initialize
behind the existing baseline lifecycle. Adds a read-only, schema-checked
Python dashboard consumer (go_sidecar_state_dir, /api/go-sidecar/*, Sidecar
tab) that never starts, stops, or mutates the Go sidecar's state.
Also fixes drift found while reconciling this work: enodia_sentinel/web.py
had reinvented local schema constants instead of using the canonical
enodia_sentinel/schemas.py catalog (now registers enodia.go.sidecar.v1
there and reuses ALERT_SNAPSHOT_V1/INCIDENT_V1); docs/RULES.md had drifted
from what `rules docs` actually generates for SIDs 100069-100078 (ruleops.py
was missing metadata for four SIDs and had stale drill text for four more),
now back in sync with a regression test pinning them together.
Updates CLAUDE.md, README.md, go-agent/README.md, and docs/{ROADMAP,
GO_PORT_HANDOFF,SURICATA_ASSIMILATION,THREAT_MODEL,OPERATIONS,SCHEMAS,
COMMAND_REFERENCE}.md to reflect the landed work.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NQivSKBqQJsayz1xcYqWzZ
This commit is contained in:
parent
1d1dee7f6e
commit
d835386381
43 changed files with 3419 additions and 72 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"codeberg.org/anassaeneroi/enodia-sentinal/go-agent/internal/model"
|
||||
)
|
||||
|
|
@ -77,9 +78,16 @@ func TestCollectSlowAddsInjectedPackageOwnership(t *testing.T) {
|
|||
|
||||
func TestIntegrityAnchorsAreTruthfulAndReadOnly(t *testing.T) {
|
||||
directory := t.TempDir()
|
||||
anchors := IntegrityAnchors(directory)
|
||||
anchors := IntegrityAnchors(directory, IntegritySettings{
|
||||
FIMEnabled: true, FIMScanInterval: 5 * time.Minute,
|
||||
PackageVerifyEnabled: true, PackageVerifyInterval: 6 * time.Hour,
|
||||
RootcheckEnabled: true, RootcheckInterval: 5 * time.Minute,
|
||||
})
|
||||
if anchors["fim_baseline"].(map[string]any)["status"] != "missing" ||
|
||||
anchors["rootcheck"].(map[string]any)["enabled"] != false {
|
||||
anchors["rootcheck"].(map[string]any)["enabled"] != true ||
|
||||
anchors["rootcheck"].(map[string]any)["interval"] != int64(300) ||
|
||||
anchors["package_verify"].(map[string]any)["engine"] != "pacman-qkk" ||
|
||||
anchors["package_verify"].(map[string]any)["interval"] != int64(21600) {
|
||||
t.Fatalf("anchors=%#v", anchors)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(directory, "hash-chain.jsonl"), []byte("{}\n"), 0o600); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue