Fuentes de reglas
De dónde salen las reglas, cómo se fija cada commit y cuál es el papel de cada fuente.
Qué fuentes cuentan
| Fuente pública | Identificador técnico | Papel real |
|---|---|---|
| Nextron Systems — signature-base | Neo23x0/signature-base | Fuente efectiva de reglas. Se descarga el directorio yara. |
| Comunidad de reglas YARA (Yara-Rules) | Yara-Rules/rules | Fuente efectiva de reglas (comunidad): malware, packers, crypto, antidebug_antivm, capabilities, exploit_kits, webshells. |
| VirusTotal — ecosistema YARA y YARA-X | VirusTotal/yara-x | Motor de referencia, sin reglas. Se registra en config/sources.json con tipo engine; hoy no aporta ficheros al canal. |
ACTUAL Un foro o repositorio de la comunidad solo es fuente efectiva si está en la lista permitida config/sources.json. Cualquier otra fuente es PROPUESTA hasta que se añada con su licencia revisada.
Cómo se recoge
Dibujando el diagrama…
sequenceDiagram autonumber participant GA as GitHub Actions daily.yml participant PR as prepare.py participant API as GitHub API participant UP as Upstream repository participant INV as dist/candidate.json GA->>PR: run with the job token PR->>API: GET commits/HEAD API-->>PR: commit sha (pinned for this run) PR->>API: GET license API-->>PR: SPDX id and LICENSE text PR->>API: GET tarball at that sha API->>UP: snapshot of that commit UP-->>PR: tar.gz (max 90 MB) PR->>PR: safe extraction, keep .yar and .yara under allowed paths PR->>PR: reject over 1 MB or NUL bytes, SHA-256 of each file PR->>INV: sources with commit and licence check, files with path sha256 bytes
Descripción del diagrama
GitHub Actions ejecuta prepare.py, que pide a la API de GitHub el último commit de cada fuente, lee la licencia, descarga el tarball de ese commit exacto, lo extrae de forma segura, conserva solo los .yar y .yara permitidos, rechaza los grandes o binarios, calcula el hash de cada fichero y escribe el inventario candidate.json.
Código Mermaid
sequenceDiagram
autonumber
participant GA as GitHub Actions daily.yml
participant PR as prepare.py
participant API as GitHub API
participant UP as Upstream repository
participant INV as dist/candidate.json
GA->>PR: run with the job token
PR->>API: GET commits/HEAD
API-->>PR: commit sha (pinned for this run)
PR->>API: GET license
API-->>PR: SPDX id and LICENSE text
PR->>API: GET tarball at that sha
API->>UP: snapshot of that commit
UP-->>PR: tar.gz (max 90 MB)
PR->>PR: safe extraction, keep .yar and .yara under allowed paths
PR->>PR: reject over 1 MB or NUL bytes, SHA-256 of each file
PR->>INV: sources with commit and licence check, files with path sha256 bytes- Se consulta el último commit de cada fuente y se descarga el tarball de ese commit exacto, de modo que el candidato es reproducible.
- Solo se conservan
.yary.yarabajo las rutas permitidas; se omiten los ficheros de más de 1 MB o con bytes NUL (eventofile.skipped). - Se comprueba la licencia contra
config/policy.json: marcador «Detection Rule License» para Nextron y GPL-2.0 para Yara-Rules. Un cambio de licencia lleva a cuarentena.
Qué queda registrado
Cada release incluye en release.json y en el manifiesto la lista de fuentes con repositorio, commit y resultado de la comprobación de licencia, de modo que se puede reconstruir de dónde salió cada fichero.