github-samples / github-samples/pets-workshop
GitHub security workshop: Add Copilot-assisted remediation and verification
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 80
- Forks
- 161
- Ø Merge
- 31 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Goal
Teach a complete remediation loop: understand a CodeQL finding, use Copilot as an optional assistant, review the proposed fix, test it, and verify the security alert is resolved.
Scope
Use the alert introduced by the CodeQL lab. Prompts should ask Copilot to explain the weakness and propose a minimal secure change, but learners must validate the output rather than accept it automatically. Include an equivalent manual remediation path for learners without Copilot.
Acceptance criteria
- The exercise provides model-agnostic example prompts for explanation, remediation, and test generation.
- A manual secure implementation is available as a fallback.
- Learners review the change against the CodeQL data flow and secure coding guidance.
- Focused behavior tests cover the vulnerable path and pass after remediation.
- Learners commit the fix to the lab branch and trigger code scanning again.
- The pull request check passes and the original alert is shown as fixed or absent from the updated analysis.
- The exercise states that Copilot output is untrusted until reviewed and tested.
- No specific optional model or transient UI layout is required.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der Warnung, die vom vorhandenen CodeQL-Lab eingeführt wurde, und verfolgen Sie den anfälligen Pfad sowie die darauf ausgerichteten Verhaltenstests. Fügen Sie anschließend die von Copilot unterstützte und die manuelle Anleitung zur Behebung hinzu, committen Sie die Korrektur in den Lab-Branch, führen Sie code scanning erneut aus und bestätigen Sie, dass die pull request-Prüfung erfolgreich ist und die ursprüngliche Warnung behoben wurde oder nicht vorhanden ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github, github-actions, python
- Bereich
- ci-cd, documentation, security, testing-qa
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100