Skip to content

Harden workflow push/rebase loops and fix parser callsites in CVE/Honeypot jobs#10

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-nameerror-in-workflows
Draft

Harden workflow push/rebase loops and fix parser callsites in CVE/Honeypot jobs#10
Copilot wants to merge 3 commits intomainfrom
copilot/fix-nameerror-in-workflows

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 16, 2026

The workflows had two systemic failure modes: NameError from wrong parser callsites and failed push retries due to rebasing with unstaged changes. This PR aligns parser usage and makes rebase retry handling safe across all affected workflow YAMLs, and removes dead combined-feed entries.

  • Parser callsite correction (cve_to_ip_mapper, honeypot_monitor)

    • Updated callsites from parse_entries(...) to _parse_entries(...).
    • Aliased import to match usage:
      • parse_entries as _parse_entries
  • Rebase retry hardening across workflow push loops

    • Applied to all workflows using the fetch → rebase → push retry pattern.
    • Failure path now aborts active/incomplete rebase before recovery:
      • git rebase --abort 2>/dev/null || true
    • Preserved stash-based protection around rebase (stash --include-untracked before rebase, stash pop after success and on failure path).
  • Remove dead feed sources from combined blacklist workflow

    • Removed c2_tracker from SOURCES and corresponding HIGH_QUALITY entry in update_combined_blacklist.yml.
    • cl3m4x1l_ipbandit was not present in current SOURCES, so no edit was required for that key.
git fetch origin ${GITHUB_REF_NAME}
git stash --include-untracked 2>/dev/null || true
if git rebase -X theirs origin/${GITHUB_REF_NAME}; then
  git stash pop 2>/dev/null || true
  git push origin HEAD:${GITHUB_REF_NAME}
else
  git rebase --abort 2>/dev/null || true
  git stash pop 2>/dev/null || true
  # conflict resolution steps...
fi
Original prompt

Drei kritische Fehler in den Workflows beheben

1. NameError: parse_entries_parse_entries

In folgenden Dateien wird parse_entries(...) aufgerufen, aber die Funktion heißt _parse_entries(...):

  • .github/workflows/cve_to_ip_mapper.yml
  • .github/workflows/honeypot_monitor.yml

Fehler aus den Logs:

NameError: name 'parse_entries' is not defined. Did you mean: '_parse_entries'?

Fix: Alle Aufrufe von parse_entries( durch _parse_entries( ersetzen.

2. Git Rebase "unstaged changes" in allen Workflows

Alle Workflows mit Git-Push-Retry-Logik scheitern mit:

error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
fatal: no rebase in progress

Betroffen sind mindestens:

  • .github/workflows/feed_health_monitor.yml
  • .github/workflows/netshield_report_generator.yml
  • .github/workflows/honeypot_monitor.yml
  • .github/workflows/update_bot_detector.yml
  • .github/workflows/update_combined_blacklist.yml
  • .github/workflows/update_confidence_blacklist.yml
  • .github/workflows/cve_to_ip_mapper.yml

Fix: In der Push-Retry-Logik (bash shell script) vor dem git rebase ein git stash --include-untracked einfügen und nach erfolgreichem Rebase git stash pop ausführen. Außerdem bei fehlgeschlagenem Rebase git rebase --abort und git stash pop aufrufen. Suche in ALLEN .yml Workflow-Dateien nach dem Rebase-Pattern und fixe es überall.

3. Tote Feed-URLs entfernen

In .github/workflows/update_combined_blacklist.yml gibt es Feed-Einträge die HTTP 404 zurückgeben:

  • c2_tracker (liefert 404)
  • cl3m4x1l_ipbandit (liefert 404)

Fix: Diese Feed-Einträge aus der SOURCES-Konfiguration in update_combined_blacklist.yml entfernen oder auskommentieren.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Mein workflow auf code fehler prüfen systematisch

Assistant: Ich helfe Ihnen gerne dabei, Ihren Workflow auf Fehler zu prüfen! Dafür benötige ich ein paar Informationen:

  1. Repository: In welchem Repository (Format: owner/repo) befindet sich der Workflow?
  2. Workflow: Wie heißt die Workflow-Datei (z.B. ci.yml), oder haben Sie eine fehlgeschlagene Run-ID oder Pull-Request-Nummer?

Mit diesen Angaben kann ich die Logs prüfen und Ihnen bei der Fehlersuche helfen.

User: Yml

Assistant: Danke, aber ich benötige noch etwas mehr Details:

  1. Repository: Wie heißt Ihr Repository? (Format: owner/repo, z.B. juergen2025sys/mein-projekt)
  2. Workflow-Datei: Wie heißt die .yml-Datei genau? (z.B. ci.yml, build.yml, main.yml)

Alternativ können Sie mir auch einen Link zum Repository oder zum fehlgeschlagenen Workflow-Run geben.

User: https://github.com/juergen2025sys/NETSHIELD/tree/main/.github/workflows

Assistant:

Ich schaue mir die Workflow-Dateien in Ihrem Repository an.

Assistant: Ihr Repository NETSHIELD enthält 17 Workflow-Dateien. Lassen Sie mich zuerst prüfen, welche Workflows aktuell fehlschlagen:

Assistant: Ihr Repository hat 86 fehlgeschlagene Workflow-Runs! Lassen Sie mich die neuesten Fehler der verschiedenen Workflows analysieren. Ich hole die Logs der aktuellsten Fehlschläge:

Assistant: Hier ist die systematische Fehleranalyse aller fehlgeschlagenen Workflows in Ihrem Repository juergen2025sys/NETSHIELD:


🔴 Fehler 1: NameError: name 'parse_entries' is not defined (Kritisch)

Betroffen: cve_to_ip_mapper.yml, honeypot_monitor.yml

NameError: name 'parse_entries' is not defined. Did you mean: '_parse_entries'?

Ursache: Die Funktion heißt _parse_entries (mit Unterstrich), wird aber als parse_entries (ohne Unterstrich) aufgerufen.

Fix: In den betroffenen Workflow-Dateien alle Aufrufe von parse_entries(...) durch _parse_entries(...) ersetzen.


🔴 Fehler 2: error: cannot rebase: You have unstaged changes (Kritisch – betrifft ALLE Workflows)

Betroffen: feed_health_monitor.yml, netshield_report_generator.yml, honeypot_monitor.yml, update_bot_detector.yml, update_combined_blacklist.yml, update_confidence_blacklist.yml – praktisch jeder Workflow mit Git-Push.

error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
fatal: no rebase in progress

Ursache: In der Push-Retry-Logik wird git rebase ausgeführt, aber es gibt unstaged Änderungen im Working Directory. Der Code macht git commit, dann git fetch + git rebase, aber offenbar bleiben Dateien unstaged (z.B. durch den Python-Schritt generierte Dateien, die nicht im git add enthalten waren).

Fix: Vor dem git rebase ein git stash einfügen, oder besser: sicherstellen, dass alle generierten Dateien im git add erfasst werden. In Ihren Workflows sollte die Push-Logik so aussehen:

git add -A  # Alle Änderungen erfassen, nicht nur bestimmte Dateien
git commit -m "..." || echo "Nichts zu comm...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

Copilot AI and others added 2 commits April 16, 2026 06:22
Agent-Logs-Url: https://github.com/juergen2025sys/NETSHIELD/sessions/1f1742a7-6800-4d31-bb9b-3682343cdea5

Co-authored-by: juergen2025sys <220786640+juergen2025sys@users.noreply.github.com>
Agent-Logs-Url: https://github.com/juergen2025sys/NETSHIELD/sessions/1f1742a7-6800-4d31-bb9b-3682343cdea5

Co-authored-by: juergen2025sys <220786640+juergen2025sys@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix NameError by updating function calls in workflows Harden workflow push/rebase loops and fix parser callsites in CVE/Honeypot jobs Apr 16, 2026
Copilot AI requested a review from juergen2025sys April 16, 2026 06:26
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.

2 participants