Files
mokoplatform/templates/security
Jonathan Miller b73c1eba25
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Generic: Project CI / Tests (pull_request) Has been cancelled
Platform: mokoplatform CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: mokoplatform CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: mokoplatform CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: mokoplatform CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: mokoplatform CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: mokoplatform CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: mokoplatform CI / CI Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
RC Revert / Rename rc/ back to dev/ (pull_request) Has been cancelled
Universal: Security Audit / Dependency Audit (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Project CI / Lint & Validate (pull_request) Has been cancelled
Platform: mokoplatform CI / Gate 1: Code Quality (pull_request) Has been cancelled
feat: add manifest_detect.php CLI tool for auto-detecting manifest fields
Scans source files to detect platform, name, version, element_name,
package_type, language, entry_point, description, and license_spdx.
Supports Joomla, Dolibarr, Go, MCP/Node, and generic platforms.

Includes --diff and --update modes for comparing against and pushing
to the Gitea manifest API. Warns on missing core fields.

Also removes deprecated mcp/servers/mokowaas_api (consolidated to
separate repo) and syncs dev branch changes.
2026-06-07 15:37:24 -05:00
..

Security Templates

This directory contains security-related templates for mokoplatform repositories.

index.html - Directory Listing Prevention (Static)

Purpose: Prevents directory listing on static web servers for security purposes.

Usage: Copy this file to all src/ directories and their subdirectories in organization repositories.

# Copy to src directory and all subdirectories
find src -type d -exec cp templates/security/index.html {} \;

Policy: All organization repositories must include an index.html redirect file in:

  • src/ directory (if it exists)
  • All subdirectories under src/

Security Rationale:

  • Prevents web servers from exposing directory contents
  • Redirects users to the repository root
  • Uses noindex, nofollow meta tags to prevent search engine indexing
  • Provides immediate redirect via both meta refresh and JavaScript

Template Features:

  • Redirects to / (repository root)
  • Minimal, clean design
  • Works with and without JavaScript
  • SEO-safe with noindex directive

index.php - Directory Listing Prevention (PHP)

Purpose: Prevents directory listing on PHP-enabled web servers for security purposes.

Usage: Copy this file to all src/ directories and their subdirectories in PHP-based organization repositories.

# Copy to src directory and all subdirectories
find src -type d -exec cp templates/security/index.php {} \;

Policy: All PHP-based organization repositories must include an index.php redirect file in:

  • src/ directory (if it exists)
  • All subdirectories under src/

Security Rationale:

  • Provides server-side redirect before any HTML is rendered
  • Prevents web servers from exposing directory contents
  • Includes HTTP header redirect for immediate response
  • Falls back to HTML/JavaScript redirect if needed
  • Works with PHP-enabled web servers

Template Features:

  • PHP header redirect (highest priority)
  • HTML meta refresh fallback
  • JavaScript redirect fallback
  • noindex, nofollow meta tags
  • GPL-3.0-or-later licensed
  • Proper PHP security headers

Usage Recommendation

For PHP projects (e.g., Dolibarr/MokoCRM):

  • Use both index.php and index.html
  • PHP will take precedence when available
  • HTML provides fallback for static serving

For non-PHP projects (e.g., Node.js, static sites):

  • Use index.html only

Copy both files:

# Copy both security templates to all src subdirectories
find src -type d -exec sh -c 'cp templates/security/index.html "$1" && cp templates/security/index.php "$1"' _ {} \;