glanzlicht / YouGit-AI

AI-assisted secure code showcases for WordPress — scan, redact and publish GitHub repositories without exposing sensitive IP.

Verified secure showcase
62 Files 855 KB Public size 0 Redacted PHP · Markdown · CSS · JavaScript · PO · YAML

Project overview

YouGit-AI is a verified code showcase with 62 visible project entries across 3 top-level modules. The primary detected language is PHP; protected files remain visible in the structure while their contents stay private.

README

YouGitAI Secure Showcase

AI-assisted secure code showcases for WordPress — scan, redact and publish GitHub repositories without exposing sensitive IP.

YouGitAI Secure Showcase is a WordPress plugin that turns public or private GitHub repositories into employer-friendly portfolio showcases. It combines deterministic secret detection, AI-assisted IP review, manual protection rules, versioned public snapshots and a constrained ChatGPT/MCP review workflow.

The goal is simple: show what you built without turning your portfolio into a blueprint for cloning it.

Highlights

  • GitHub OAuth support for public and private repositories
  • deterministic secret scanning
  • AI-assisted portfolio/IP review
  • manual path, string, regex and symbol-oriented protection rules
  • protected files and folders remain visible as architectural context without exposing their contents
  • visible inline redaction markers in public code views
  • versioned draft/public snapshots
  • human-controlled publication workflow
  • ChatGPT/MCP integration with OAuth
  • OpenAI, Anthropic Claude and Google Gemini support
  • standalone WordPress frontend
  • native Elementor integration
  • German and English localization

Portfolio-aware protection

YouGitAI is designed to distinguish between useful technical evidence and material that should not be public.

Typical review classes include:

ClassTypical handling
Safe portfolio signalShow
Internal schemaAbstract / redact
Private endpointRedact
AI promptRedact / protect
Security implementationAbstract / protect
Proprietary business logicAbstract / protect
Core/reconstructable IPProtect
Secret / credentialRemove

Safe publication model

  1. Import repository content for private review
  2. Detect potential risks
  3. Review scanner/AI suggestions
  4. Approve protection rules
  5. Apply protection to a draft showcase
  6. Verify the resulting snapshot
  7. Publish only after explicit human approval

Sync is not publish. AI review is not publish.

AI/MCP clients do not receive direct publish or restore capabilities.

Protected structure

Files or folders that must not be public can remain visible in the repository tree as protected entries. Visitors can understand that a component exists and where it belongs while the protected source itself is never served publicly.

ChatGPT / MCP

YouGitAI exposes a constrained MCP interface for authorized repository review. It supports repository discovery, paginated tree inspection, selective source review, security findings and protection proposals. Publication remains under WordPress administrator control.

WordPress / Elementor

The plugin works standalone and also provides Elementor widgets.

Typical public routes:

/repositories/
/repositories/{repository-slug}/

Security

The plugin is designed around a strict separation between original repository material and public showcase snapshots. Repository contents are treated as untrusted input, publication requires explicit human approval, and protected content is not returned through the public showcase API.

See [SECURITY.md](yougitai-secure-showcase/SECURITY.md).

Installation

  1. Download or build the plugin directory yougitai-secure-showcase.
  2. Upload it to /wp-content/plugins/ or install the release ZIP in WordPress.
  3. Activate YouGitAI Secure Showcase.
  4. Configure GitHub access and optional AI providers in the WordPress admin.
  5. Import a repository, review protection suggestions and publish an approved showcase snapshot.

Development status

YouGitAI is under active development. This repository contains the actual plugin source. Credentials, API keys and site-specific configuration are intentionally not included and are configured at runtime in WordPress.

Tech

WordPress · PHP · JavaScript · GitHub OAuth · REST · MCP · OAuth 2.0 / PKCE · Elementor · OpenAI · Claude · Gemini

Author

Built by Sascha Haselhuhn / glanzlicht.

Public showcase: https://sascha-haselhuhn.com/repositories/

yougitai-secure-showcase/SECURITY.mdMarkdown
# Security architecture
YougitAI Secure Showcase is designed around a publication boundary, not around runtime masking.
## Core invariant
Original repository content must never be served to public visitors. During imports, source files are fetched into memory, scanned, optionally reviewed by an explicitly enabled AI provider, redacted, and then discarded. Only sanitized public-snapshot content may be persisted in the showcase file table.
Known-sensitive paths such as environment files, credential stores, private keys and certificate files are fail-closed before source content is fetched whenever possible. Hidden files persist only metadata and an empty content field.
## Publication gate
A snapshot moves through import, findings review, approval, deterministic final verification and publication. The final verifier scans the stored public snapshot again and blocks publication if it detects a remaining secret or an unresolved critical-risk public file. A verification hash is stored for successfully published snapshots.
## AI privacy
External AI processing is disabled by default. Enabling it means selected source files can be sent to the configured provider before the source is discarded. Repository content is treated as untrusted data and the AI system instruction explicitly rejects instructions embedded in source code, comments, README text, strings and filenames.
## WordPress boundary
Public rendering reads only the active published snapshot. Elementor, Elementor Pro, shortcodes and standalone routes all use the same public renderer and therefore the same sanitized data source.
## Credential storage
GitHub access tokens, webhook secrets and newly saved AI API keys are encrypted at rest with authenticated encryption derived from WordPress installation salts. Existing plaintext AI keys from earlier plugin builds are migrated during the 0.3 upgrade when encryption is available. Secrets are never returned by public REST endpoints.
## GitHub webhooks
Repository webhooks require an HMAC SHA-256 signature (`X-Hub-Signature-256`). Only push events for the configured repository and default branch are accepted for synchronization. Valid pushes queue a secure import job; they never approve or publish a snapshot.
## Persistent line redaction
Visual line-range rules store a fingerprint of the selected sanitized segment. On a later import, a missing, shifted or changed segment is treated as a protection failure. The file is hidden completely and a critical finding is created rather than risking exposure.
## Connected AI boundary
Version 0.6.0 adds a direct Connected AI interface intended for compatible MCP/JSON-RPC clients. It is designed around a strict capability boundary:
- Connection tokens are random, time-limited, revocable, and only their SHA-256 hashes are stored.
- No connected-AI tool can publish or restore a public snapshot.
- Source files are fetched from GitHub just in time and are not persisted by the connection layer.
- Known credential paths are denied before retrieval.
- The deterministic secret scanner masks detected credentials before source content is returned to the client.
- AI-created redaction rules are disabled proposals until a WordPress administrator explicitly approves them.
- Every source read and write-like proposal action is audit logged.
This layer does not weaken the existing publication boundary: only a verified public snapshot can become visitor-visible.
## Repository-scoped DIRECT connections
Version 0.7.0 narrows Connected AI access further. Each temporary token can be limited to an explicit repository allowlist. Allowing every current and future repository is a separate opt-in choice. Repository checks are enforced server-side before tree, source, findings, proposal, or snapshot operations run.
Each connected-AI token also has a cumulative source-review budget (5 MiB by default, filterable with `yougitai_ss_connected_ai_source_budget`). When the budget is exhausted, additional source reads fail closed. Metadata tools remain available so a session can report its state without receiving more source. This reduces the blast radius of a leaked temporary token and encourages short, purpose-specific review sessions.
## OAuth and scheduled synchronization
GitHub OAuth uses a short-lived state value tied to the current WordPress administrator and validates it before exchanging an authorization code. OAuth client secrets and resulting GitHub access tokens are encrypted with the same site-bound secret vault as other credentials. Hourly, daily, webhook, and manual synchronization paths all terminate at a draft snapshot; none can cross the human publication gate automatically.
## Showcase derivation
Portfolio metadata, detected technology stack, README preview, language distribution and architecture hints are derived only from already-sanitized public snapshot rows. The showcase-analysis layer never reads the original repository directly and therefore cannot bypass redaction rules or the final verification boundary.
## Uninstall behavior
Plugin data is preserved by default to avoid accidental destructive removal. Full deletion must be explicitly enabled in settings before uninstall. When enabled, uninstall removes YougitAI tables, stored credentials/settings and scheduled synchronization hooks.
## ChatGPT OAuth authorization
Version 1.0.9 makes OAuth the primary ChatGPT DIRECT authentication path. The MCP endpoint returns HTTP 401 with a Protected Resource Metadata pointer when no valid access token is present. The site publishes OAuth discovery metadata, supports dynamic registration of public clients, requires Authorization Code flow with PKCE S256, and issues short-lived access tokens plus rotating refresh tokens.
Authorization is performed in the browser by a logged-in WordPress administrator. The administrator must explicitly select one or more repositories; the resulting OAuth token is restricted to those repository IDs and the fixed DIRECT scopes. OAuth never grants a publish or restore capability. Authorization codes are single-use and short-lived, access/refresh tokens are stored only as SHA-256 hashes, token responses are no-store, and connections can be revoked from WordPress at any time.

Architecture

High-level modules detected from the verified public snapshot. Protected implementation details are intentionally omitted.

yougitai-secure-showcasemodule
.githubmodule
.vscodemodule

Technology stack

PHPPOPOTCSSMarkdownJavaScript
PHP52.5%
PO26.8%
POT8.2%
CSS6.3%
Markdown4.0%
JavaScript1.4%
TXT0.5%
YAML0.1%