Skip to content

security(council): sanitize console logs to prevent sensitive data ex…#50

Merged
mrhpython merged 1 commit intomainfrom
claude/sanitize-council-logs-011CUM9qMUMW4WKTqpvoHQYP
Oct 21, 2025
Merged

security(council): sanitize console logs to prevent sensitive data ex…#50
mrhpython merged 1 commit intomainfrom
claude/sanitize-council-logs-011CUM9qMUMW4WKTqpvoHQYP

Conversation

@mrhpython
Copy link
Copy Markdown
Owner

…posure

This commit addresses security vulnerabilities in console logging that could expose sensitive information such as API keys, stack traces, user data, and system internals.

Changes:

  1. Error object logging (lines 156, 208, 219, 251, 269, 831, 836)

    • Changed from: err?.message || err
    • Changed to: err?.message || 'unknown error'
    • Prevents logging full error objects with stack traces and system paths
  2. Full error object parameters (lines 603, 640)

    • Changed from: googleErr.message || googleErr / toolErr.message || toolErr
    • Changed to: googleErr.message || 'unknown error'
    • Prevents exposing API credentials or system internals in error objects
  3. Perplexity error handling (line 719)

    • Changed from: String(perplexityErr)
    • Changed to: 'Unknown Perplexity error'
    • Prevents exposing API keys or authentication details
  4. Lens issues logging (line 818)

    • Changed from: Logging full issue objects with content
    • Changed to: Logging only issue types and counts
    • Prevents exposing user input or LLM response content

All changes include SECURITY comments explaining the rationale for each sanitization to maintain code clarity and prevent regression.

Security Impact:

  • Prevents leak of file system paths
  • Prevents leak of API keys in error messages
  • Prevents leak of user data or PII
  • Prevents leak of LLM responses
  • Reduces attack surface for information disclosure

🤖 Generated with Claude Code

Summary

Describe the change in one or two sentences.

Checklist (Truth Kernel)

  • Local: npm ci
  • Local: node backend/scripts/audit-truth.cjs (no violations)
  • Local: npm test (Node’s built-in runner)
  • Docs updated if behavior changes (README / STATUS / Knowledge)

Notes

Link to related specs, runs, or artifacts if relevant.

…posure

This commit addresses security vulnerabilities in console logging that could
expose sensitive information such as API keys, stack traces, user data, and
system internals.

Changes:
1. Error object logging (lines 156, 208, 219, 251, 269, 831, 836)
   - Changed from: err?.message || err
   - Changed to: err?.message || 'unknown error'
   - Prevents logging full error objects with stack traces and system paths

2. Full error object parameters (lines 603, 640)
   - Changed from: googleErr.message || googleErr / toolErr.message || toolErr
   - Changed to: googleErr.message || 'unknown error'
   - Prevents exposing API credentials or system internals in error objects

3. Perplexity error handling (line 719)
   - Changed from: String(perplexityErr)
   - Changed to: 'Unknown Perplexity error'
   - Prevents exposing API keys or authentication details

4. Lens issues logging (line 818)
   - Changed from: Logging full issue objects with content
   - Changed to: Logging only issue types and counts
   - Prevents exposing user input or LLM response content

All changes include SECURITY comments explaining the rationale for each
sanitization to maintain code clarity and prevent regression.

Security Impact:
- Prevents leak of file system paths
- Prevents leak of API keys in error messages
- Prevents leak of user data or PII
- Prevents leak of LLM responses
- Reduces attack surface for information disclosure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
soulfield Ready Ready Preview Comment Oct 21, 2025 10:57pm

@mrhpython mrhpython merged commit 528e896 into main Oct 21, 2025
3 of 5 checks passed
@mrhpython mrhpython deleted the claude/sanitize-council-logs-011CUM9qMUMW4WKTqpvoHQYP branch October 21, 2025 23:10
mrhpython added a commit that referenced this pull request Oct 22, 2025
…posure (#50)

This commit addresses security vulnerabilities in console logging that could
expose sensitive information such as API keys, stack traces, user data, and
system internals.

Changes:
1. Error object logging (lines 156, 208, 219, 251, 269, 831, 836)
   - Changed from: err?.message || err
   - Changed to: err?.message || 'unknown error'
   - Prevents logging full error objects with stack traces and system paths

2. Full error object parameters (lines 603, 640)
   - Changed from: googleErr.message || googleErr / toolErr.message || toolErr
   - Changed to: googleErr.message || 'unknown error'
   - Prevents exposing API credentials or system internals in error objects

3. Perplexity error handling (line 719)
   - Changed from: String(perplexityErr)
   - Changed to: 'Unknown Perplexity error'
   - Prevents exposing API keys or authentication details

4. Lens issues logging (line 818)
   - Changed from: Logging full issue objects with content
   - Changed to: Logging only issue types and counts
   - Prevents exposing user input or LLM response content

All changes include SECURITY comments explaining the rationale for each
sanitization to maintain code clarity and prevent regression.

Security Impact:
- Prevents leak of file system paths
- Prevents leak of API keys in error messages
- Prevents leak of user data or PII
- Prevents leak of LLM responses
- Reduces attack surface for information disclosure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
mrhpython pushed a commit that referenced this pull request Oct 22, 2025
…gents + PR #50 security fixes

- Discovered Claude Code Web (claude.ai/code) October 2025 launch
- Created 7 specialized CLI subagents (3,234 lines total)
- Merged first automated PR via Claude Code Web (PR #50)
- Fixed 10 security vulnerabilities in council.js
- Designed hybrid workflow: Web + CLI + Projects
- Strategic pivot: Eliminate ChatGPT, increase Claude budget to 00/month
- Documented complete session with 325-line daily note

Related: #epic-session #claude-code-web #security #subagents
mrhpython pushed a commit that referenced this pull request Oct 22, 2025
…I-Team-Workflow)

NEW UNIFIED WORKFLOW:
- Three-tier architecture: Claude Code Web + CLI Subagents + VS Code Plugin
- Complete subagent documentation (7 specialized agents, 3,234 lines)
- Real-world examples from 2025-10-21 & 2025-10-22 sessions
- Production deployment workflow (6 phases)
- Cost optimization strategy (00/month Claude only)
- 6-lens quality gates integration
- Git workflow with pre-commit hooks
- MCP server integration guide

IMPROVEMENTS OVER OLD WORKFLOW:
- Incorporates Claude Code Web discovery (2025-10-21)
- Documents proven PR automation (PR #50 success)
- Includes security fix workflow (VULN-2025-002 & VULN-2025-004)
- CLI subagent invocation patterns with examples
- Decision matrix for tool selection
- Success metrics and troubleshooting

OLD FILES ARCHIVED:
- Multi-AI-Team-Workflow.md → /home/michael/Documents/soulfield-archive/2025-10/workflows-archived/
- Multi-AI-Team-Workflow-Summary.md → archived

FILE:
- workspace/docs/Obsidian/docs/reference/workflows/Soulfield-Development-Workflow.md (17,672 bytes)

Related: #workflow #claude-code-web #cli-subagents #production-ready
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.

2 participants