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/src/Security/ShowcaseAccess.phpPHP
<?php
namespace YougitAI\SecureShowcase\Security;
final class ShowcaseAccess {
public function is_allowed( array $repository ): bool {
if ( (string) ( $repository['status'] ?? '' ) !== 'published' || empty( $repository['active_snapshot_id'] ) ) {
return false;
}
$mode = (string) ( $repository['access_mode'] ?? 'public' );
if ( $mode === 'public' ) {
return true;
}
if ( current_user_can( 'manage_options' ) ) {
return true;
}
if ( $mode === 'private' ) {
return false;
}
if ( $mode !== 'password' || empty( $repository['access_password_hash'] ) ) {
return false;
}
$cookie = isset( $_COOKIE[ $this->cookie_name( (int) $repository['id'] ) ] ) ? sanitize_text_field( wp_unslash( $_COOKIE[ $this->cookie_name( (int) $repository['id'] ) ] ) ) : '';
return $cookie !== '' && hash_equals( $this->cookie_value( $repository ), $cookie );
}
public function maybe_authenticate( array $repository ): bool {
if ( (string) ( $repository['access_mode'] ?? 'public' ) !== 'password' || empty( $repository['access_password_hash'] ) ) {
return false;
}
if ( strtoupper( (string) ( $_SERVER['REQUEST_METHOD'] ?? 'GET' ) ) !== 'POST' || empty( $_POST['yougitai_showcase_password_submit'] ) ) {
return false;
}
$nonce = isset( $_POST['yougitai_showcase_password_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['yougitai_showcase_password_nonce'] ) ) : '';
if ( ! wp_verify_nonce( $nonce, 'yougitai_showcase_password_' . (int) $repository['id'] ) ) {
return false;
}
$password = isset( $_POST['yougitai_showcase_password'] ) ? (string) wp_unslash( $_POST['yougitai_showcase_password'] ) : '';
if ( ! wp_check_password( $password, (string) $repository['access_password_hash'] ) ) {
return false;
}
setcookie( $this->cookie_name( (int) $repository['id'] ), $this->cookie_value( $repository ), [
'expires' => time() + DAY_IN_SECONDS,
'path' => COOKIEPATH ?: '/',
'domain' => COOKIE_DOMAIN ?: '',
'secure' => is_ssl(),
'httponly' => true,
'samesite' => 'Lax',
] );
$_COOKIE[ $this->cookie_name( (int) $repository['id'] ) ] = $this->cookie_value( $repository );
return true;
}
public function password_form( array $repository, bool $failed = false ): string {
ob_start(); ?>
<div class="yougitai-access-gate">
<h2><?php esc_html_e( 'Password-protected showcase', 'yougitai-secure-showcase' ); ?></h2>
<p><?php esc_html_e( 'Enter the showcase password to continue.', 'yougitai-secure-showcase' ); ?></p>
<?php if ( $failed ) : ?><div class="yougitai-notice"><?php esc_html_e( 'The password was not accepted.', 'yougitai-secure-showcase' ); ?></div><?php endif; ?>
<form method="post">
<input type="hidden" name="yougitai_showcase_password_submit" value="1">
<input type="hidden" name="yougitai_showcase_password_nonce" value="<?php echo esc_attr( wp_create_nonce( 'yougitai_showcase_password_' . (int) $repository['id'] ) ); ?>">
<label><span class="screen-reader-text"><?php esc_html_e( 'Password', 'yougitai-secure-showcase' ); ?></span><input type="password" name="yougitai_showcase_password" autocomplete="current-password" required></label>
<button type="submit" class="yougitai-button"><?php esc_html_e( 'Open showcase', 'yougitai-secure-showcase' ); ?></button>
</form>
</div>
<?php return (string) ob_get_clean();
}
private function cookie_name( int $repository_id ): string {
return 'yougitai_showcase_' . $repository_id;
}
private function cookie_value( array $repository ): string {
return hash_hmac( 'sha256', (int) $repository['id'] . '|' . (string) $repository['access_password_hash'], wp_salt( 'auth' ) );
}
}

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%