Store safeinputs MCP server logs in artifact and add health endpoint#5726
Merged
Store safeinputs MCP server logs in artifact and add health endpoint#5726
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
|
@copilot add GET /health endpoint using in the start safe inputs shell script. Update shell script to use /health. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Store safeinputs MCP server log in artifact
Store safeinputs MCP server logs in artifact and enhance server.log initialization
Dec 7, 2025
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done in commit 09a66bd. Added GET /health endpoint that returns: {
"status": "ok",
"server": "safeinputs",
"version": "1.0.0",
"tools": <count>
}Updated start script to use |
Copilot
AI
changed the title
Store safeinputs MCP server logs in artifact and enhance server.log initialization
Store safeinputs MCP server logs in artifact and add health endpoint
Dec 7, 2025
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.
SafeInputs MCP server logs were not being captured as artifacts, making debugging difficult. The audit command had no way to access server.log files from workflow runs.
Changes
Added artifact upload for safeinputs logs (
pkg/workflow/compiler_yaml.go)generateUploadSafeInputsLogs()function creates upload step for/tmp/gh-aw/safe-inputs/logs/IsSafeInputsEnabled()returns trueEnhanced server.log initialization (
pkg/workflow/sh/start_safe_inputs_server.sh)>to>>to preserve header when appending server outputAdded GET /health endpoint (
pkg/workflow/js/safe_inputs_mcp_server_http.cjs)/healthendpoint instead of root endpointAdded test for health endpoint (
pkg/workflow/js/safe_inputs_mcp_server_http.test.cjs)Recompiled workflows
Result
The audit command automatically downloads the "safeinputs" artifact via existing
downloadRunArtifacts()logic. Server logs are now available in downloaded artifacts atsafeinputs/server.logfor debugging. The health endpoint provides a simple way to verify server is running without authentication.Example in compiled workflow:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.