
Linter d'image conteneur pour la sécurité, aidant à construire l'image Docker de meilleure pratique, facile à démarrer
Dockle - Linter d'images conteneur pour la sécurité, aidant à construire une image Docker selon les meilleures pratiques, facile à démarrer
Dockle vous aide à :
Voir [Installation](#installation) et [Exemples courants](#common-examples)
<img src="https://assets.kitploit.com/production/public/readmes/4137/343598bd4d53296c6d6d23acde8c2917d5727f03e7b3a34c1ff0865c435bb974.png" width="800">
# Comparaison des points de contrôle
<img src="https://assets.kitploit.com/production/public/readmes/4137/4f4835c3a5fd70f436d9d8ea656fd8a521112fece4e35977288064d3f6f4510a.png" width="800">
<img src="https://assets.kitploit.com/production/public/readmes/4137/7bee9da0b061957af6a175a3b975dca82813c27f72ab6921dfe8ab2d6747322b.png" width="800">
# Table des matières
- [Fonctionnalités](#features)
- [Comparaison](#comparaison)
- [Installation](#installation)
- [Homebrew (Mac OS X / Linux et WSL)](#homebrew-mac-os-x--linux-and-wsl)
- [RHEL/CentOS](#rhelcentos)
- [Debian/Ubuntu](#debianubuntu)
- [Arch Linux](#arch-linux)
- [Windows](#windows)
- [Microsoft PowerShell 7](#microsoft-powershell-7)
- [Binaire](#binary)
- [asdf](#asdf)
- [mise](#mise)
- [Depuis les sources](#from-source)
- [Utiliser Docker](#use-docker)
- [Démarrage rapide](#quick-start)
- [De base](#basic)
- [Docker](#docker)
- [Récapitulatif des points de contrôle](#checkpoint-summary)
- [Exemples courants](#common-examples)
- [Analyser une image](#scan-an-image)
- [Analyser un fichier image](#scan-an-image-file)
- [Obtenir ou enregistrer les résultats au format JSON](#get-or-save-the-results-as-json)
- [Obtenir ou enregistrer les résultats au format SARIF](#get-or-save-the-results-as-sarif)
- [Spécifier le code de sortie](#specify-exit-code)
- [Spécifier le niveau de sortie](#specify-exit-level)
- [Ignorer les points de contrôle spécifiés](#ignore-the-specified-checkpoints)
- [Accepter les `environment variables` / `files` / `file extensions` suspects](#accept-suspicious-environment-variables--files--file-extensions)
- [Rejeter les `environment variables` / `files` / `file extensions` suspects](#reject-suspicious-environment-variables--files--file-extensions)
- [Intégration continue](#continuous-integration-ci)
- [GitHub Action](#github-action)
- [Travis CI](#travis-ci)
- [CircleCI](#circleci)
- [GitLab CI](#gitlab-ci)
- [Autorisation pour un registre Docker privé](#authorization-for-private-docker-registry)
- [Docker Hub](#docker-hub)
- [Amazon ECR (Elastic Container Registry)](#amazon-ecr-elastic-container-registry)
- [GCR (Google Container Registry)](#gcr-google-container-registry)
- [Registre auto-hébergé (BasicAuth)](#self-hosted-registry-basicauth)
- [Contributeurs](#contributors)
- [Contributeurs de code](#code-contributors)
- [Contributeurs financiers](#financial-contributors)
- [Particuliers](#individuals)
- [Organisations](#organizations)
- [Licence](#license)
- [Auteur](#author)
# Fonctionnalités
- Détecter les vulnérabilités des conteneurs
- Aider à construire un Dockerfile selon les bonnes pratiques
- Utilisation simple
- Spécifiez uniquement le nom de l'image
- Voir [Démarrage rapide](#quick-start) et [Exemples courants](#common-examples)
- Prise en charge des benchmarks CIS
- Haute précision
- DevSecOps
- Adapté à l'intégration continue comme Travis CI, CircleCI, Jenkins, etc.
- Voir [Exemple d’intégration continue](#continuous-integration-ci)
# Comparaison
| | [Dockle](https://github.com/goodwithtech/dockle) | [Hadolint](https://github.com/hadolint/hadolint) | [Docker Bench for Security](https://github.com/docker/docker-bench-security) | [Clair](https://github.com/coreos/clair) |
|--- |---:|---:|---:|---:|
| Cible | Image | Dockerfile | Hôte<br/>Docker Daemon<br/>Image<br/>Runtime conteneur | Image |
| Exécution | Binaire | Binaire | Script shell | Binaire |
| Dépendance | Non | Non | Quelques dépendances | Non |
| Adapté à l'IC | ✓ | ✓ | x | x |
| Objectif | Audit de sécurité<br/>Lint Dockerfile | Lint Dockerfile | Audit de sécurité<br/>Lint Dockerfile | Analyse de vulnérabilités |
# Installation
## Homebrew (Mac OS X / Linux et WSL)
Vous pouvez utiliser Homebrew sur [Mac OS X](https://brew.sh/) ou [Linux et WSL (Windows Subsystem for Linux)](https://docs.brew.sh/Homebrew-on-Linux).```bash
$ brew install goodwithtech/r/dockle
VERSION=$(
curl --silent "https://api.github.com/repos/goodwithtech/dockle/releases/latest" |
grep '"tag_name":' |
sed -E 's/."v([^"]+)"./\1/'
) && rpm -ivh https://github.com/goodwithtech/dockle/releases/download/v${VERSION}/dockle_${VERSION}_Linux-64bit.rpm
## Debian/Ubuntu```bash
VERSION=$(
curl --silent "https://api.github.com/repos/goodwithtech/dockle/releases/latest" | \
grep '"tag_name":' | \
sed -E 's/.*"v([^"]+)".*/\1/' \
) && curl -L -o dockle.deb https://github.com/goodwithtech/dockle/releases/download/v${VERSION}/dockle_${VERSION}_Linux-64bit.deb
$ sudo dpkg -i dockle.deb && rm dockle.deb
dockle peut être installé depuis l'Arch User Repository en utilisant le paquet dockle ou dockle-bin.```
git clone https://aur.archlinux.org/dockle-bin.git
cd dockle-bin
makepkg -sri
## Windows```bash
VERSION=$(
curl --silent "https://api.github.com/repos/goodwithtech/dockle/releases/latest" | \
grep '"tag_name":' | \
sed -E 's/.*"v([^"]+)".*/\1/' \
) && curl -L -o dockle.zip https://github.com/goodwithtech/dockle/releases/download/v${VERSION}/dockle_${VERSION}_Windows-64bit.zip
$ unzip dockle.zip && rm dockle.zip
$ ./dockle.exe [IMAGE_NAME]
if (((Invoke-WebRequest "https://api.github.com/repos/goodwithtech/dockle/releases/latest").Content) -match '"tag_name":"v(?[^"]+)"') { $VERSION=$Matches.ver && Invoke-WebRequest "https://github.com/goodwithtech/dockle/releases/download/v${VERSION}/dockle_${VERSION}_Windows-64bit.zip" -OutFile dockle.zip && Expand-Archive dockle.zip && Remove-Item dockle.zip }
## Binaire
Vous pouvez obtenir la dernière version binaire depuis la [page des versions](https://github.com/goodwithtech/dockle/releases/latest).
Téléchargez le fichier d'archive pour votre système d'exploitation/architecture. Décompressez l'archive et placez le binaire quelque part dans votre `$PATH` (sur les systèmes de type UNIX, `/usr/local/bin` ou équivalent).
- NOTE : Assurez-vous que les bits d'exécution sont activés. (`chmod +x dockle`)
## asdf
Vous pouvez installer dockle avec le [gestionnaire de versions asdf](https://asdf-vm.com/) via ce [plugin](https://github.com/mathew-fleisch/asdf-dockle), qui automatise le processus d'installation (et de changement) de diverses versions des binaires des versions GitHub. Avec asdf déjà installé, exécutez ces commandes pour installer dockle :```bash
# Add dockle plugin
asdf plugin add dockle
# Show all installable versions
asdf list-all dockle
# Install specific version
asdf install dockle latest
# Set a version globally (on your ~/.tool-versions file)
asdf global dockle latest
# Now dockle commands are available
dockle --version
Vous pouvez installer dockle avec mise, le gestionnaire de versions d'outils polyglotte. Avec mise déjà installé, exécutez ces commandes pour installer dockle :```bash
mise ls-remote dockle
mise install dockle@latest
mise use -g dockle@latest
dockle --version
## Depuis la source```bash
$ GO111MODULE=off go get github.com/goodwithtech/dockle/cmd/dockle
$ cd $GOPATH/src/github.com/goodwithtech/dockle && GO111MODULE=on go build -o $GOPATH/bin/dockle cmd/dockle/main.go
Il y a aussi une image Dockle sur Docker Hub. Vous pouvez essayer dockle avant d'installer la commande.```
$ VERSION=$(
curl --silent "https://api.github.com/repos/goodwithtech/dockle/releases/latest" |
grep '"tag_name":' |
sed -E 's/."v([^"]+)"./\1/'
) && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock
goodwithtech/dockle:v${VERSION} [YOUR_IMAGE_NAME]
Vous n'avez besoin que de `-v /var/run/docker.sock:/var/run/docker.sock` lorsque vous souhaitez analyser l'image sur votre machine hôte.
# Démarrage rapide
## Basique
Spécifiez simplement un nom d'image (et un tag).```bash
$ dockle [YOUR_IMAGE_NAME]
</details>
## Docker
De plus, vous pouvez utiliser Docker pour utiliser la commande `dockle` comme suit.```bash
$ export DOCKLE_LATEST=$(
curl --silent "https://api.github.com/repos/goodwithtech/dockle/releases/latest" | \
grep '"tag_name":' | \
sed -E 's/.*"v([^"]+)".*/\1/' \
)
$ docker run --rm goodwithtech/dockle:v${DOCKLE_LATEST} [YOUR_IMAGE_NAME]
Si vous souhaitez analyser l'image sur votre machine hôte, vous devez monter docker.sock.
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ...
$ docker save alpine:latest -o alpine.tar $ dockle --input alpine.tar
### Obtenir ou enregistrer les résultats au format JSON```bash
$ dockle -f json goodwithtech/test-image:v1
$ dockle -f json -o results.json goodwithtech/test-image:v1
$ dockle -f sarif goodwithtech/test-image:v1 $ dockle -f sarif -o results.json goodwithtech/test-image:v1
<details>
<summary>Résultat</summary>```json
{
"version": "2.1.0",
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"runs": [
{
"tool": {
"driver": {
"name": "Dockle",
"informationUri": "https://github.com/goodwithtech/dockle",
"rules": [
{
"id": "CIS-DI-0009",
"shortDescription": {
"text": "Use COPY instead of ADD in Dockerfile"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#CIS-DI-0009"
}
},
{
"id": "CIS-DI-0010",
"shortDescription": {
"text": "Do not store credential in ENVIRONMENT vars/files"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#CIS-DI-0010"
}
},
{
"id": "DKL-DI-0005",
"shortDescription": {
"text": "Clear apt-get caches"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#DKL-DI-0005"
}
},
{
"id": "DKL-LI-0001",
"shortDescription": {
"text": "Avoid empty password"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#DKL-LI-0001"
}
},
{
"id": "CIS-DI-0005",
"shortDescription": {
"text": "Enable Content trust for Docker"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#CIS-DI-0005"
}
},
{
"id": "CIS-DI-0008",
"shortDescription": {
"text": "Confirm safety of setuid/setgid files"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#CIS-DI-0008"
}
},
{
"id": "CIS-DI-0001",
"shortDescription": {
"text": "Create a user for the container"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#CIS-DI-0001"
}
},
{
"id": "CIS-DI-0006",
"shortDescription": {
"text": "Add HEALTHCHECK instruction to the container image"
},
"help": {
"text": "https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#CIS-DI-0006"
}
}
]
}
},
"results": [
{
"ruleId": "CIS-DI-0009",
"level": "error",
"message": {
"text": "Use COPY : /bin/sh -c #(nop) ADD file:81c0a803075715d1a6b4f75a29f8a01b21cc170cfc1bff6702317d1be2fe71a3 in /app/credentials.json "
}
},
{
"ruleId": "CIS-DI-0010",
"level": "error",
"message": {
"text": "Suspicious filename found : app/credentials.json , Suspicious ENV key found : MYSQL_PASSWD"
}
},
{
"ruleId": "DKL-DI-0005",
"level": "error",
"message": {
"text": "Use 'rm -rf /var/lib/apt/lists' after 'apt-get install' : /bin/sh -c apt-get update \u0026\u0026 apt-get install -y git"
}
},
{
"ruleId": "DKL-LI-0001",
"level": "error",
"message": {
"text": "No password user found! username : nopasswd"
}
},
{
"ruleId": "CIS-DI-0005",
"level": "note",
"message": {
"text": "export DOCKER_CONTENT_TRUST=1 before docker pull/build"
}
},
{
"ruleId": "CIS-DI-0008",
"level": "note",
"message": {
"text": "setuid file: urwxr-xr-x usr/bin/newgrp, setgid file: grwxr-xr-x usr/bin/ssh-agent, setgid file: grwxr-xr-x usr/bin/expiry, setuid file: urwxr-xr-x usr/lib/openssh/ssh-keysign, setuid file: urwxr-xr-x bin/umount, setgid file: grwxr-xr-x usr/bin/chage, setuid file: urwxr-xr-x usr/bin/passwd, setgid file: grwxr-xr-x sbin/unix_chkpwd, setuid file: urwxr-xr-x usr/bin/chsh, setgid file: grwxr-xr-x usr/bin/wall, setuid file: urwxr-xr-x bin/ping, setuid file: urwxr-xr-x bin/su, setuid file: urwxr-xr-x usr/bin/chfn, setuid file: urwxr-xr-x usr/bin/gpasswd, setuid file: urwxr-xr-x bin/mount"
}
},
{
"ruleId": "CIS-DI-0001",
"level": "none",
"message": {
"text": "Last user should not be root"
}
},
{
"ruleId": "CIS-DI-0006",
"level": "none",
"message": {
"text": "not found HEALTHCHECK statement"
}
}
]
}
]
}
Par défaut, Dockle se termine avec le code 0 même s'il y a des problèmes.
Utilisez l'option --exit-code, -c pour quitter avec un code de sortie non nul si des alertes WARN ou FATAL ont été trouvées.```bash
$ dockle --exit-code 1 [IMAGE_NAME]
### Spécifier le niveau de sortie
Par défaut, `--exit-code` s'exécute lorsqu'il y a des alertes de niveau `WARN` ou `FATAL`.
Utilisez l'option `--exit-level, -l` pour changer le niveau d'alerte. Vous pouvez définir `info`, `warn` ou `fatal`.```bash
$ dockle --exit-code 1 --exit-level info [IMAGE_NAME]
$ dockle --exit-code 1 --exit-level fatal [IMAGE_NAME]
L'option --ignore, -i peut ignorer les points de contrôle spécifiés.```bash
$ dockle -i CIS-DI-0001 -i DKL-DI-0006 [IMAGE_NAME]
Ou, utilisez `DOCKLE_IGNORES` :```
export DOCKLE_IGNORES=CIS-DI-0001,DKL-DI-0006
dockle [IMAGE_NAME]
Ou, utilisez le fichier .dockleignore :```bash
$ cat .dockleignore
CIS-DI-0001
DKL-DI-0006
### Accepter les `variables d'environnement` / `fichiers` / `extensions de fichier` suspects```bash
# --accept-key value, --ak value You can add acceptable keywords.
dockle -ak GPG_KEY -ak KEYCLOAK_VERSION [IMAGE_NAME]
or DOCKLE_ACCEPT_KEYS=GPG_KEY,KEYCLOAK_VERSION dockle [IMAGE_NAME]
# --accept-file value, --af value You can add acceptable file names.
dockle -af id_rsa -af id_dsa [IMAGE_NAME]
or DOCKLE_ACCEPT_FILES=id_rsa,id_dsa dockle [IMAGE_NAME]
# --accept-file-extension value, --ae value You can add acceptable file extensions.
dockle -ae pem -ae log [IMAGE_NAME]
or DOCKLE_ACCEPT_FILE_EXTENSIONS=pem,log dockle [IMAGE_NAME]
environment variables / files / `file extensions````bashdockle -sw PRIVATE [IMAGE_NAME] or DOCKLE_ACCEPT_KEYS=GPG_KEY,KEYCLOAK_VERSION dockle [IMAGE_NAME]
dockle -sf .env [IMAGE_NAME] or DOCKLE_REJECT_FILES=.env dockle [IMAGE_NAME]
dockle -se pfx [IMAGE_NAME] or DOCKLE_REJECT_FILE_EXTENSIONS=pfx dockle [IMAGE_NAME]
## Intégration Continue (CI)
Vous pouvez analyser votre image construite avec `Dockle` dans Travis CI/CircleCI.
Dans ces exemples, le test échouera si des avertissements sont trouvés.
Cependant, vous pouvez ignorer les points de contrôle cibles spécifiés en utilisant le fichier `.dockleignore`.
Ou, si vous voulez simplement afficher les résultats sans faire échouer le test pour cela, spécifiez `--exit-code` à `0` dans la commande `dockle`.
### GitHub Action
Nous fournissons [goodwithtech/dockle-action](https://github.com/goodwithtech/dockle-action).```yaml
- uses: goodwithtech/dockle-action@main
with:
image: 'target'
format: 'list'
exit-code: '1'
exit-level: 'warn'
ignore: 'CIS-DI-0001,DKL-DI-0006'
env: global: - COMMIT=${TRAVIS_COMMIT::8}
before_install:
</details>
- Exemple : https://travis-ci.org/goodwithtech/dockle-ci-test
- Dépôt : https://github.com/goodwithtech/dockle-ci-test
### CircleCI
<details>
<summary>.circleci/config.yml</summary>```yaml
jobs:
build:
docker:
- image: docker:18.09-git
steps:
- checkout
- setup_remote_docker
- run:
name: Build image
command: docker build -t dockle-ci-test:${CIRCLE_SHA1} .
- run:
name: Install dockle
command: |
apk add --update curl
VERSION=$(
curl --silent "https://api.github.com/repos/goodwithtech/dockle/releases/latest" | \
grep '"tag_name":' | \
sed -E 's/.*"v([^"]+)".*/\1/'
)
wget https://github.com/goodwithtech/dockle/releases/download/v${VERSION}/dockle_${VERSION}_Linux-64bit.tar.gz
tar zxvf dockle_${VERSION}_Linux-64bit.tar.gz
mv dockle /usr/local/bin
- run:
name: Scan the local image with dockle
command: dockle --exit-code 1 dockle-ci-test:${CIRCLE_SHA1}
workflows:
version: 2
release:
jobs:
- build
variables: DOCKER_HOST: tcp://docker:2375/ DOCKER_DRIVER: overlay2 services:
unit_test:
stage: test
before_script:
- apk -Uuv add bash git curl tar sed grep
script:
- docker build -t dockle-ci-test:${CI_COMMIT_SHORT_SHA} .
- |
VERSION=$(
curl --silent "https://api.github.com/repos/goodwithtech/dockle/releases/latest" |
grep '"tag_name":' |
sed -E 's/."v([^"]+)"./\1/'
) && curl -L -o dockle.tar.gz https://github.com/goodwithtech/dockle/releases/download/v${VERSION}/dockle_${VERSION}_Linux-64bit.tar.gz &&
tar zxvf dockle.tar.gz
- ./dockle --exit-code 1 dockle-ci-test:${CI_COMMIT_SHORT_SHA}
</details>
- Exemple : https://gitlab.com/tomoyamachi/dockle-ci-test/-/jobs/238215077
- Dépôt : https://github.com/goodwithtech/dockle-ci-test
## Autorisation pour un registre Docker privé
`Dockle` peut télécharger des images à partir d'un registre privé, sans installer `Docker` ni aucun autre outil tiers. Il est conçu ainsi pour une utilisation facile dans un processus CI.
Tout ce que vous avez à faire est : installer `Dockle` et définir les variables d'ENVIRONNEMENT.
- REMARQUE : Je ne recommande pas d'utiliser les variables d'environnement sur votre machine locale.
### Docker Hub
Pour télécharger le dépôt privé depuis Docker Hub, vous devez définir les variables d'environnement `DOCKLE_AUTH_URL`, `DOCKLE_USERNAME` et `DOCKLE_PASSWORD`.```bash
export DOCKLE_AUTH_URL=https://registry.hub.docker.com
export DOCKLE_USERNAME={DOCKERHUB_USERNAME}
export DOCKLE_PASSWORD={DOCKERHUB_PASSWORD}
| CODE | DESCRIPTION | NIVEAU※ |
|---|---|---|
| Points de contrôle des images Docker CIS | ||
| CIS-DI-0001 | Créer un utilisateur pour le conteneur | AVERTISSEMENT |
| CIS-DI-0002 | Utiliser des images de base de confiance pour les conteneurs | FATAL |
| CIS-DI-0003 | Ne pas installer de paquets inutiles dans le conteneur | FATAL |
| CIS-DI-0004 | Analyser et reconstruire les images pour inclure les correctifs de sécurité | FATAL |
| CIS-DI-0005 | Activer la confiance de contenu pour Docker | INFO |
| CIS-DI-0006 | Ajouter l'instruction HEALTHCHECK à l'image du conteneur | INFO |
| CIS-DI-0007 | Ne pas utiliser l'instruction update seule dans le Dockerfile | FATAL |
| CIS-DI-0008 | Vérifier la sécurité des fichiers setuid et setgid | INFO |
| CIS-DI-0009 | Utiliser COPY au lieu de ADD dans le Dockerfile | FATAL |
| CIS-DI-0010 |
Dockle comporte 5 niveaux de vérification.
| NIVEAU | DESCRIPTION |
|---|---|
| FATAL | Être pratique et prudent |
| AVERTISSEMENT | Être pratique et prudent, mais avec des utilisations limitées (même pour les images officielles) |
| INFO | Peut nuire négativement à l'utilité ou aux performances |
| SKIP | Fichiers cibles non trouvés |
| PASS | Aucun problème trouvé |
Spécifiez simplement un nom d'image (et un tag).```bash $ dockle goodwithtech/test-image:v1
<details>
<summary>Résultat</summary>```
FATAL - CIS-DI-0001: Create a user for the container
* Last user should not be root
WARN - CIS-DI-0005: Enable Content trust for Docker
* export DOCKER_CONTENT_TRUST=1 before docker pull/build
FATAL - CIS-DI-0006: Add HEALTHCHECK instruction to the container image
* not found HEALTHCHECK statement
FATAL - CIS-DI-0007: Do not use update instructions alone in the Dockerfile
* Use 'Always combine RUN 'apt-get update' with 'apt-get install' : /bin/sh -c apt-get update && apt-get install -y git
FATAL - CIS-DI-0008: Remove setuid and setgid permissions in the images
* Found setuid file: etc/passwd grw-r--r--
* Found setuid file: usr/lib/openssh/ssh-keysign urwxr-xr-x
* Found setuid file: app/hoge.txt ugrw-r--r--
* Found setuid file: app/hoge.txt ugrw-r--r--
* Found setuid file: etc/shadow urw-r-----
FATAL - CIS-DI-0009: Use COPY instead of ADD in Dockerfile
* Use COPY : /bin/sh -c #(nop) ADD file:81c0a803075715d1a6b4f75a29f8a01b21cc170cfc1bff6702317d1be2fe71a3 in /app/credentials.json
FATAL - CIS-DI-0010: Do not store secrets in ENVIRONMENT variables
* Suspicious ENV key found : MYSQL_PASSWD
FATAL - CIS-DI-0010: Do not store secret files
* Suspicious filename found : app/credentials.json
PASS - DKL-DI-0001: Avoid sudo command
FATAL - DKL-DI-0002: Avoid sensitive directory mounting
* Avoid mounting sensitive dirs : /usr
PASS - DKL-DI-0003: Avoid apt-get/apk/dist-upgrade
PASS - DKL-DI-0004: Use apk add with --no-cache
FATAL - DKL-DI-0005: Clear apt-get caches
* Use 'apt-get clean && rm -rf /var/lib/apt/lists/*' : /bin/sh -c apt-get update && apt-get install -y git
PASS - DKL-DI-0006: Avoid latest tag
FATAL - DKL-LI-0001: Avoid empty password
* No password user found! username : nopasswd
PASS - DKL-LI-0002: Be unique UID
PASS - DKL-LI-0002: Be unique GROUP
Dockle utilise le SDK AWS. Vous n'avez pas besoin d'installer l'outil en ligne de commande aws.
Utilisez les variables d'environnement d'AWS CLI.```bash export AWS_ACCESS_KEY_ID={AWS ACCESS KEY} export AWS_SECRET_ACCESS_KEY={SECRET KEY} export AWS_DEFAULT_REGION={AWS REGION}
### GCR (Google Container Registry)
`Dockle` utilise le Google Cloud SDK. Donc, vous n'avez pas besoin d'installer la commande `gcloud`.
Si vous souhaitez utiliser le dépôt du projet cible, vous pouvez configurer via `GOOGLE_APPLICATION_CREDENTIAL`.```bash
# must set DOCKLE_USERNAME empty char
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credential.json
Le serveur BasicAuth nécessite DOCKLE_USERNAME et DOCKLE_PASSWORD.```bash
export DOCKLE_USERNAME={USERNAME}
export DOCKLE_PASSWORD={PASSWORD}
export DOCKLE_NON_SSL=true
## Contributeurs
### Contributeurs au code
Ce projet existe grâce à toutes les personnes qui contribuent. [[Contribuer](https://github.com/goodwithtech/dockle/blob/HEAD/CONTRIBUTING.md)].
<a href="https://github.com/goodwithtech/dockle/graphs/contributors"><img src="https://opencollective.com/dockle/contributors.svg?width=890&button=false" /></a>
### Contributeurs financiers
Devenez un contributeur financier et aidez-nous à soutenir notre communauté. [[Contribuer](https://opencollective.com/dockle/contribute)]
#### Particuliers
<a href="https://opencollective.com/dockle"><img src="https://opencollective.com/dockle/individuals.svg?width=890"></a>
#### Organisations
Soutenez ce projet avec votre organisation. Votre logo apparaîtra ici avec un lien vers votre site web. [[Contribuer](https://opencollective.com/dockle/contribute)]
<a href="https://www.tines.com/?utm_source=oss&utm_medium=sponsorship&utm_campaign=dockle"><img src="https://assets.kitploit.com/production/public/readmes/4137/e063c5948228b346da42565b27ee62f2dd85648c0de86a2b184c7f111319d275.png"></a>
<a href="https://opencollective.com/dockle/organization/1/website"><img src="https://opencollective.com/dockle/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/2/website"><img src="https://opencollective.com/dockle/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/3/website"><img src="https://opencollective.com/dockle/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/4/website"><img src="https://opencollective.com/dockle/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/5/website"><img src="https://opencollective.com/dockle/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/6/website"><img src="https://opencollective.com/dockle/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/7/website"><img src="https://opencollective.com/dockle/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/8/website"><img src="https://opencollective.com/dockle/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/dockle/organization/9/website"><img src="https://opencollective.com/dockle/organization/9/avatar.svg"></a>
### Supporteurs de programmes OSS
Ce projet utilise des services fournis par les programmes OSS suivants.
<a href="https://flatt.tech/oss/gmo/trampoline" target="_blank"><img src="https://flatt.tech/assets/images/badges/gmo-oss.svg" height="24px"/></a>
<a href="https://github.com/1Password/for-open-source" target="_blank"><img src="https://img.shields.io/badge/1Password-OSS%20Program-0094F5?logo=1password&logoColor=white" height="24px"/></a>
# Licence
- Licence Apache 2.0
# Auteur
- [@tomoyamachi](https://github.com/tomoyamachi) (Tomoya Amachi)
Remerciements spéciaux à [@knqyf263](https://github.com/knqyf263) (Teppei Fukuda) et [Trivy](https://github.com/knqyf263/trivy)
| Ne pas stocker de secrets dans les Dockerfiles |
| FATAL |
| CIS-DI-0011 | Installer uniquement des paquets vérifiés | INFO |
| Points de contrôle Dockle pour Docker |
| DKL-DI-0001 | Éviter la commande sudo | FATAL |
| DKL-DI-0002 | Éviter le montage de répertoires sensibles | FATAL |
| DKL-DI-0003 | Éviter apt-get dist-upgrade | AVERTISSEMENT |
| DKL-DI-0004 | Utiliser apk add avec --no-cache | FATAL |
| DKL-DI-0005 | Vider les caches d'apt-get | FATAL |
| DKL-DI-0006 | Éviter le tag latest | AVERTISSEMENT |
| Points de contrôle Dockle pour Linux |
| DKL-LI-0001 | Éviter les mots de passe vides | FATAL |
| DKL-LI-0002 | Utiliser des UID/GROUPES uniques | FATAL |
| DKL-LI-0003 | Ne mettre que les fichiers nécessaires | INFO |