detectors judge their own pattern tables and the law registry text as project code (M3)

Abierto
#426 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
testing-qa

Línea de trabajo

Start with the code-only view of M1, then read the named detectors and data modules, including encryption-implementation-configuration.ts, environment-variables-usage-configuration.ts, authentication-checker.ts, and src/data/*-laws.ts. Reproduce the self-audit described in the issue and trace how pattern tables, law text, and data-only modules reach each check. Done means detector data and prose are excluded by general rules, with the listed self-findings gone and the intended checks still running.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Found in the 8.0.0 self-audit triage: RoC 7.29.1 (npm, 5fc54afe) on a clean clone of develop at 2d2fa9a, with typescript resolvable (verdict compliance, 0 failed / 46 warnings). The bucket method and per-law tables are kept by QA; counts are from that run.

What happens

Run on a repository that contains detectors (RoC itself, or any project with lint/security tooling), the detectors flag their own data:

  • Data Encryption: WEAK_ALGORITHMS = ['MD5','SHA1','DES','RC4'] (encryption-implementation-configuration.ts:23) flags its own line; 26 of 29 findings are pattern tables or law text.
  • Environment Security: BEST_PRACTICES.bad contains 'process.env.SECRET_KEY without validation' (environment-variables-usage-configuration.ts:128-132); doc-reference URLs in the serverless registry are "hardcoded URLs".
  • Authentication Security: /md5.*password/ matches its own source (authentication-checker.ts:129-133). Note: two of its checks pass today only because of the detector's own /AuthService/ and /refreshToken/ patterns, so fixing scope makes them fire (see the gating issue).
  • Code Documentation: the law registries src/data/*-laws.ts are "under-commented" because their prose lives in fields (28 files).
  • Typed HTTP Boundaries: its only match is law prose describing its own false positive (code-quality-laws.ts:462).
  • Async Cache Single-Flight: a file is selected by the law card's own example text (cache-harness-laws.ts:83-85).

Suggested direction

A general rule, not an ignore list for RoC: string contents of pattern/data tables are not code (covered by the code-only view of M1), and data-only modules (no function bodies) are skipped by ratio-style checks.

Lenguaje dominante
TypeScript
Estrellas
0
Forks
0
Merge medio
38 min
PR fusionados (30 d)
96

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Rule-Of-Code/RoC

Todos los issues de Rule-Of-Code/RoC

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.