feat: implement Ghaymah CLI Pre-Deployment Scanner and add associated audit and integration documentation

هذا الالتزام موجود في:
2026-08-23 18:39:08 +03:00
الأصل e823358715
التزام 21e1f1ea51
8 ملفات معدلة مع 2586 إضافات و48 حذوفات

عرض الملف

@@ -622,6 +622,29 @@ The comprehensive audit reports with detailed technical analysis, risk ratings,
<br/>
---
<div align="center">
<h2>🛡️ Pre-Deployment Security Scanner</h2>
<p><b>Client-Side "Shift-Left" Protection against DoS & Artifact Leakage</b></p>
</div>
As a proactive security enhancement, this repository now includes a standalone, production-ready Pre-Deployment Security Scanner. This scanner is designed to execute locally *before* the Ghaymah CLI packages and uploads deployment artifacts.
### Overview
- **Location:** [`PreDeployScanner/`](PreDeployScanner/)
- **Core Engine:** [`gy-scanner.go`](PreDeployScanner/src/gy-scanner.go) / [`gy-scanner.py`](PreDeployScanner/src/gy-scanner.py)
- **QA Automation:** [`test_scanner.sh`](PreDeployScanner/tests/test_scanner.sh) (16 exhaustive scenarios covering symlink attacks, DoS hangs, and path traversals)
### Capabilities
1. **Dockerfile Linting:** Detects wildcard `COPY`, `chmod 777`, hardcoded secrets, remote `ADD` URLs, and root user execution.
2. **Configuration Poisoning Prevention:** Analyzes `.gy.json` and `.env` files for unclosed quotes, control characters, shell substitutions (`$(...)`), and payload size limits to prevent backend Regex DoS and command injection.
3. **Leakage Prevention:** Cross-references `COPY` statements with `.dockerignore` coverage to prevent accidental exfiltration of `.env` or `.git` directories.
For complete integration instructions and the QA Audit report, please refer to the documentation inside `PreDeployScanner/docs/`.
<br/>
<img src="https://img.shields.io/badge/Crafted_with-Precision_&_Purpose-0D1117?style=for-the-badge&logo=shield&logoColor=FF4444" />
<br/><br/>