Skip to content

fix[backend](socai/mcp): fixed create/update rule schemas#2377

Merged
AlexSanchez-bit merged 2 commits into
release/v12.0.0from
backlog/v12_mcp_alerting_rules
Jul 23, 2026
Merged

fix[backend](socai/mcp): fixed create/update rule schemas#2377
AlexSanchez-bit merged 2 commits into
release/v12.0.0from
backlog/v12_mcp_alerting_rules

Conversation

@AlexSanchez-bit

@AlexSanchez-bit AlexSanchez-bit commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

🛑 AI review — Sensitive area, extra care recommended

This PR touches critical paths or introduces changes the model cannot judge with sufficient confidence. Review carefully before merging.

architecture (gemini-3-flash-lite) — clean

Summary: Refactored MCP tool inputs to use 'any' for flexible JSON schema generation; logic remains contained within the MCP module layer.

No findings.

bugs (gemini-3-flash-lite) — clean

Summary: Refactored MCP tool inputs to use 'any' for flexible JSON schema generation with safe marshaling.

No findings.

🛑 security (gemini-3-flash-lite) — high/critical — please review

Summary: Introduction of arbitrary JSON input handling in MCP tools without schema validation, creating potential injection risks in downstream processing.

  • medium backend/modules/mcp/tools_eventprocessing.go:197 — The use of 'any' for DSL fields (Definition, Correlation, etc.) bypasses type safety and validation. If the downstream usecase expects specific structures, this could lead to injection or logic flaws. Ensure strict schema validation is applied to these fields before processing.
  • medium backend/modules/mcp/tools_small.go:318 — Changing 'Alert' to 'any' allows arbitrary JSON structures to be passed to the SOC AI service. Without validation, this may lead to SSRF or injection vulnerabilities if the external service interprets the payload unsafely.

🟢 go-deps — up to date

No pending Go dependency updates.

@AlexSanchez-bit

Copy link
Copy Markdown
Contributor Author

v is always the result of json.Unmarshal into any — it can only be nil, bool, float64, string, []any, or map[string]any

@AlexSanchez-bit
AlexSanchez-bit merged commit 388e771 into release/v12.0.0 Jul 23, 2026
1 check passed
@AlexSanchez-bit
AlexSanchez-bit deleted the backlog/v12_mcp_alerting_rules branch July 23, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant