Table des matières
- 2026:
- 2025:
12 billet(s) pour novembre 2026
| Notes conversion JSON YAML | 2026/11/13 11:16 | Jean-Baptiste |
| Git commit perdu | 2026/11/12 18:16 | Jean-Baptiste |
| Notes mojo lang | 2026/11/11 20:34 | Jean-Baptiste |
| Notes rust lang compilation | 2026/11/11 18:35 | Jean-Baptiste |
| Mémoire VSIZE VMSIZE SEGV lang C | 2026/11/11 15:59 | Jean-Baptiste |
| Ansible-navigator utilisation de ansible-vault | 2026/11/06 11:33 | Jean-Baptiste |
| Err Ansible - Module result deserialization failed No start of json char found | 2026/11/06 09:09 | Jean-Baptiste |
| Script Python conversion JSON vers CSV | 2026/11/06 08:14 | Jean-Baptiste |
| Filter Incoming IPv4 Packets Containing IP Options - cve-2026-98432 mitigation - Kernel TCP Use-After-Free | 2026/11/04 21:04 | Jean-Baptiste |
| Notes ZFS | 2026/11/03 18:04 | Jean-Baptiste |
| Diff image container | 2026/11/03 16:30 | Jean-Baptiste |
| Notes processus multi-thread | 2026/11/03 10:59 | Jean-Baptiste |
CRI runtimes - Container Runtime Interface
Brouillon
Voir :
Voir Docker est mort :
CRI runtimes - Container Runtime Interface
Voir :
https://www.mirantis.com/blog/cri-dockerd-faq-blog/ dockershim and cri-dockerd
mirantis migrate nodes from dockershim
Voir l'option --cri-containerd
Docker does not implement CRI. If you're going to use Docker you need to also install cri-dockerd to translate cri API to docker API.
Plus Docker (Dockershim) support was removed since 1.24 in K8S
https://kubernetes.io/docs/setup/production-environment/container-runtimes/
Mirantis Container Runtime (MCR) is a commercially available container runtime that was formerly known as Docker Enterprise Edition.
CRI-O vs Docker https://www.suse.com/c/fr/podman-et-cri-o-le-nouveau-duo-de-la-conteneurisation/ Podman utilise CRI-O
Podman Podman is a daemonless, open source containerization tool used in lab exercises as a replacement for Docker.
Podman implements CRI-O, while Docker implements “CRI”.
Autres
Isolation MicroVM des containers :
- Kata Container
- Firecracker
https://blog.octo.com/securite-pods-isolation-runtimeclass
https://blog.stephane-robert.info/docs/conteneurs/moteurs-conteneurs/incus/
crun a container runtime written in C (by contrast, runc is written in Go.) firecracker-containerd from AWS, which implements the OCI specification as individual lightweight VMs (and it is also the same technology which powers AWS Lambda) gVisor from Google, which creates containers that have their own kernel. It implements OCI in its runtime called runsc.
krun - crun based OCI runtime using libkrun to run containerized programs in isolated KVM environments
https://vineetcic.medium.com/the-differences-between-docker-containerd-cri-o-and-runc-a93ae4c9fdac
Notes Kubernetes k8s - sécurite
Voir :
- Kube-bench
Containers !
Ensure Containers Do Not Run As Root
Source : https://www.fairwinds.com/blog/kubernetes-basics-tutorial-ensure-containers-do-not-run-as-root
apiVersion: v1 kind: Pod metadata: name: security-context-demo spec: securityContext: runAsNonRoot: true runAsUser: 1000
apiVersion: v1 kind: Pod metadata: name: security-context-demo spec: containers: - name: busybox image: busybox securityContext: runAsNonRoot: true runAsUser: 1000 # allowPrivilegeEscalation: false # privileged: false
If there are no non-root users in the Docker image, you may also need to create one in the Dockerfile, with:
RUN useradd nonroot -u 1000 --user-group # useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
Interdire le host namespace
Comment ?
spec: hostPID: true hostIPC: true hostNetwork: true volumes: - name: host-filesystem hostPath: path: /
Autres
runAsNonRoot: true: Ensures that the container does not run as root. If the image’s default user is root, Kubernetes will refuse to start the pod.runAsUser: 1000&runAsGroup: 3000Forces the container to use a specific non-root user (UID 1000) and group (GID 3000).fsGroup: 2000Ensures that files created in shared volumes have the correct group ownership.- Container Security Settings:
Setting privileged: false,allowPrivilegeEscalation: false, and dropping all capabilities dramatically limits what processes within the container can do.
spec! runAsUser: 0
securityContext: allowPrivilegeEscalation: true
Utiliser
- ServiceAccount
- les RBAC
- mTLS pour les services
- EncryptionConfiguration resource pour les servrets (HashiCorp Vault)
- Sécuriser etcd
- Don't allow pods that run containers with root
- SecurtyPolicy (Open Policy Agent / Kyverno)
Utiliser
- Les NetworkPolicy (par défault tous les noeuds peuvent communiquer avec tous les noeuds Oou ServiceMesh (Side car)
Outils analyse sécu
Voir :
- m9sweeper
Kube bench
Step 1: Download the official job manifest
Clone the kube-bench repo or grab job.yaml from the GitHub releases page.
git clone https://github.com/aquasecurity/kube-bench.git cd kube-bench # ou kubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml
Step 2: Apply the job to your cluster
kubectl apply -f job.yaml
Step 3: Watch the pod until it shows as Completed
kubectl get pods -w
Step 4: Review the results
#kubectl logs -l job-name=kube-bench kubectl logs pod/kube-bench-6zgst
podman run --pid=host -v /etc:/etc:ro -v /var:/var:ro -v $(which kubectl):/usr/local/mount-from-host/bin/kubectl -v ~/.kube:/.kube -e KUBECONFIG=/.kube/config -t docker.io/aquasec/kube-bench:latest run
kubescape
Voir :
Install
kubectl krew update
kubectl krew install kubescape
Scan
kubectl kubescape scan kubescape scan --format html --output results.html
Voir Trivy Scan de vulnérabilité pour les images de conteneurs
Notes - Artifactory - Gestionnaire de dépôt d'objets binaires
upload
curl --fail -u user:'password' --upload-file file.zip 'https:/nexus-repository.claudiosteuernagel.com/repository/my-raw-repo/my-directory/file.zip'
Note : Dans mon cas (avec Artifactory) ça ne marche pas avec l“urlencoding”. Si le mot de passe contient des caractères spéciaux il faut les échapper pour éviter que bash les interprète. Le plus simple étant d'utiliser des guillemets simples.
Notes - git bundle
Transférer une dépôt Git vers une autre machine lorsque les deux machines n'ont pas de connexion directe (AirGap - offline environment)
Voir
We’ll discuss two cases:
Taking a full backup of a repository
Transferring the history of a repository to another machine when the two machines have no direct connection
Exemple de creation de Bundle Git
git bundle create mybundle v1.0.0..master git bundle create mybundle --since=10.days master git bundle create mybundle --all
Note that --all would not include remote-tracking branches… just like ordinary clone wouldn't either. First clone the repository, and include the --mirror option.
git clone --mirror git@example.org:path/repo.git
Then run
cd /opt/plop git bundle create repo.bundle --all git tag -f lastAGbundle master cd /opt/plop git bundle create ~/toAG/RepoName.bundle lastAGbundle..master --all git tag -f lastAGbundle master cd /path/to/AG/clone/location git clone /path/to/AG/bundles/RepoName.bundle -b master cd RepoName git gc # Clears some errors # Optionally, push to other remotes git bundle verify mybundle
Exemple d'importation de Bundle
[remote "origin"] url = /home/me/tmp/file.bundle fetch = refs/heads/*:refs/remotes/origin/*
machineB$ cd R2 machineB$ git pull
Autre
$ git bundle list-heads ../commits.bundle 71b84daaf49abed142a373b6e5c59a22dc6560dc refs/heads/master $ git fetch ../commits.bundle master:other-master From ../commits.bundle * [new branch] master -> other-master
git clone --bundle-uri=https://[cdn]/bundle/gitlab-base.bundle git clone --bundle-uri=https://[cdn]/bundle/gitlab-base.bundle https://gitlab.com/gitlab-org/gitlab-foss.git g2
