[spark-compete] fix: redact hook/log paths from user-facing list output#1430
Open
Esc1200 wants to merge 1 commit into
Open
[spark-compete] fix: redact hook/log paths from user-facing list output#1430Esc1200 wants to merge 1 commit into
Esc1200 wants to merge 1 commit into
Conversation
- cmd_fix secrets: show only filename (not full path) for redacted log files - cmd_fix autostart: remove hook file path from hooks list display - specialization_loop_status_command: use prepend_pythonpath helper instead of inline PYTHONPATH construction with internal paths Severity: MEDIUM
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.
[spark-compete] Redact internal hook/log paths from CLI list output
Team: drophub_sir (members: esc1200, drophub_sir, spark-agent)
Author: Esc1200
Actual Behavior
cli.py leaks internal filesystem paths in three user-facing output locations:
cmd_fixsecrets --redact-logs): Prints full file paths of redacted log files (e.g./home/user/.spark/logs/process.log) instead of just filenames.cmd_fixautostart): Prints hook file paths (e.g./home/user/.spark/hooks/spark-autostart.sh) alongside hook name and installed status.specialization_loop_status_command): Constructs PYTHONPATH inline with internalswarm_root/apps/bridge/srcpaths using rawstr()conversion instead of the existingprepend_pythonpathhelper.Expected Behavior
prepend_pythonpathhelper for consistency.Repro Steps
spark fix secrets --redact-logs— observe full filesystem paths printed for each redacted log file.spark fix autostart— observe hook file paths printed in the Hooks section.specialization_loop_status_commanduses inline PYTHONPATH construction leaking internal directory structure.Before/After Proof
print(f" {path}")prints full path; hook output includeshook.get('path'); PYTHONPATH built with rawstr(bridge_src).print(f" {Path(path).name}")shows filename only; hook output omits path; PYTHONPATH usesprepend_pythonpath(env, [bridge_src]).Changes
src/spark_cli/cli.py: 3 lines changed (3 insertions, 4 deletions)Path(path).namereplaces full path display{hook.get('path')}from hooks outputprepend_pythonpathhelper