Watch
1
0
Fork
You've already forked RedFlag
0

process scan: set Source on AgentCommand to avoid check constraint crash

TriggerProcessScan was building an AgentCommand without Source, which hit
the agent_commands_source_check constraint every time. Every other
command-creation site sets this correctly; this one got missed.

Thanks to QiTechCo for the catch during v0.2.8.0 dev testing.

Co-Authored-By: Xzaviar <user@QiTechCo.qitc.io>
This commit is contained in:
Fimeg 2026-06-11 17:24:06 -04:00
commit d55026aa44

View file

@ -341,6 +341,7 @@ func (h *ProcessHandler) TriggerProcessScan(c *gin.Context) {
AgentID: agentID,
CommandType: "scan_processes",
Status: "pending",
Source: "manual",
CreatedAt: time.Now().UTC(),
UpdatedAt: time.Now().UTC(),
}