# SemBicho CLI
🔒 **Static Application Security Testing Tool** - Herramienta de línea de comandos para análisis estático de seguridad
## 🚀 Instalación
### Desde el código fuente
```bash
cd sembicho-cli
pip install -r requirements.txt
python main.py --help
```
### Como paquete instalable
```bash
cd sembicho-cli
pip install .
sembicho --help
```
### Con Docker
```bash
docker build -t sembicho-cli .
docker run --rm -v $(pwd):/workspace sembicho-cli scan --path /workspace
```
## 📖 Uso
### Comandos básicos
```bash
# Escaneo básico del directorio actual
sembicho scan --path .
# Escaneo con reporte JSON
sembicho scan --path ./mi-proyecto --output reporte.json --format json
# Escaneo con reporte HTML
sembicho scan --path ./mi-proyecto --output reporte.html --format html
# Modo CI/CD
sembicho scan --path . --ci-mode --fail-on critical,high
```
### Integración con Backend
```bash
# Enviar resultados al backend
sembicho scan --path . --api-url http://localhost:8000/api/results --token abc123
# Con configuración
sembicho config --init
# Editar .sembicho.json con tu configuración
sembicho scan --path .
```
### Filtros y opciones avanzadas
```bash
# Filtrar por severidad
sembicho scan --path . --severity high
# Modo verbose
sembicho scan --path . --verbose
# Herramientas específicas
sembicho scan --path . --tools bandit,semgrep
# Fallar en CI con vulnerabilidades críticas
sembicho scan --path . --ci-mode --fail-on critical
```
## 🛠️ Herramientas Integradas
- **Bandit**: Análisis de seguridad para Python
- **ESLint**: Análisis de JavaScript/TypeScript
- **Semgrep**: Análisis multi-lenguaje con reglas OWASP
## 📊 Formatos de Salida
### JSON
```bash
sembicho scan --path . --format json --output results.json
```
Estructura del JSON:
```json
{
"project_name": "mi-proyecto",
"scan_date": "2024-01-15T10:30:00Z",
"language": "python",
"total_vulnerabilities": 5,
"severity_counts": {
"critical": 1,
"high": 2,
"medium": 2,
"low": 0
},
"tools_used": ["bandit", "semgrep"],
"vulnerabilities": [
{
"file": "app/auth.py",
"line": 25,
"rule_id": "B101",
"severity": "high",
"message": "Hardcoded password detected",
"cwe": "CWE-798",
"tool": "bandit"
}
]
}
```
### HTML
```bash
sembicho scan --path . --format html --output report.html
```
Genera un reporte HTML completo con:
- Resumen ejecutivo con métricas
- Lista detallada de vulnerabilidades
- Filtros por severidad
- Información de herramientas utilizadas
### Console
```bash
sembicho scan --path .
```
Salida de consola con colores y formato legible.
## ⚙️ Configuración
### Crear configuración inicial
```bash
sembicho config --init
```
Esto crea un archivo `.sembicho.json`:
```json
{
"api_url": "http://localhost:8000/api/results",
"token": "",
"default_format": "console",
"fail_on": ["critical", "high"],
"tools": ["bandit", "eslint", "semgrep"],
"exclude_patterns": [
"*.min.js",
"node_modules/*",
".git/*",
"__pycache__/*"
]
}
```
### Ver configuración actual
```bash
sembicho config --show
```
## 🔧 Integración CI/CD
### GitHub Actions
```yaml
- name: Security Scan
run: |
pip install -r sembicho-cli/requirements.txt
python sembicho-cli/main.py scan --path . --ci-mode --fail-on critical,high
```
### GitLab CI
```yaml
security_scan:
script:
- cd sembicho-cli
- pip install -r requirements.txt
- python main.py scan --path .. --ci-mode --fail-on critical,high
```
### Jenkins
```groovy
stage('Security Scan') {
steps {
sh '''
cd sembicho-cli
pip install -r requirements.txt
python main.py scan --path .. --ci-mode --fail-on critical,high
'''
}
}
```
## 🐳 Docker
### Dockerfile incluido
El proyecto incluye un Dockerfile optimizado para análisis de seguridad.
```bash
# Construir imagen
docker build -t sembicho-cli .
# Ejecutar escaneo
docker run --rm -v $(pwd):/workspace sembicho-cli scan --path /workspace
# Con configuración personalizada
docker run --rm -v $(pwd):/workspace -v $(pwd)/.sembicho.json:/app/.sembicho.json sembicho-cli scan --path /workspace
```
## 📝 Códigos de Salida
- `0`: Escaneo exitoso sin errores críticos
- `1`: Error en argumentos o ejecución
- `1`: Vulnerabilidades encontradas (cuando se usa `--fail-on`)
## 🔍 Lenguajes Soportados
- **Python** (.py) - Bandit, Semgrep
- **JavaScript/TypeScript** (.js, .ts, .jsx, .tsx) - ESLint, Semgrep
- **Java** (.java) - Semgrep
- **PHP** (.php) - Semgrep
- **Go** (.go) - Semgrep
- **C/C++** (.c, .cpp) - Semgrep
- **Ruby** (.rb) - Semgrep
- **C#** (.cs) - Semgrep
## 🤝 Contribución
1. Fork el proyecto
2. Crea una rama para tu feature (`git checkout -b feature/nueva-funcionalidad`)
3. Commit tus cambios (`git commit -am 'Agregar nueva funcionalidad'`)
4. Push a la rama (`git push origin feature/nueva-funcionalidad`)
5. Abre un Pull Request
## 📄 Licencia
MIT License - ver [LICENSE](../LICENSE) para detalles.
## 🆘 Soporte
- 📧 Email: support@sembicho.com
- 🐛 Issues: [GitHub Issues](https://github.com/sembicho/sembicho-cli/issues)
- 📖 Documentación: [Docs](https://docs.sembicho.com)
Raw data
{
"_id": null,
"home_page": "https://github.com/sembicho/sembicho-cli",
"name": "sembicho-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "security, static-analysis, vulnerability-scanner, code-analysis, security-testing, devops, ci-cd, python, javascript, java, php, go, csharp, sast, security-scanner, vulnerability-detection",
"author": "SemBicho Team",
"author_email": "info@sembicho.com",
"download_url": "https://files.pythonhosted.org/packages/12/14/add0388b704a2df17c1f026c8c2e0091c2cd367063c81e4ad6d16d546a83/sembicho_cli-2.0.2.tar.gz",
"platform": null,
"description": "# SemBicho CLI\r\n\r\n\ud83d\udd12 **Static Application Security Testing Tool** - Herramienta de l\u00ednea de comandos para an\u00e1lisis est\u00e1tico de seguridad\r\n\r\n## \ud83d\ude80 Instalaci\u00f3n\r\n\r\n### Desde el c\u00f3digo fuente\r\n\r\n```bash\r\ncd sembicho-cli\r\npip install -r requirements.txt\r\npython main.py --help\r\n```\r\n\r\n### Como paquete instalable\r\n\r\n```bash\r\ncd sembicho-cli\r\npip install .\r\nsembicho --help\r\n```\r\n\r\n### Con Docker\r\n\r\n```bash\r\ndocker build -t sembicho-cli .\r\ndocker run --rm -v $(pwd):/workspace sembicho-cli scan --path /workspace\r\n```\r\n\r\n## \ud83d\udcd6 Uso\r\n\r\n### Comandos b\u00e1sicos\r\n\r\n```bash\r\n# Escaneo b\u00e1sico del directorio actual\r\nsembicho scan --path .\r\n\r\n# Escaneo con reporte JSON\r\nsembicho scan --path ./mi-proyecto --output reporte.json --format json\r\n\r\n# Escaneo con reporte HTML\r\nsembicho scan --path ./mi-proyecto --output reporte.html --format html\r\n\r\n# Modo CI/CD\r\nsembicho scan --path . --ci-mode --fail-on critical,high\r\n```\r\n\r\n### Integraci\u00f3n con Backend\r\n\r\n```bash\r\n# Enviar resultados al backend\r\nsembicho scan --path . --api-url http://localhost:8000/api/results --token abc123\r\n\r\n# Con configuraci\u00f3n\r\nsembicho config --init\r\n# Editar .sembicho.json con tu configuraci\u00f3n\r\nsembicho scan --path .\r\n```\r\n\r\n### Filtros y opciones avanzadas\r\n\r\n```bash\r\n# Filtrar por severidad\r\nsembicho scan --path . --severity high\r\n\r\n# Modo verbose\r\nsembicho scan --path . --verbose\r\n\r\n# Herramientas espec\u00edficas\r\nsembicho scan --path . --tools bandit,semgrep\r\n\r\n# Fallar en CI con vulnerabilidades cr\u00edticas\r\nsembicho scan --path . --ci-mode --fail-on critical\r\n```\r\n\r\n## \ud83d\udee0\ufe0f Herramientas Integradas\r\n\r\n- **Bandit**: An\u00e1lisis de seguridad para Python\r\n- **ESLint**: An\u00e1lisis de JavaScript/TypeScript \r\n- **Semgrep**: An\u00e1lisis multi-lenguaje con reglas OWASP\r\n\r\n## \ud83d\udcca Formatos de Salida\r\n\r\n### JSON\r\n```bash\r\nsembicho scan --path . --format json --output results.json\r\n```\r\n\r\nEstructura del JSON:\r\n```json\r\n{\r\n \"project_name\": \"mi-proyecto\",\r\n \"scan_date\": \"2024-01-15T10:30:00Z\",\r\n \"language\": \"python\",\r\n \"total_vulnerabilities\": 5,\r\n \"severity_counts\": {\r\n \"critical\": 1,\r\n \"high\": 2,\r\n \"medium\": 2,\r\n \"low\": 0\r\n },\r\n \"tools_used\": [\"bandit\", \"semgrep\"],\r\n \"vulnerabilities\": [\r\n {\r\n \"file\": \"app/auth.py\",\r\n \"line\": 25,\r\n \"rule_id\": \"B101\",\r\n \"severity\": \"high\",\r\n \"message\": \"Hardcoded password detected\",\r\n \"cwe\": \"CWE-798\",\r\n \"tool\": \"bandit\"\r\n }\r\n ]\r\n}\r\n```\r\n\r\n### HTML\r\n```bash\r\nsembicho scan --path . --format html --output report.html\r\n```\r\n\r\nGenera un reporte HTML completo con:\r\n- Resumen ejecutivo con m\u00e9tricas\r\n- Lista detallada de vulnerabilidades\r\n- Filtros por severidad\r\n- Informaci\u00f3n de herramientas utilizadas\r\n\r\n### Console\r\n```bash\r\nsembicho scan --path .\r\n```\r\n\r\nSalida de consola con colores y formato legible.\r\n\r\n## \u2699\ufe0f Configuraci\u00f3n\r\n\r\n### Crear configuraci\u00f3n inicial\r\n```bash\r\nsembicho config --init\r\n```\r\n\r\nEsto crea un archivo `.sembicho.json`:\r\n```json\r\n{\r\n \"api_url\": \"http://localhost:8000/api/results\",\r\n \"token\": \"\",\r\n \"default_format\": \"console\",\r\n \"fail_on\": [\"critical\", \"high\"],\r\n \"tools\": [\"bandit\", \"eslint\", \"semgrep\"],\r\n \"exclude_patterns\": [\r\n \"*.min.js\",\r\n \"node_modules/*\",\r\n \".git/*\",\r\n \"__pycache__/*\"\r\n ]\r\n}\r\n```\r\n\r\n### Ver configuraci\u00f3n actual\r\n```bash\r\nsembicho config --show\r\n```\r\n\r\n## \ud83d\udd27 Integraci\u00f3n CI/CD\r\n\r\n### GitHub Actions\r\n```yaml\r\n- name: Security Scan\r\n run: |\r\n pip install -r sembicho-cli/requirements.txt\r\n python sembicho-cli/main.py scan --path . --ci-mode --fail-on critical,high\r\n```\r\n\r\n### GitLab CI\r\n```yaml\r\nsecurity_scan:\r\n script:\r\n - cd sembicho-cli\r\n - pip install -r requirements.txt\r\n - python main.py scan --path .. --ci-mode --fail-on critical,high\r\n```\r\n\r\n### Jenkins\r\n```groovy\r\nstage('Security Scan') {\r\n steps {\r\n sh '''\r\n cd sembicho-cli\r\n pip install -r requirements.txt\r\n python main.py scan --path .. --ci-mode --fail-on critical,high\r\n '''\r\n }\r\n}\r\n```\r\n\r\n## \ud83d\udc33 Docker\r\n\r\n### Dockerfile incluido\r\nEl proyecto incluye un Dockerfile optimizado para an\u00e1lisis de seguridad.\r\n\r\n```bash\r\n# Construir imagen\r\ndocker build -t sembicho-cli .\r\n\r\n# Ejecutar escaneo\r\ndocker run --rm -v $(pwd):/workspace sembicho-cli scan --path /workspace\r\n\r\n# Con configuraci\u00f3n personalizada\r\ndocker run --rm -v $(pwd):/workspace -v $(pwd)/.sembicho.json:/app/.sembicho.json sembicho-cli scan --path /workspace\r\n```\r\n\r\n## \ud83d\udcdd C\u00f3digos de Salida\r\n\r\n- `0`: Escaneo exitoso sin errores cr\u00edticos\r\n- `1`: Error en argumentos o ejecuci\u00f3n \r\n- `1`: Vulnerabilidades encontradas (cuando se usa `--fail-on`)\r\n\r\n## \ud83d\udd0d Lenguajes Soportados\r\n\r\n- **Python** (.py) - Bandit, Semgrep\r\n- **JavaScript/TypeScript** (.js, .ts, .jsx, .tsx) - ESLint, Semgrep\r\n- **Java** (.java) - Semgrep\r\n- **PHP** (.php) - Semgrep\r\n- **Go** (.go) - Semgrep\r\n- **C/C++** (.c, .cpp) - Semgrep\r\n- **Ruby** (.rb) - Semgrep\r\n- **C#** (.cs) - Semgrep\r\n\r\n## \ud83e\udd1d Contribuci\u00f3n\r\n\r\n1. Fork el proyecto\r\n2. Crea una rama para tu feature (`git checkout -b feature/nueva-funcionalidad`)\r\n3. Commit tus cambios (`git commit -am 'Agregar nueva funcionalidad'`)\r\n4. Push a la rama (`git push origin feature/nueva-funcionalidad`)\r\n5. Abre un Pull Request\r\n\r\n## \ud83d\udcc4 Licencia\r\n\r\nMIT License - ver [LICENSE](../LICENSE) para detalles.\r\n\r\n## \ud83c\udd98 Soporte\r\n\r\n- \ud83d\udce7 Email: support@sembicho.com\r\n- \ud83d\udc1b Issues: [GitHub Issues](https://github.com/sembicho/sembicho-cli/issues)\r\n- \ud83d\udcd6 Documentaci\u00f3n: [Docs](https://docs.sembicho.com)\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Herramienta autocontenida de an\u00e1lisis est\u00e1tico de seguridad para m\u00faltiples lenguajes",
"version": "2.0.2",
"project_urls": {
"Bug Tracker": "https://github.com/sembicho/sembicho-cli/issues",
"Documentation": "https://docs.sembicho.com",
"Homepage": "https://github.com/sembicho/sembicho-cli",
"Source Code": "https://github.com/sembicho/sembicho-cli"
},
"split_keywords": [
"security",
" static-analysis",
" vulnerability-scanner",
" code-analysis",
" security-testing",
" devops",
" ci-cd",
" python",
" javascript",
" java",
" php",
" go",
" csharp",
" sast",
" security-scanner",
" vulnerability-detection"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "402d41bccfab28f6f27cb5101cc2cb14c4ee5c656be9c4aca9a015e0e1e7bdeb",
"md5": "2022291630a1fb4d60a304d2daebf52e",
"sha256": "0e853382ea6f2a4ef97f75ac4663d717d0e67f714477f4902a975f022386c5f7"
},
"downloads": -1,
"filename": "sembicho_cli-2.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2022291630a1fb4d60a304d2daebf52e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 39796,
"upload_time": "2025-11-02T03:44:45",
"upload_time_iso_8601": "2025-11-02T03:44:45.940191Z",
"url": "https://files.pythonhosted.org/packages/40/2d/41bccfab28f6f27cb5101cc2cb14c4ee5c656be9c4aca9a015e0e1e7bdeb/sembicho_cli-2.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1214add0388b704a2df17c1f026c8c2e0091c2cd367063c81e4ad6d16d546a83",
"md5": "2073bd7a8ea77b23fdd78be57d06d92c",
"sha256": "b9ed8967eea470b67ee62cebee34295a70b2f0981a42c37b0d3e51e6bbd29e52"
},
"downloads": -1,
"filename": "sembicho_cli-2.0.2.tar.gz",
"has_sig": false,
"md5_digest": "2073bd7a8ea77b23fdd78be57d06d92c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 52630,
"upload_time": "2025-11-02T03:44:47",
"upload_time_iso_8601": "2025-11-02T03:44:47.551327Z",
"url": "https://files.pythonhosted.org/packages/12/14/add0388b704a2df17c1f026c8c2e0091c2cd367063c81e4ad6d16d546a83/sembicho_cli-2.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-11-02 03:44:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sembicho",
"github_project": "sembicho-cli",
"github_not_found": true,
"lcname": "sembicho-cli"
}