Conjunto de 100 reglas de seguridad personalizadas para analizar código MATLAB (.m) usando Semgrep en modo genérico.
- 100 reglas Semgrep escritas en formato YAML
- 53% reglas de flujo (control/ejecución): eval(), system(), command injection, etc.
- 47% reglas de expresión (valores/secretos): contraseñas, API keys, tokens, credenciales
# Crear entorno virtual Python
python3 -m venv .venv
source .venv/bin/activate
# Instalar Semgrep
pip install semgrepgit clone https://github.com/amazing-programming/matlab_rules.git
cd matlab_rulessemgrep --config semgrep-rules/ tu_archivo.msemgrep --config semgrep-rules/ tu_proyecto/semgrep --config semgrep-rules/ tu_proyecto/ --json > reporte.jsonsemgrep --config semgrep-rules/ tu_proyecto/ --sarif > reporte.sarif- Inyección de Código: 8 reglas (CWE-94)
- Credenciales Hardcodeadas: 30+ reglas (CWE-798)
- Criptografía Débil: 15 reglas (CWE-327)
- Path Traversal: 5 reglas (CWE-22)
- OS Command Injection: 7 reglas (CWE-78)
- SQL Injection: 1 regla (CWE-89)
- Total de reglas: 100
- 0% falsos positivos
- Severidades: 15 CRITICAL, 55 HIGH, 25 MEDIUM, 5 LOW
- name: Install Semgrep
run: pip install semgrep
- name: Clone rules
run: git clone https://github.com/amazing-programming/matlab_rules.git
- name: Run Semgrep
run: semgrep --config matlab_rules/semgrep-rules/ . --sarif > semgrep.sarifMIT License