Skip to content

Potential fix for code scanning alert no. 8493: Container contents are never accessed#17

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

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

Conversation

@ChristianRosewich

Copy link
Copy Markdown
Owner

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

Allgemein sollte man bei diesem Befund entweder:

  1. den Container tatsächlich nutzen (z. B. an ein Control binden), oder
  2. ihn entfernen, wenn er aktuell nicht gebraucht wird.

Die beste, funktionsneutrale Lösung in diesem Snippet ist das Entfernen der ungenutzten BindingSource-Variablen personenErrorsBinding und familienErrorsBinding, da es in der gezeigten View nur List1 und List2-Bindings gibt. So bleibt das aktuelle Verhalten identisch, und der CodeQL-Befund wird sauber beseitigt.

Zu ändern ist nur in GenFreeWin/GenFreeWin/Gen_FreeWin/Views/FehlerliViewModelFactory.cs im Bereich von SetupDataBindings(...):

  • Block mit personenErrorsBinding entfernen.
  • Block mit familienErrorsBinding entfernen.
  • Rest unverändert lassen.

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 e3bd911 into master Jul 14, 2026
1 of 3 checks passed
@ChristianRosewich ChristianRosewich deleted the alert-autofix-8493 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