Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Change safe-output file location from /tmp to /opt

Security Improvement: The safe-output MCP server now stores outputs in /opt/gh-aw/safeoutputs/outputs.jsonl (read-only mount for agent container) instead of /tmp/gh-aw/safeoutputs/outputs.jsonl (read-write mount). This prevents the agent container from having write access to the output file.

Changes Made

  • Investigate current implementation
  • Update Go code to change output file path from /tmp/gh-aw/safeoutputs/outputs.jsonl to /opt/gh-aw/safeoutputs/outputs.jsonl
  • Update JavaScript default path in safe_outputs_config.cjs
  • Update collect_ndjson_output.cjs validation config path
  • Update safe_outputs_bootstrap.cjs config path
  • Update safe_outputs_tools_loader.cjs default tools path
  • Update test assertions to expect new path
  • Update documentation (specs/layout.md, specs/security_review.md, specs/safe-output-environment-variables.md, docs/)
  • Recompile all 133 workflow files
  • Run tests to verify changes - all relevant tests pass ✅
  • Update secret redaction to process /opt/gh-aw directory ✅
  • Merge main branch ✅
  • Format, lint, and recompile ✅
  • Fix all JavaScript tests ✅ (3000 tests passing)

Files Changed

Go Code:

  • pkg/workflow/compiler_activation_jobs.go - Updated GH_AW_SAFE_OUTPUTS environment variable
  • pkg/workflow/agentic_output_test.go - Updated test assertions

JavaScript:

  • actions/setup/js/safe_outputs_config.cjs - Updated default output file path
  • actions/setup/js/safe_outputs_bootstrap.cjs - Updated config path default
  • actions/setup/js/safe_outputs_tools_loader.cjs - Updated default tools path
  • actions/setup/js/collect_ndjson_output.cjs - Updated validation config and output file paths
  • actions/setup/js/redact_secrets.cjs - Extended to scan both /tmp/gh-aw and /opt/gh-aw directories

JavaScript Tests:

  • actions/setup/js/collect_ndjson_output.test.cjs - Updated all config paths to /opt
  • actions/setup/js/safe_outputs_config.test.cjs - Updated expected default path
  • actions/setup/js/safe_outputs_mcp_server_defaults.test.cjs - Updated config paths and directory setup
  • actions/setup/js/safe_outputs_tools_loader.test.cjs - Updated default tools path
  • actions/setup/js/redact_secrets.test.cjs - Updated log message expectations

Documentation:

  • specs/layout.md - Updated file location documentation
  • specs/security_review.md - Updated security review diagrams and examples
  • specs/safe-output-environment-variables.md - Updated environment variable examples
  • docs/src/content/docs/reference/environment-variables.md - Updated documentation

Compiled Workflows:

  • All 133 .lock.yml files recompiled with new path

Test Results

All tests passing:

  • Go tests: TestAgenticOutputCollection - PASS
  • JavaScript tests: 3000 tests passed ✅
  • Secret redaction tests: 33 tests passed ✅
  • Safe outputs tests: All tests passed ✅

Security Enhancement

The secret redaction script now processes both directories:

  • /tmp/gh-aw - Temporary files and logs
  • /opt/gh-aw - Configuration and safe-output files (including outputs.jsonl)

This ensures secrets are redacted from the safe-output file before artifacts are uploaded.

Original prompt

Service department: good price.

@copilot, update the safe-output MCP server to change how it stores outputs sent by the LLM.

Currently, it writes a .jsonl file under the /tmp folder. Update it to store that file under the /opt folder alongside the other JavaScript files. This change should prevent the agent container from having write access to that file.

Also update the agent intake code so that it reads from the new file location.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Changeset

  • Type: patch
  • Description: Move safe-output storage from /tmp to /opt and update the agent intake and secret-redaction scripts to read from the new path (/opt/gh-aw/safeoutputs/outputs.jsonl). This keeps the file writable by the MCP server while making it read-only inside the agent container.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator


Changeset

  • Type: patch
  • Description: Move safe-output storage from /tmp to /opt and update the agent intake and secret-redaction scripts to read from /opt/gh-aw/safeoutputs/outputs.jsonl. This keeps the file writable by the MCP server while making it read-only inside the agent container.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
Copy link
Contributor

@copilot, ensure that secret redaction also processes this new file location.

Changes:
- Updated Go code to set GH_AW_SAFE_OUTPUTS to /opt/gh-aw/safeoutputs/outputs.jsonl
- Updated JavaScript default paths in safe_outputs_config.cjs and safe_outputs_bootstrap.cjs
- Updated collect_ndjson_output.cjs to read from /opt for config and validation files
- Updated test assertions to expect new path
- Updated documentation in specs/ and docs/
- Recompiled all workflow files with new path

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update LLM output storage to new location Move safe-output file from /tmp to /opt for read-only agent access Jan 22, 2026
Copilot AI requested a review from pelikhan January 22, 2026 04:37
Extended redact_secrets.cjs to scan both /tmp/gh-aw and /opt/gh-aw directories for secret redaction. This ensures the safe-output file in /opt/gh-aw/safeoutputs/outputs.jsonl is also processed for secret removal before artifacts are uploaded.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 22, 2026

@copilot, ensure that secret redaction also processes this new file location.

Updated in 774ea3b. The redact_secrets.cjs script now scans both /tmp/gh-aw and /opt/gh-aw directories to ensure secrets are redacted from the safe-output file before artifacts are uploaded.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test Results - Copilot

Status: PASS

@pelikhan

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 Merged PRs:

Tests:

  • ✅ GitHub MCP
  • ✅ Serena MCP
  • ✅ Playwright
  • ✅ Tavily
  • ✅ File Writing
  • ✅ Bash Tool

Overall: PASS

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

GitHub MCP: ✅ Add temporary project ID support for safe outputs; Fix add_comment to respect append-only-comments from messages config
Serena MCP: ✅
Playwright: ✅
Tavily: ✅
File write: ✅
Bash cat: ✅
Overall: PASS

AI generated by Smoke Codex

@pelikhan
Copy link
Contributor

@copilot, merge main, format, lint, fix text, then recompile.

Copilot AI and others added 2 commits January 22, 2026 06:07
Updated all JavaScript test files to use /opt/gh-aw/safeoutputs paths:
- collect_ndjson_output.test.cjs: Updated config and validation paths
- safe_outputs_config.test.cjs: Updated expected default path
- safe_outputs_mcp_server_defaults.test.cjs: Updated config paths and expectations
- safe_outputs_tools_loader.test.cjs: Updated default tools path
- redact_secrets.test.cjs: Updated log message expectations

All 3000 JS tests now pass ✅

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 22, 2026

@copilot merge main, fix js tests

Completed in 5b478eb (merge) and 3043e0c (test fixes).

Merged main branch and fixed all JavaScript test failures:

  • Updated test paths from /tmp/gh-aw/safeoutputs to /opt/gh-aw/safeoutputs
  • Fixed expectations for new log messages in redact_secrets
  • Updated default tools path in safe_outputs_tools_loader

✅ All 3000 JavaScript tests now passing

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

Smoke Test Results

Recent PRs:

Tests:

  • ✅ GitHub MCP
  • ✅ Serena MCP
  • ✅ Playwright
  • ✅ Tavily Search
  • ✅ File Writing
  • ✅ Bash Tool

Overall: PASS

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

GitHub MCP ✅: Add version check to upgrade command to enforce latest extension | Pass HTTP MCP server secrets to gateway container
Serena activate ✅
Playwright github title ✅
Tavily search ✅
File write ✅
Bash cat ✅
Overall: PASS

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

Smoke Test: Copilot Engine ✅

Last 2 Merged PRs:

Results:

  • ✅ GitHub MCP
  • ✅ Serena MCP
  • ✅ Playwright
  • ✅ File Writing
  • ✅ Bash Tool

Overall: PASS

cc: @pelikhan @Copilot

AI generated by Smoke Copilot

@pelikhan
Copy link
Contributor

@copilot grep for any references to the old file location as a sanity check

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants