Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions CHANGELOG.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,59 @@ Toutes les modifications notables du projet sont documentées dans ce fichier.
Le format s'appuie sur [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/),
et le projet suit le [versionnage sémantique](https://semver.org/lang/fr/).

## [0.9.4] - 2026-11-15

### Ajouté

- **`dsoxlab new catalog` écrit les cinq badges du README de la collection.**
Juste sous la ligne de langue de `README.md` et `README.fr.md` : CI, OpenSSF
Scorecard, conformité Plumber, SLSA 3 et licence, dans la forme qu'emploient
déjà les catalogues, avec les libellés Plumber et licence traduits en
français. Le badge de licence suit la licence que pose le squelette
(CC BY 4.0).
- **`new catalog --github <propriétaire>`** : le compte ou l'organisation GitHub
du dépôt `<propriétaire>/<id>`. Il entre dans les badges et dans les commandes
de vérification de `RELEASING.md`, `RELEASING.fr.md` et `attester.yml`. Sans
lui, elles portent `<owner>`, et la commande dit de le remplacer. Un nom qui ne
peut pas être un nom GitHub est refusé avant toute écriture.
- **Deux workflows de plus dans le squelette : `scorecard.yml` et
`plumber.yml`**, repris du catalogue cloud avec leurs épinglages par SHA et
leurs permissions minimales, plus le `.plumber.yaml` sans lequel l'action
Plumber refuse de tourner. Sans eux, les badges Scorecard et Plumber restaient
vides. Les deux se sautent tant que le dépôt est privé. `RELEASING` les décrit.

### Corrigé

- **Le `RELEASING` du squelette ne nomme plus un propriétaire GitHub réel.** Ses
commandes `gh attestation verify`, `cosign verify-blob` et de ruleset visaient
un compte fixe : un catalogue créé par quelqu'un d'autre aurait vérifié ses
releases contre le dépôt d'un tiers. Elles prennent désormais le propriétaire
de `--github`, ou `<owner>`.
- **Le ruleset proposé par le `RELEASING` du squelette exige exactement les
contrôles que le squelette lance.** Repris d'un catalogue frère, il exigeait
Zizmor, Actionlint, Poutine, CodeQL et d'autres, que le `ci.yml` du squelette
ne lançait pas : appliqué tel quel, il bloquait toutes les pull requests. Le
squelette lance désormais ces jobs (voir Ajouté), et un test confronte les
contrôles exigés aux noms des jobs de `ci.yml`, dans les deux sens.
- **Une seule version de `harden-runner` dans le squelette** : `ci.yml`,
`release.yml` et `attester.yml` passent en v2.22.3, l'épinglage des deux
nouveaux workflows. Un test refuse une action épinglée sur deux versions.
- **Le squelette porte la chaîne de sécurité des catalogues frères**, reprise
de `applications-ia-dsoxlab-training` (e7db2da), où tous les jobs sont verts.
`ci.yml` gagne les jobs Zizmor, Actionlint, Poutine, Pre-commit parity et
CodeQL (python et actions) à côté de `Contract, guardrails and lint`, et le
ruleset de `RELEASING` exige ces sept contrôles sous leurs noms exacts. Un
test développe la matrice CodeQL et vérifie l'accord dans les deux sens. Le
squelette reçoit aussi `.github/dependabot.yml` (le modèle commun, `uv` et
`github-actions`), `.github/codeql/config.yml` (fixtures et solutions
exclues), `.github/CODEOWNERS` (le propriétaire de `--github`, ou `<owner>`),
deux gabarits d'issue et `.poutine.yml`. `SECURITY.md` et `SECURITY.fr.md`
suivent la référence : versions supportées, signalement privé par un avis de
sécurité GitHub de `<owner>/<id>`, délais de divulgation, un périmètre écrit
pour tout catalogue de labs, et ce que le dépôt ne demandera jamais.
`setup-uv` passe en v10.3.3 dans tous les workflows : chaque action garde une
seule version.

## [0.9.3] - 2026-11-14

### Ajouté
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,57 @@ All notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.4] - 2026-11-15

### Added

- **`dsoxlab new catalog` writes the five README badges of the collection.**
Right under the language line of `README.md` and `README.fr.md`: CI, OpenSSF
Scorecard, Plumber compliance, SLSA 3 and licence, in the form the catalogs
already use, with the Plumber and licence labels translated in French. The
licence badge follows the licence the skeleton writes (CC BY 4.0).
- **`new catalog --github <owner>`**: the GitHub account or organization of the
repository `<owner>/<id>`. It goes into the badges and into the verification
commands of `RELEASING.md`, `RELEASING.fr.md` and `attester.yml`. Without it,
they read `<owner>`, and the command says to replace it. An owner that cannot
be a GitHub name is refused before anything is written.
- **Two more workflows in the skeleton: `scorecard.yml` and `plumber.yml`**,
taken from the cloud catalog with their SHA pins and minimal permissions, plus
the `.plumber.yaml` the Plumber action refuses to run without. Without them the
Scorecard and Plumber badges stayed empty. Both skip while the repository is
private. `RELEASING` describes them.

### Fixed

- **The skeleton's `RELEASING` no longer names a real GitHub owner.** Its
`gh attestation verify`, `cosign verify-blob` and ruleset commands pointed at
a fixed account: a catalog created by anyone else would have checked its
releases against someone else's repository. They now use the `--github`
owner, or `<owner>`.
- **The ruleset proposed by the skeleton's `RELEASING` requires exactly the
checks the skeleton runs.** It was copied from a sibling catalog and required
Zizmor, Actionlint, Poutine, CodeQL and others that the skeleton's `ci.yml`
did not run: applied as is, it blocked every pull request. The skeleton now
runs those jobs (see Added), and a test checks the required checks against
the job names of `ci.yml`, both ways.
- **One version of `harden-runner` in the skeleton**: `ci.yml`, `release.yml`
and `attester.yml` move to v2.22.3, the pin of the two new workflows. A test
refuses an action pinned to two versions.
- **The skeleton carries the security chain of its sibling catalogs**, taken
from `applications-ia-dsoxlab-training` (e7db2da), where every job is green.
`ci.yml` gains the Zizmor, Actionlint, Poutine, Pre-commit parity and CodeQL
(python and actions) jobs next to `Contract, guardrails and lint`, and the
ruleset of `RELEASING` requires those seven checks by their exact names. A
test expands the CodeQL matrix and checks the agreement both ways. The
skeleton also gets `.github/dependabot.yml` (the common model, `uv` and
`github-actions`), `.github/codeql/config.yml` (fixtures and solutions left
out), `.github/CODEOWNERS` (the `--github` owner, or `<owner>`), two issue
templates and `.poutine.yml`. `SECURITY.md` and `SECURITY.fr.md` follow the
reference: supported versions, private report through a GitHub advisory of
`<owner>/<id>`, disclosure timelines, a scope written for any lab catalog,
and what the repository will never ask. `setup-uv` moves to v10.3.3 in every
workflow, so each action keeps a single version.

## [0.9.3] - 2026-11-14

### Added
Expand Down
5 changes: 3 additions & 2 deletions README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ leurs sujets : chacun déclare tout dans son propre `meta.yml` et ses

| Catalogue | Labs | Ce qu'il enseigne |
|---|---:|---|
| [`kubernetes-dsoxlab-training`](https://github.com/stephrobert/kubernetes-dsoxlab-training) | 131 | Kubernetes sur cluster kubeadm, pour CKA, CKAD et CKS |
| [`ansible-training`](https://github.com/stephrobert/ansible-training) | 113 | Ansible, du premier playbook aux collections |
| [`kubernetes-dsoxlab-training`](https://github.com/stephrobert/kubernetes-dsoxlab-training) | 111 | Kubernetes sur cluster kubeadm, pour CKA, CKAD et CKS |
| [`containers-dsoxlab-training`](https://github.com/stephrobert/containers-dsoxlab-training) | 93 | Les conteneurs, Docker, Compose et Swarm |
| [`terraform-dsoxlab-training`](https://github.com/stephrobert/terraform-dsoxlab-training) | 91 | Terraform et l'infrastructure as code |
| [`linux-dsoxlab-training`](https://github.com/stephrobert/linux-dsoxlab-training) | 89 | Administration Linux, RHCSA et LFCS |
Expand All @@ -141,9 +141,10 @@ leurs sujets : chacun déclare tout dans son propre `meta.yml` et ses
| [`python-dsoxlab-training`](https://github.com/stephrobert/python-dsoxlab-training) | 7 | Python, la construction pas à pas d'un outil de sécurité |
| [`proxmox-dsoxlab-training`](https://github.com/stephrobert/proxmox-dsoxlab-training) | 6 | Proxmox VE : installer, exploiter, sécuriser et automatiser un hyperviseur |
| [`cicd-dsoxlab-training`](https://github.com/stephrobert/cicd-dsoxlab-training) | 5 | Les pipelines CI/CD, sur une forge locale et sans compte en ligne |
| [`applications-ia-dsoxlab-training`](https://github.com/stephrobert/applications-ia-dsoxlab-training) | 3 | Sécuriser et gouverner les applications générées par IA : classer, cadrer, vibe coder avec méthode |
| [`github-actions-training`](https://github.com/stephrobert/github-actions-training) | 1 | GitHub Actions, des workflows rejoués en local |

_699 labs dans 18 catalogues, comptés sur les dépôts publiés (`labs/**/lab.yaml` de leur branche par défaut). Cette table est générée par `scripts/gen-catalogues.py` depuis `src/dsoxlab/templates/catalogues.yml`, le manifeste que lit `dsoxlab catalog list` ; aucun chiffre n'y est écrit à la main._
_722 labs dans 19 catalogues, comptés sur les dépôts publiés (`labs/**/lab.yaml` de leur branche par défaut). Cette table est générée par `scripts/gen-catalogues.py` depuis `src/dsoxlab/templates/catalogues.yml`, le manifeste que lit `dsoxlab catalog list` ; aucun chiffre n'y est écrit à la main._

<!-- CATALOGUES:END -->

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ hand, because a written list of six once hid six others.

| Catalog | Labs | What it teaches |
|---|---:|---|
| [`kubernetes-dsoxlab-training`](https://github.com/stephrobert/kubernetes-dsoxlab-training) | 131 | Kubernetes on a kubeadm cluster, for CKA, CKAD and CKS |
| [`ansible-training`](https://github.com/stephrobert/ansible-training) | 113 | Ansible, from first playbook to collections |
| [`kubernetes-dsoxlab-training`](https://github.com/stephrobert/kubernetes-dsoxlab-training) | 111 | Kubernetes on a kubeadm cluster, for CKA, CKAD and CKS |
| [`containers-dsoxlab-training`](https://github.com/stephrobert/containers-dsoxlab-training) | 93 | Containers, Docker, Compose and Swarm |
| [`terraform-dsoxlab-training`](https://github.com/stephrobert/terraform-dsoxlab-training) | 91 | Terraform and infrastructure as code |
| [`linux-dsoxlab-training`](https://github.com/stephrobert/linux-dsoxlab-training) | 89 | Linux administration, RHCSA and LFCS |
Expand All @@ -141,9 +141,10 @@ hand, because a written list of six once hid six others.
| [`python-dsoxlab-training`](https://github.com/stephrobert/python-dsoxlab-training) | 7 | Python, building a security tool step by step |
| [`proxmox-dsoxlab-training`](https://github.com/stephrobert/proxmox-dsoxlab-training) | 6 | Proxmox VE: install, operate, secure and automate a hypervisor |
| [`cicd-dsoxlab-training`](https://github.com/stephrobert/cicd-dsoxlab-training) | 5 | CI/CD pipelines, on a local forge and no online account |
| [`applications-ia-dsoxlab-training`](https://github.com/stephrobert/applications-ia-dsoxlab-training) | 3 | Governing and securing AI-generated applications: classify, frame, vibe code with a method |
| [`github-actions-training`](https://github.com/stephrobert/github-actions-training) | 1 | GitHub Actions, workflows replayed locally |

_699 labs across 18 catalogs, counted on the published repositories (`labs/**/lab.yaml` on their default branch). This table is generated by `scripts/gen-catalogues.py` from `src/dsoxlab/templates/catalogues.yml`, the manifest `dsoxlab catalog list` reads; no figure in it is written by hand._
_722 labs across 19 catalogs, counted on the published repositories (`labs/**/lab.yaml` on their default branch). This table is generated by `scripts/gen-catalogues.py` from `src/dsoxlab/templates/catalogues.yml`, the manifest `dsoxlab catalog list` reads; no figure in it is written by hand._

<!-- CATALOGUES:END -->

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "dsoxlab"
version = "0.9.3"
version = "0.9.4"
description = "Turn declarative exercises into reproducible, runnable and verifiable lab environments"
readme = "README.md"
requires-python = ">=3.11"
Expand Down
10 changes: 9 additions & 1 deletion src/dsoxlab/cli/auteur.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,15 @@ def new_catalog(
dans: Annotated[
Path | None, typer.Option("--in", help=_("opt_new_dans"))
] = None,
github: Annotated[
str | None, typer.Option("--github", help=_("opt_new_github"))
] = None,
) -> None:
"""Crée un catalogue vide mais conforme."""
from ..services.scaffold import ScaffoldError, creer_catalogue

try:
creation = creer_catalogue(identifiant, dans or Path.cwd())
creation = creer_catalogue(identifiant, dans or Path.cwd(), proprietaire=github)
except ScaffoldError as exc:
error(str(exc))
raise typer.Exit(1) from None
Expand All @@ -155,6 +158,11 @@ def new_catalog(
# qu'un catalogue public sans licence n'est pas réutilisable, mais il le
# dit pour que l'auteur la remplace si la sienne diffère.
info(_("scaffold_licence_posee"))
if github is None:
# Les badges sont écrits quand même, sur un emplacement : un README
# sans badges serait à compléter de mémoire, un emplacement se
# remplace d'un rechercher-remplacer. Encore faut-il le dire.
warn(_("scaffold_github_a_remplacer", name=identifiant))
info(_("scaffold_catalogue_suite", path=str(creation.racine)))


Expand Down
20 changes: 19 additions & 1 deletion src/dsoxlab/i18n/strings/en.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,19 @@
"Scaffold a lab, discovered by the next list-labs.",
"arg_new_id": "Id, lowercase, no spaces.",
"opt_new_dans": "Directory to create the catalog in. Defaults to the current one.",
"opt_new_github":
"GitHub owner (account or organization) of the repository <owner>/<id>. "
"Used by the README badges and the RELEASING commands.",
"opt_new_runtime":
"Lab runtime: shell (local workshop) or vm (dedicated machine).",
"scaffold_catalogue_cree": "Catalog '{name}' created in {path}",
"scaffold_socle_pose":
"{count} files written: the reference README in both languages, the "
"governance documents, a conftest.py with the bilingual message() "
"helper, a CI workflow and the repository guardrails.",
"helper, the CI with the security chain (zizmor, actionlint, poutine, "
"pre-commit parity, CodeQL), the release, Scorecard and Plumber "
"workflows behind the README badges, Dependabot, CODEOWNERS, issue "
"templates and the repository guardrails.",
"scaffold_licence_posee":
"LICENSE is CC BY 4.0, the licence of the collection. Replace the file "
"if your catalog uses another one: GitHub only recognises a licence "
Expand Down Expand Up @@ -455,6 +461,14 @@
"scaffold_id_invalide":
"'{name}' cannot be used as an id: lowercase letters, digits, dot, "
"dash and underscore only.",
"scaffold_github_invalide":
"'{name}' cannot be a GitHub owner: letters, digits and single dashes "
"only, 39 characters at most, no dash at either end.",
"scaffold_github_a_remplacer":
"No --github given: the README badges and the RELEASING commands use "
"the placeholder <owner>. Replace it with the GitHub account or "
"organization that will host {name}, or create the catalog again with "
"--github <owner>.",
"scaffold_existe_deja":
"{path} already exists. Pick another id, or remove that directory: "
"a skeleton never overwrites work.",
Expand Down Expand Up @@ -957,6 +971,10 @@
pre-commit, governance files and its own tests. It passes
[cyan]validate-structure[/cyan] with no edit.
[dim]--in <dir>[/dim] Where to create it. Defaults to the current directory.
[dim]--github <owner>[/dim] GitHub owner of the repository <owner>/<id>, written
in the five README badges (CI, Scorecard, Plumber,
SLSA 3, licence) and the RELEASING commands. Without
it, they read [bold]<owner>[/bold], to replace.
[cyan]new lab <id>[/cyan] Scaffolds a compliant lab, discovered by the next
[cyan]list-labs[/cyan]. Its test [bold]fails[/bold] until it is written: a
skeleton green from the start would teach grading
Expand Down
21 changes: 20 additions & 1 deletion src/dsoxlab/i18n/strings/fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,19 @@
"Crée un lab conforme, découvert dès le prochain list-labs.",
"arg_new_id": "Identifiant, en minuscules, sans espace.",
"opt_new_dans": "Répertoire où créer le catalogue. Défaut : le répertoire courant.",
"opt_new_github":
"Propriétaire GitHub (compte ou organisation) du dépôt <propriétaire>/<id>. "
"Sert aux badges du README et aux commandes de RELEASING.",
"opt_new_runtime":
"Runtime du lab : shell (atelier local) ou vm (machine dédiée).",
"scaffold_catalogue_cree": "Catalogue « {name} » créé dans {path}",
"scaffold_socle_pose":
"{count} fichiers écrits : le README de référence dans les deux "
"langues, les documents de gouvernance, un conftest.py avec le helper "
"bilingue message(), un workflow de CI et les garde-fous du dépôt.",
"bilingue message(), la CI avec la chaîne de sécurité (zizmor, "
"actionlint, poutine, parité pre-commit, CodeQL), les workflows de "
"release, Scorecard et Plumber qui alimentent les badges du README, "
"Dependabot, CODEOWNERS, les gabarits d'issue et les garde-fous du dépôt.",
"scaffold_licence_posee":
"LICENSE porte CC BY 4.0, la licence de la collection. Remplace le "
"fichier si ton catalogue en emploie une autre : GitHub ne reconnaît "
Expand Down Expand Up @@ -461,6 +467,15 @@
"scaffold_id_invalide":
"« {name} » ne peut pas servir d'identifiant : minuscules, chiffres, "
"point, tiret et souligné seulement.",
"scaffold_github_invalide":
"« {name} » ne peut pas être un propriétaire GitHub : lettres, "
"chiffres et tirets isolés seulement, 39 caractères au plus, sans "
"tiret en tête ni en queue.",
"scaffold_github_a_remplacer":
"Pas de --github : les badges du README et les commandes de RELEASING "
"portent l'emplacement <owner>. Remplace-le par le compte ou "
"l'organisation GitHub qui hébergera {name}, ou recrée le catalogue "
"avec --github <propriétaire>.",
"scaffold_existe_deja":
"{path} existe déjà. Choisis un autre identifiant, ou retire ce "
"répertoire : un squelette n'écrase jamais du travail.",
Expand Down Expand Up @@ -975,6 +990,10 @@
pre-commit, gouvernance et ses propres tests. Il passe
[cyan]validate-structure[/cyan] sans retouche.
[dim]--in <dir>[/dim] Où le créer. Défaut : le répertoire courant.
[dim]--github <owner>[/dim] Propriétaire GitHub du dépôt <owner>/<id>, écrit dans
les cinq badges du README (CI, Scorecard, Plumber,
SLSA 3, licence) et les commandes de RELEASING. Sans
elle, ils portent [bold]<owner>[/bold], à remplacer.
[cyan]new lab <id>[/cyan] Crée un lab conforme, découvert dès le prochain
[cyan]list-labs[/cyan]. Son test [bold]échoue[/bold] tant qu'il n'est pas
écrit : un squelette vert d'emblée apprendrait à noter
Expand Down
Loading