Le lab harden-runner-et-threat-model : harden-runner en premier step, en block avec une allowlist, et un modèle de menace versionné

Đang mở
#27 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
50/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, python, yaml

Hướng nghiên cứu

Start with labs/securite/harden-runner-et-threat-model, its lab.yaml, scenario.md, challenge/, solution/, and the related lesson paths. Run python3 scripts/valider-labs.py --lab , then inspect tests/test_meta_declare_les_labs.py, pinact run --check, zizmor --offline, and actionlint. Done means the lab validates from 0 to 100, is replayable, declared in meta.yml, and the solution satisfies the stated harden-runner and threat-model checks.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Mesuré le 2026-09-25 sur le parcours github-actions.yaml et les leçons du blog.

Lab labs/securite/harden-runner-et-threat-model, module securite. Leçons éprouvées :

  • /docs/pipeline-cicd/github/securite/harden-runner/
  • /docs/pipeline-cicd/github/securite/threat-model/

La leçon harden-runner cite une « règle GHA-01 » (l.141) qui n'est définie nulle part, et threat-model propose un gabarit YAML l.279-306 que rien ne valide. Le lab donne au gabarit un schéma, et à harden-runner un contrôle de position.

Jouable avec act : partiel

Local : contrôles statiques et schéma. Plateforme : l'agent et ses insights.

Ce qui n'est pas qu'un copier-coller

harden-runner sous act ne protège rien, et le test ne doit pas faire semblant. L'agent s'installe sur un runner Ubuntu de GitHub ; sous act il s'exécute sans effet mesurable. Le lab est donc statique et le dit : premier step de chaque job, épinglé par SHA, egress-policy: block, allowed-endpoints non vide et au format hôte:port, disable-sudo-and-containers: true. Le modèle de menace est validé par un JSON Schema : rayon_d_explosion dans une énumération, revu_le récent, une action avec échéance par entrée non fiable. La partie plateforme lit les insights sur LAB_REPO si l'apprenant le fournit.

Définition de terminé

  • lab.yaml renseigné : module, doc_url, lessons, act (oui, partiel, non) et act_notes qui dit pourquoi
  • scenario.md décrit une situation et un objectif, pas un mode d'emploi ; aucun emoji, aucun tiret cadratin
  • challenge/ est un point de départ que l'apprenant modifie, solution/ une solution de référence rejouable
  • chaque test lit l'état (résultat d'act, findings d'un scanner, réponse de gh api), et le dernier exerce les deux côtés
  • la question « serait-il vert si l'apprenant ne faisait rien ? » a reçu non pour chaque test
  • python3 scripts/valider-labs.py --lab <id> rend 0 avant, 100 après, rejouable ; le verdict est dans validation-labs.json
  • les actions de la solution sont épinglées par SHA au tag mesuré ce jour, commentaire de version vérifié par pinact run --check
  • zizmor --offline et actionlint rendent 0 sur solution/
  • le lab est dans meta.yml, tests/test_meta_declare_les_labs.py est vert
  • quatre indices base64 de coût croissant dans challenge/hints.yaml
Ngôn ngữ chính
Python
Star
7
Fork
4
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stephrobert/github-actions-training

Tất cả issue của stephrobert/github-actions-training

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.