Prevent duplicate Child Issues and incorrect Parent closures in AquaSec dry-runs
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the bug
- Repeated equivalent Findings can create multiple Child Issues for the same Finding Identity.
- Dry-run Parent closure checks ignore newly simulated Children, incorrectly reporting active Parents as resolved.
1. Repeated Findings create duplicate Children
The parser creates one Alert for every AquaSec row, including equivalent rows sharing the same Finding Identity and Result Hash.
Matching is resolved for the entire scan before any issues are created. Repeated Alerts therefore remain independently unmatched, and each creates a Child Issue. Registering the first newly created Child does not update those precomputed matches.
This violates the intended policy of one Child Issue per distinct Finding Identity. Repeated unchanged scans can also close duplicate owners and create replacements, causing unnecessary issue churn.
2. Dry-run incorrectly closes Parents with active Children
Newly simulated Children are registered in the Issue Index, but not in the numbered issue collection. Parent closure checks enumerate the numbered collection, so they cannot see these simulated Children.
When old Children close and replacements are simulated, the dry-run can incorrectly report that their Parent has no open Children.
The dry-run creation path also needs to mirror Parent reopening when a new Child belongs to an existing closed Parent.
Expected state
Duplicate handling
- Equivalent repeated Findings become one Alert before Matching.
- Identical duplicates are skipped and processing continues normally.
- Differences in unused fields, such as vendor scoring, do not create additional Children.
- Distinct SAST occurrences remain separate.
- Conflicting parsed data sharing an identifier must not be silently treated as an identical duplicate.
- The raw scan artifact remains unchanged.
- Repeating unchanged scan data does not create or close duplicate Children.
Parent lifecycle
- Parent closure checks consider all known Children, including newly simulated Children.
- Creating a simulated Child keeps its Parent open or reopens it when necessary.
- A Parent closes when its known Children are genuinely all closed.
- Multiple simulated Children remain distinct despite sharing placeholder issue number
0.
Acceptance criteria
- Normalize equivalent duplicate Findings before whole-scan Matching.
- Preserve the existing single-claim Matching and SAST ownership safeguards.
- Use the complete Child collection for Parent closure decisions.
- Mirror Parent reopening and closure state changes during dry-run.
- Add regression coverage for repeated input across two synchronization passes.
- Add regression coverage for replacement Children, closed Parents, and genuinely resolved Parents.
- Preserve the counting policy documented in #130.
Impact / Severity
High
The first defect can create persistent duplicate issues and inflate notifications. The second makes the dry-run unreliable as a safety check before enabling writes.
Attachments / Evidence
Observed workflow
https://github.com/absa-group/AUL/actions/runs/42626812554
Configuration:
- Dry-run enabled.
- Minimum Severity:
high. - Artifact:
aquasec-night-scan, containingaquasec_scan.json. - The supplied downloaded JSON was confirmed to match the run artifact.
Count reconciliation
The artifact contains 304 rows across all severities. Its high/critical subset is:
| Finding Category | AquaSec rows | Distinct Finding Identities |
|---|---|---|
| SAST | 27 | 27 |
| Vulnerabilities | 154 | 102 |
| Pipeline Misconfigurations | 2 | 2 |
| Total | 183 | 131 |
The dry-run proposes 183 Child creations. Under the existing distinct-Finding-Identity policy, 52 of those are unnecessary duplicates.
Concrete duplicate example
The following Finding appears three times with every exported field identical:
| Field | Value |
|---|---|
| Rule | CVE-2026-54512 |
| File | pom.xml |
| Package | com.fasterxml.jackson.core:jackson-databind |
| Installed version | 2.15.0 |
| Result Hash | 0cbe6a006f64056416d7b6acd3365522 |
The original run contains three corresponding creation proposals:
Security [DRY-RUN] - Would create child issue for alert FP=0cbe6a00 (rule: CVE-2026-54512, severity: high)
Security [DRY-RUN] - Would create child issue for alert FP=0cbe6a00 (rule: CVE-2026-54512, severity: high)
Security [DRY-RUN] - Would create child issue for alert FP=0cbe6a00 (rule: CVE-2026-54512, severity: high)
These are duplicate creation proposals, not evidence that this dry-run actually created GitHub issues.
Incorrect Parent closure evidence
The run proposes 112 Parent closures. Of these, 34 Parents have high/critical Findings in the same artifact and newly simulated Children for their Rules.
Examples:
absa/ABC#6259:CVE-2026-111752.absa/ABC#4368:insecure-disable-cert-verification-aquasec-python.
Those Parents must not be closed merely because simulated Children are absent from the numbered issue collection.
Desktop
- Environment: GitHub Actions.
- Runner:
ubuntu-latest. - Python: 3.14.
- Browser: not applicable.
Related / References
- #130 — documents why AquaSec row counts and GitHub Child Issue counts differ.
- #138 — introduces whole-scan Matching and single-claim ownership safeguards that must be preserved.
- Parser behavior at the affected revision.
- Precomputed Matching and creation loop.
- Parent closure collection.
- Different registration paths for simulated and live Children.
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 0
- Merge medio
- 1g 5h
- PR unite (30g)
- 8
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AbsaOSS/organizational-workflows
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
AbsaOSS/organizational-workflows#142 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
AbsaOSS/organizational-workflows#117 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
AbsaOSS/organizational-workflows#55 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
AbsaOSS/organizational-workflows#26 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
AbsaOSS/organizational-workflows#24 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di AbsaOSS/organizational-workflows
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NVIDIA/nsight-python#88 ·
I maintainer di solito rispondono entro 1 giorno
-
Criteria can pass when the deliverable is missingForse già presa @clementtisseau l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
harveyai/harvey-labs#217 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
databrickslabs/ontos#1420 ·
I maintainer di solito rispondono entro 3 giorni