test : add unit tests for generate_finding_key in finding_intelligence
Nadie ha tomado este issue todavía.
- #2240 de @tmdeveloper007 — cerrado sin fusionar
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
Línea de trabajo
Read backend/secuscan/finding_intelligence.py to inspect generate_finding_key and the existing tests for its component functions. Then create testing/backend/unit/test_finding_intelligence_key.py and cover determinism, differing plugin_id, target, and owner_id values, missing fields, and the specified group:<16-character-hex-digest> format. The issue notes that a linked pull request exists and says the work is being handled by tmdeveloper007.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary of What Needs to be Done:
The backend/secuscan/finding_intelligence.py module exposes a generate_finding_key function that produces a stable deduplication key for a finding. The function is responsible for consistent identification of the same vulnerability across different scan tasks. It is currently not directly unit tested — only its component functions (_issue_signature, _guess_asset_ref, _stable_id) have isolated tests.
Changes that Need to be Made:
Create testing/backend/unit/test_finding_intelligence_key.py with tests for generate_finding_key:
- Returns a string starting with "group:"
- Same inputs produce the same output (deterministic)
- Different plugin_id values produce different outputs
- Different target values produce different outputs
- Different owner_id values produce different outputs
- Missing/None fields in the finding dict are handled gracefully
- The key format matches the pattern "group:<16-char-hex-digest>"
Impact that it would Provide:
- Directly tests the finding deduplication key generation used for deduplication across tasks
- Documents the expected stable key format for maintainers
- Ensures the function is deterministic and handles edge-case inputs
- Complements existing tests for _issue_signature and _stable_id
Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.
- Lenguaje dominante
- Python
- Estrellas
- 36
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de utksh1/SecuScan
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
area:frontend good first issue level:intermediate priority:low type:testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
-
area:frontend good first issue level:intermediate priority:low type:testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
area:frontend good first issue level:beginner priority:low type:testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
area:frontend good first issue level:intermediate priority:low type:testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Todos los issues de utksh1/SecuScan
Issues similares
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionPosiblemente ocupada @bodapatisaikrishna la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[integration]: NoMacSandboxAbiertoexternal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
langchain-ai/docs#7652 ·
Los mantenedores suelen responder en 1 día
-
[oblt-aw][autodoc] Document new e2e-secret-leak-artifacts workflow and update e2e-all leaf listAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
elastic/oblt-aw#2513 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
amd/gaia#7326 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
NCAR/CLM-Tutorial#113 · 1 comentario ·
Los mantenedores suelen responder en 1 día