refactor(api): make agents canonical - #2894
Merged
Merged
Conversation
Replace deprecated types.App, types.AppConfig, and types.AppHelixConfig with types.Agent, types.AgentConfig, and types.AgentHelixConfig to fix staticcheck SA1019 linter errors.
| if err := AttachHelixOrgMCP(ctx, c.ProjectService, state.AgentAppID, c.HelixOrgURL, workerID, c.MCPAuthBearer); err != nil && c.Logger != nil { | ||
| c.Logger.Warn("helix spawner: attach helix-org MCP", "worker", workerID, "app", state.AgentAppID, "err", err) | ||
| if err := AttachHelixOrgMCP(ctx, c.ProjectService, state.AgentID, c.HelixOrgURL, workerID, c.MCPAuthBearer); err != nil && c.Logger != nil { | ||
| c.Logger.Warn("helix spawner: attach helix-org MCP", "worker", workerID, "agent", state.AgentID, "err", err) |
Collaborator
Author
🔐 CodeQL Security AlertThe CodeQL check completed but flagged 1 medium severity security vulnerability:
DetailsThe flagged line: c.Logger.Warn("helix spawner: attach helix-org MCP", "worker", workerID, "agent", state.AgentID, "err", err)CodeQL detected that
Suggested FixSanitize user-controlled values before logging, or use structured logging that escapes special characters automatically. For example: c.Logger.Warn("helix spawner: attach helix-org MCP",
"worker", workerID,
"agent", sanitize(state.AgentID),
"err", err.Error()) // Use .Error() string rather than raw errorAlternatively, if the logging framework already handles structured key-value pairs safely, you may be able to suppress this warning with a CodeQL annotation if you've verified it's a false positive. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests