Skip to content

Potential fix for code scanning alert no. 8494: Container contents are never accessed#16

Merged
ChristianRosewich merged 1 commit into
masterfrom
alert-autofix-8494
Jul 14, 2026
Merged

Potential fix for code scanning alert no. 8494: Container contents are never accessed#16
ChristianRosewich merged 1 commit into
masterfrom
alert-autofix-8494

Conversation

@ChristianRosewich

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/ChristianRosewich/CSharp/security/code-scanning/8494

Am besten wird die ungenutzte Collection entfernt, da sie aktuell keine Funktion hat und der Test bereits über andere Assertions validiert wird. Das behebt den CodeQL-Fund ohne funktionale Änderung am Testverhalten.

Konkrete Änderung in GenFreeWin/GenFreeWinTests/FehlerliViewModelTests.cs:

  • In der Methode LoadPersonenOhneElternCommand_Execute_UpdatesProgressAndList() die Zeile mit
    var capturedProgressValues = new System.Collections.Generic.List<int>(); entfernen.
  • Optional (gleicher Grund) auch int progressUpdateCount = 0; entfernen, da ebenfalls ungenutzt.

Es sind keine neuen Imports, Methoden oder Definitionen nötig.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…e never accessed

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ChristianRosewich ChristianRosewich marked this pull request as ready for review July 14, 2026 12:30
@ChristianRosewich ChristianRosewich merged commit 9589533 into master Jul 14, 2026
1 of 3 checks passed
@ChristianRosewich ChristianRosewich deleted the alert-autofix-8494 branch July 14, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant