security: remove hardcoded VPS SSH credentials from committed files#3
Draft
security: remove hardcoded VPS SSH credentials from committed files#3
Conversation
…d 88->96 A+ - copilot-instructions: added Infrastructure section with full VPS layout, SSL cert, nginx proxy, sshpass SSH, gen-delta env var, deployment log, updated stats (25 vitest tests, ESLint flat config) - SCORE.md: 96/100 A+ — ESLint +5, vitest +8, CI lint+test +2, VPS live
…P not connected - save-learning: full arg parsing (-c category, -p project, --context), category validation - delete-learning: by ID - Solves the 'learnings silently skipped' problem when MCP server is unavailable - Rule 11 updated: agents must use CLI fallback, never skip - 6 session learnings saved via new CLI (sshpass, C++17 pinning, gen-delta env, heredoc, nginx, CLI pattern) - 25/25 tests pass, clean build
…loyment Published to npm: @compr/contextengine-mcp@1.15.0 Changes since v1.14.1: - feat: CLI save-learning + delete-learning (terminal fallback when MCP unavailable) - quality: ESLint typescript-eslint flat config (0 errors) - quality: 25 vitest tests (search 11, activation 8, learnings 6) - security: rate-limit, CORS whitelist, graceful shutdown, Helmet - fix: gen-delta reads CONTEXTENGINE_DIST env var for VPS paths - fix: npm audit — 0 vulnerabilities - docs: copilot-instructions updated with VPS deployment details - infra: CI lint+build+test pipeline (Node 18/20/22) - Score: 96/100 A+
- .env.example: Documents all 6 env vars (client + server) - .cursorrules: Multi-agent context (build/run, architecture, rules) - deploy.sh: Full deploy script (npm publish + VPS server) - SCORE.md: Updated to reflect 89% A grade - Doc score: 30/30 (was 24/30) - Infra score: 22/30 (was 18/30)
- server/src/stripe.ts: Checkout session creation, webhook handler, license provisioning, email delivery - server/src/server.ts: Stripe webhook (raw body, before express.json), checkout endpoint, health shows stripeEnabled - server/package.json: Added stripe@14, nodemailer@6 deps - .env.example: Added STRIPE_*, SMTP_* env vars documentation Webhook handles: checkout.session.completed (auto-seed license + email key), customer.subscription.deleted (deactivate license), invoice.payment_failed (log warning). Extends existing license if same email+plan, creates new otherwise. Stripe mapping table tracks subscription→license relationship. Plans: pro (/mo), team (/mo), enterprise (/mo) + annual variants. Email: HTML template via Gandi SMTP (mail.gandi.net:465). Graceful degradation: server works without STRIPE_SECRET_KEY (payment endpoints disabled).
…ploy automation, CLI fallback, session 17
Previously 'contextengine score' only printed to stdout — agents would see the score but no file was committed. Now writes SCORE.md to each scored project root by default. Use --no-save to skip. Added generateProjectScoreMD() in agents.ts with category summary, detailed check breakdown, and improvements section.
…ion inject, enforcement nudge - 5 new CLI commands: save-session, load-session, list-sessions, end-session, import-learnings - Non-interactive mode: --yes/-y flag + TTY detection for agent/CI automation - Auto-session inject: loads most recent session (<72h) into search chunks on MCP startup - Enforcement nudge: reminds agents to save session every 15 tool calls - Nudge added to search_context + list_sources responses - Fixed stale version string (v1.10.0 → v1.16.0) in list_sources - Bumped package.json 1.15.1 → 1.16.0 - Build: 0 errors, Tests: 25/25 passed
- Docker scoring: check file content quality, not just existence - Stub Dockerfiles (<3 lines) get 1pt instead of 5 - Empty docker-compose (no image:/build:) gets minimal credit - Vercel/Netlify/Render/Fly projects get full infra points - Prevents agents from creating dummy files to game the score - Enforcement v2: escalating urgency + git status checks - 15 calls: gentle reminder nudge - 30 calls: 🚨 URGENT escalation - Every 2 min: checks git status across workspace, warns about uncommitted - Git check is time-cached to avoid hammering - README: honest messaging about agent limitations - 'Not perfect but solves pain points and saves time' - 'Guardrails while we wait for agents to become smarter' - Build: 0 errors, Tests: 25/25 passed
…atus bar - @ContextEngine chat participant with /status, /commit, /search, /remind - GitMonitor: periodic git status scanning across workspace folders - StatusBar: persistent indicator (clean/warning/critical) with action tooltips - Notifications: escalating warnings when uncommitted files exceed threshold - Commands: commitAll, showStatus, endSession, search knowledge base - ContextEngineClient: CLI delegation for search, sessions, end-session - Direct git ops: scanGitStatus, gitCommitAll, gitPush to all remotes - Compiles cleanly on TypeScript 5.4, targets VS Code ^1.93.0 - Also: published @compr/contextengine-mcp v1.16.0 to npm
- Azure DevOps org: FASTPROD → CSS - Publisher: fastprod → css-llc - Icon: brain + shield + gear + reminder bell (SVG + 256x256 PNG) - Description rewritten: durable memory & enforcement, not just knowledge base - Extension ID: css-llc.contextengine
…CENSE, publisher css-llc
…oring checklist - New infoPanel.ts: InfoStatusBarController (ℹ️ icon, priority 49) - WebView panel shows: live project status, 7-item monitoring checklist (FREE/PRO badges), end-of-session protocol, architecture explanation - Wired into extension.ts: showInfo command, gitMonitor.onSnapshot → updateInfoPanel - Published to VS Code Marketplace as css-llc.contextengine v0.2.0 - 14 files, 43.45 KB package
… VSCODE_EXTENSION_STEPS as complete - copilot-instructions.md: version 1.15→1.16, added VS Code Extension section (architecture, features, publishing workflow) - VSCODE_EXTENSION_STEPS.md: marked all steps ✅ PUBLISHED, updated with actual org name css-llc and gotchas
…LLS.md extension section - copilot-instructions.md: CLI 10→15 subcommands, stats 8500→9400 LOC, 189→219 learnings, added VS Code Extension marketplace line - SKILLS.md: added VS Code Extension section (marketplace publishing, VS Code API, git monitoring, info panel, chat participant, Azure DevOps) - Session 18: 6 learnings saved, session context persisted
…flow - LICENSE: AGPL-3.0 → BSL-1.1 (non-compete, converts to AGPL 2030) - README: added VS Code Extension section, PRO features table, pricing CTA - package.json: version 1.17.0, exclude test files from npm package - CHANGELOG.md: full version history for npm and extension - server: /contextengine/pricing route + static pricing page (dark theme, 3-tier) - extension v0.3.0: PRO badges clickable → pricing, CTA box in info panel - copilot-instructions: updated to v1.17.0 stats - npm published v1.17.0, marketplace published v0.3.0 - VPS deployed: pricing page live at api.compr.ch/contextengine/pricing
- pricing.html: billing toggle (monthly/annual), checkout() JS POSTs to /contextengine/create-checkout-session and redirects to Stripe checkout URL - success.html: post-checkout landing page with activation instructions - server.ts: added /contextengine/success route - VPS: ecosystem.config.cjs with STRIPE_SECRET_KEY (test key), stripeEnabled:true - copilot-instructions.md: ecosystem.config.cjs, pricing JS, success page, file transfer workaround - .gitignore: exclude *.vsix binaries - CHANGELOG.md: updated with Stripe wiring details Products/prices/webhook deferred to STRIPE-BACKEND project.
- listLearnings() and learningsToChunks() now accept projects[] param - MCP: activeProjectNames populated from loadProjectDirs() during reindex - CLI: cliListLearnings() and initEngine() scope by active project - end-session: enhanced with learnings stats, doc freshness, sessions info - 245 total -> ~234 visible per workspace (other project learnings hidden)
…pre-commit hook - Pre-commit hook: warns about stale CE docs when code files staged (never blocks) - /sync chat command: checks doc freshness per project (copilot-instructions, SKILLS, SCORE) - contextengine.sync VS Code command: Output channel report with Open Chat action - Doc staleness notifications: fires warning when code committed but CE docs not updated - GitSnapshot extended with ceDocStatus[] for per-project doc tracking - Philosophy: event-driven (hooks + scan triggers), not memory-driven
…Shell Integration API
…l watcher, /sync, doc staleness, pre-commit hook)
…tes, tech inventory, import headers
…r.ch - Post-commit hook now backgrounds pushes (no more terminal tool timeouts) - PRO badges in info panel link to https://api.compr.ch/contextengine/pricing
…elled-commit pattern
…compliance NEW: src/firewall.ts — ProtocolFirewall class - Tracks 4 obligations: learnings saved, session saved, git status, doc freshness - Wraps EVERY tool response (not just 2/17 like old nudge system) - Escalation: silent → footer → header → DEGRADED (output truncation) - At 40+ calls with score ≥50%: tool output truncated to 500 chars - Exempt tools (save_learning, save_session, end_session) pass through - Git/doc checks cached (60s/120s) to avoid hammering on every call REPLACED: old maybeNudge system (toolCallCount, sessionSaved, checkGitStatus) - Was only on search_context + list_sources (2 of 17 tools) - Had zero consequences — informational text that agents ignored - New firewall covers ALL 17 tools via respond() helper This is the first MCP server that enforces agent behavior through progressive response degradation.
…ure Helmet - Moved inline <script> from pricing.html → pricing.js (external file) - Added express.static route: /contextengine/static/ → public/ - Configured Helmet CSP: script-src 'self', style-src 'unsafe-inline', connect-src for Stripe checkout, frame-src for Stripe - Removed inline onclick handlers, replaced with addEventListener - Added Protocol Firewall to feature comparison table - Deployed to VPS: server.js + pricing.html + pricing.js - PM2 restarted, health OK, JS served at 200
- Protocol Firewall: progressive response degradation for agent compliance - README: added firewall feature (IP-safe), 17 tools with Tier column, PRO URL fix - Pricing page: updated hero text and Pro card for firewall messaging - list_sources version string updated to v1.19.0 - copilot-instructions: firewall section, CSP fix docs, critical rule 9 - SKILLS.md: Protocol Firewall section, trade secret constraint - .github/SKILLS.md: updated to v1.19.0, firewall + extension v0.4.1
…-tech explanation - Removed git-centric hero (VS Code Source Control already does this) - Protocol Firewall is now the centerpiece with plain-English explanation - 'Speed camera for your AI agent' analogy for non-tech users - Escalation flow visualization: Silent → Footer → Header → Truncated - Git status demoted to compact one-liner with 'See Source Control' hint - End-of-session protocol simplified to 4 steps, notes firewall enforces it - Updated description and version in package.json - Published to VS Code Marketplace
…ession - autoImportFromSources() scans all discovered markdown docs and extracts rules - Called during reindex() (MCP startup + file changes) and CLI end-session - Dedup built-in — safe to call repeatedly, no duplicate learnings created - Bumped to v1.19.1, published to npm
- Explicit table of what stays local vs what the server receives - Clear statement: server NEVER receives project data, code, learnings - Comparison to competitors (Copilot/Cursor send code, CE doesn't) - Extension README links to full privacy details
…rip comments (46-72% smaller)
… privacy, GitHub visibility
12 files updated: package.json, extension, CLI, score reports, server pages, skill metadata. Zero GitHub references remain. Co-Authored-By: Claude <noreply@anthropic.com>
- Add .copilot-credentials.md to .gitignore (local credentials file never committed) - Replace hardcoded SSH password in .github/copilot-instructions.md with reference to local credentials file - Update deploy.sh to use VPS_SSH_PASS env var (loaded from .env or env), SSHPASS env var + sshpass -e to avoid exposing password in process listings - Update SKILLS.md SSH examples to use SSHPASS env var pattern - Add VPS_SSH_PASS to .env.example with documentation Co-authored-by: FASTPROD <8733681+FASTPROD@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review recent changes to projects and documentation
security: remove hardcoded VPS SSH credentials from committed files
Feb 24, 2026
fd34794 to
263746f
Compare
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.
SSH password was hardcoded in plain text across four committed files (
.github/copilot-instructions.md,SKILLS.md,deploy.sh). This replaces it with an environment-variable-based pattern and gitignores the intended local credentials file.Changes
.gitignore— adds.copilot-credentials.mdto prevent the local credentials file from ever being committed.github/copilot-instructions.md— replaces hardcoded SSH command with a reference to.copilot-credentials.mdin both the Infrastructure section and Critical Rules #10deploy.sh— loadsVPS_SSH_PASSfrom.envor the shell environment; usesSSHPASSenv var +sshpass -eto avoid password exposure in process listings (ps aux); fails fast with a clear error if unsetSKILLS.md— updates SSH deployment examples to match the new pattern.env.example— documents theVPS_SSH_PASSvariableOriginal prompt
continue
[Chronological Review: The conversation began with the user requesting a check on recent changes made to their projects, specifically regarding the creation of a credentials file and updates to documentation. The user then inquired about the usefulness of the Context Engine and MCP server, followed by questions about the options available when selecting CLOUD. The user expressed a desire to commit changes and delegate tasks to a cloud agent, and finally asked if the agent was actively working.][Intent Mapping:
[Technical Inventory:
[Code Archaeology:
[Progress Assessment:
[Context Validation: All critical information regarding recent changes, user inquiries, and the current state of the project is captured.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: - "check what was done and apply to your projects!" - Verify recent changes. - "does the Context engine or the MCP server is getting useful?" - Assess the utility of systems. - "when I set CLOUD I only see Agent, Ask or plan, no more llm choice like 4.6!" - Clarify options in CLOUD settings. - "Commit Changes and Delegate: 'Delegate to cloud agent'" - Commit changes and delegate tasks. - "are you working?" - Check on agent's activity. - Session Context: The conversation flowed from checking recent project updates to inquiries about system functionality and committing changes. - User Intent Evolution: The user transitioned from verifying changes to seeking clarity on system options and delegating tasks.- Technical Foundation:
- Git: Version control system used for managing project files.
- Cloud Agent: Functionality for delegating tasks to a cloud-based system.
- Context Engine: A system the user is evaluating for its usefulness.
- Codebase Status:
- .copilot-credentials.md:
- Purpose: Store sensitive information securely.
- Current State: Newly created.
- Key Code Segments: Contains SSH passwords, MySQL root password, and deployment commands.
- Dependencies: Related to copilot-instructions.md for referencing credentials.
- copilot-instructions.md:
- Purpose: Document architecture and rules.
- Current State: Updated to reference .copilot-credentials.md.
- Key Code Segments: Lines updated to indicate where credentials are stored.
- CLAUDE.md:
- Purpose: Quick reference to credentials.
- Current State: Updated to include references to .copilot-credentials.md.
- Problem Resolution:
- Issues Encountered: User confusion regarding the options available in the CLOUD setting.
- Solutions Implemented: Updates made to documentation to clarify usage.
- Debugging Context: Ongoing inquiries about system functionality.
- Lessons Learned: Importance of clear documentation for user guidance.
- Progress Tracking:
- Completed Tasks: Creation of .copilot-credentials.md and updates to related documentation.
- Partially Complete Work: User's inquiry about cloud agent functionality and task delegation.
- Validated Outcomes: Changes confirmed as committed and documented.
- Active Work State:
- Current Focus: User was wo...
Created from VS Code.
💡 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.