
Linter per immagini container per la sicurezza, aiuta a costruire l'immagine Docker secondo le migliori pratiche, facile da iniziare.
Dockle - Linter per immagini container per la sicurezza, aiuta a costruire l'immagine Docker secondo le migliori pratiche, facile da iniziare
Dockle ti aiuta:
Vedi [Installazione](#installation) e [Esempi comuni](#common-examples)
<img src="https://assets.kitploit.com/production/public/readmes/4137/343598bd4d53296c6d6d23acde8c2917d5727f03e7b3a34c1ff0865c435bb974.png" width="800">
# Confronto dei Checkpoints
<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">
# Indice
- [Caratteristiche](#features)
- [Confronto](#comparison)
- [Installazione](#installation)
- [Homebrew (Mac OS X / Linux e 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)
- [Binario](#binary)
- [asdf](#asdf)
- [mise](#mise)
- [Da sorgente](#from-source)
- [Usa Docker](#use-docker)
- [Guida rapida](#quick-start)
- [Base](#basic)
- [Docker](#docker)
- [Riepilogo Checkpoint](#checkpoint-summary)
- [Esempi comuni](#common-examples)
- [Scansiona un'immagine](#scan-an-image)
- [Scansiona un file immagine](#scan-an-image-file)
- [Ottieni o salva i risultati come JSON](#get-or-save-the-results-as-json)
- [Ottieni o salva i risultati come SARIF](#get-or-save-the-results-as-sarif)
- [Specifica codice di uscita](#specify-exit-code)
- [Specifica livello di uscita](#specify-exit-level)
- [Ignora i checkpoint specificati](#ignore-the-specified-checkpoints)
- [Accetta `variabili d'ambiente` / `file` / `estensioni file` sospetti](#accept-suspicious-environment-variables--files--file-extensions)
- [Rifiuta `variabili d'ambiente` / `file` / `estensioni file` sospetti](#reject-suspicious-environment-variables--files--file-extensions)
- [Integrazione Continua](#continuous-integration-ci)
- [GitHub Action](#github-action)
- [Travis CI](#travis-ci)
- [CircleCI](#circleci)
- [GitLab CI](#gitlab-ci)
- [Autorizzazione per Registry Docker Privato](#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)
- [Registry Self Hosted (BasicAuth)](#self-hosted-registry-basicauth)
- [Contributori](#contributors)
- [Contributori di Codice](#code-contributors)
- [Contributori Finanziari](#financial-contributors)
- [Individui](#individuals)
- [Organizzazioni](#organizations)
- [Licenza](#license)
- [Autore](#author)
# Caratteristiche
- Rileva le vulnerabilità del container
- Aiuta a creare Dockerfile secondo le best practice
- Utilizzo semplice
- Specifica solo il nome dell'immagine
- Vedi [Guida rapida](#quick-start) e [Esempi comuni](#common-examples)
- Supporto CIS Benchmarks
- Alta precisione
- DevSecOps
- Adatto per CI come Travis CI, CircleCI, Jenkins, ecc.
- Vedi [Esempio CI](#continuous-integration-ci)
# Confronto
| | [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) |
|--- |---:|---:|---:|---:|
| Obiettivo | Immagine | Dockerfile | Host<br/>Docker Daemon<br/>Immagine<br/>Runtime Container | Immagine |
| Come eseguirlo | Binario | Binario | ShellScript | Binario |
| Dipendenze | No | No | Alcune dipendenze | No |
| Adatto per CI | ✓ | ✓ | x | x |
| Scopo |Security Audit<br/>Lint Dockerfile| Lint Dockerfile | Security Audit<br/>Lint Dockerfile | Scansione Vulnerabilità |
# Installazione
## Homebrew (Mac OS X / Linux e WSL)
Puoi usare Homebrew su [Mac OS X](https://brew.sh/) o [Linux e 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 può essere installato dall'Arch User Repository utilizzando il pacchetto dockle o 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 }
## Binary
Puoi ottenere l'ultima versione binaria dalla [pagina delle release](https://github.com/goodwithtech/dockle/releases/latest).
Scarica il file di archivio per il tuo sistema operativo/architettura. Estrai l'archivio e metti il binario da qualche parte nel tuo `$PATH` (su sistemi UNIX, `/usr/local/bin` o simili).
- NOTA: assicurati che i bit di esecuzione siano attivi. (`chmod +x dockle`)
## asdf
Puoi installare dockle con il [gestore di versioni asdf](https://asdf-vm.com/) tramite questo [plugin](https://github.com/mathew-fleisch/asdf-dockle), che automatizza il processo di installazione (e passaggio) tra varie versioni dei binari delle release di GitHub. Con asdf già installato, esegui questi comandi per installare 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
Puoi installare dockle con mise, il gestore poliglotta di versioni di strumenti. Con mise già installato, esegui questi comandi per installare dockle:```bash
mise ls-remote dockle
mise install dockle@latest
mise use -g dockle@latest
dockle --version
## Dal sorgente```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
C'è anche un'immagine Dockle su Docker Hub. Puoi provare dockle prima di installare il comando.```
$ 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]
You only need `-v /var/run/docker.sock:/var/run/docker.sock` when you'd like to scan the image on your host machine.
# Quick Start
## Basic
Basta specificare un nome di immagine (e un tag).```bash
$ dockle [YOUR_IMAGE_NAME]
</details>
## Docker
Inoltre, puoi usare Docker per utilizzare il comando `dockle` come segue.```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]
Se desideri scansionare l'immagine sulla tua macchina host, devi montare 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
### Ottieni o Salva i risultati come 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>Risultato</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"
}
}
]
}
]
}
Per impostazione predefinita, Dockle esce con codice 0 anche se ci sono alcuni problemi.
Usa l'opzione --exit-code, -c per uscire con un codice di uscita diverso da zero se vengono trovati avvisi WARN o FATAL.```bash
$ dockle --exit-code 1 [IMAGE_NAME]
### Specify exit level
Per impostazione predefinita, `--exit-code` viene eseguito quando ci sono avvisi di livello `WARN` o `FATAL`. Usa l'opzione `--exit-level, -l` per modificare il livello di avviso. Puoi impostare `info`, `warn` o `fatal`.```bash
$ dockle --exit-code 1 --exit-level info [IMAGE_NAME]
$ dockle --exit-code 1 --exit-level fatal [IMAGE_NAME]
L'opzione --ignore, -i può ignorare i checkpoint specificati.```bash
$ dockle -i CIS-DI-0001 -i DKL-DI-0006 [IMAGE_NAME]
Oppure, usa `DOCKLE_IGNORES`:```
export DOCKLE_IGNORES=CIS-DI-0001,DKL-DI-0006
dockle [IMAGE_NAME]
Oppure, usa il file .dockleignore:```bash
$ cat .dockleignore
CIS-DI-0001
DKL-DI-0006
### Accetta sospette `variabili d'ambiente` / `file` / `estensioni di file````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]
variabili d'ambiente / file / estensioni di file sospetti```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]
## Integrazione Continua (CI)
Puoi scansionare l'immagine costruita con `Dockle` in Travis CI/CircleCI.
In questi esempi, il test fallirà se vengono trovati avvisi.
Tuttavia, puoi ignorare i checkpoint specificati utilizzando il file `.dockleignore`.
Oppure, se vuoi solo visualizzare i risultati e non far fallire il test per questo, imposta `--exit-code` su `0` nel comando `dockle`.
### GitHub Action
Forniamo [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>
- Esempio: https://travis-ci.org/goodwithtech/dockle-ci-test
- Repository: 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>
- Example: https://gitlab.com/tomoyamachi/dockle-ci-test/-/jobs/238215077
- Repository: https://github.com/goodwithtech/dockle-ci-test
## Autorizzazione per il registro Docker privato
`Dockle` può scaricare immagini da un registro privato, senza installare `Docker` o altri strumenti di terze parti. È progettato per facilità d'uso in un processo CI.
Tutto ciò che devi fare è: installare `Dockle` e impostare le variabili d'AMBIENTE.
- NOTA: sconsiglio l'uso di variabili d'ambiente sulla tua macchina locale.
### Docker Hub
Per scaricare il repository privato da Docker Hub, devi impostare le variabili d'ambiente `DOCKLE_AUTH_URL`, `DOCKLE_USERNAME` e `DOCKLE_PASSWORD`.```bash
export DOCKLE_AUTH_URL=https://registry.hub.docker.com
export DOCKLE_USERNAME={DOCKERHUB_USERNAME}
export DOCKLE_PASSWORD={DOCKERHUB_PASSWORD}
| CODICE | DESCRIZIONE | LIVELLO※ |
|---|---|---|
| Checkpoint immagine Docker di CIS | ||
| CIS-DI-0001 | Crea un utente per il container | WARN |
| CIS-DI-0002 | Usa immagini base affidabili per i container | FATAL |
| CIS-DI-0003 | Non installare pacchetti non necessari nel container | FATAL |
| CIS-DI-0004 | Scansiona e ricostruisci le immagini per includere patch di sicurezza | FATAL |
| CIS-DI-0005 | Abilita Content Trust per Docker | INFO |
| CIS-DI-0006 | Aggiungi l'istruzione HEALTHCHECK all'immagine del container | INFO |
| CIS-DI-0007 | Non usare istruzioni update da sole nel Dockerfile | FATAL |
| CIS-DI-0008 | Conferma la sicurezza dei file setuid e setgid | INFO |
| CIS-DI-0009 | Usa COPY invece di ADD nel Dockerfile | FATAL |
| CIS-DI-0010 |
Dockle ha 5 livelli di controllo.
| LIVELLO | DESCRIZIONE |
|---|---|
| FATAL | Sii pratico e prudente |
| WARN | Sii pratico e prudente, ma con usi limitati (anche nelle immagini ufficiali) |
| INFO | Può inibire negativamente l'utilità o le prestazioni |
| SKIP | File di destinazione non trovati |
| PASS | Nessun problema trovato |
Specifica semplicemente un nome immagine (e un tag).```bash $ dockle goodwithtech/test-image:v1
<details>
<summary>Risultato</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 utilizza l'AWS SDK. Non è necessario installare lo strumento CLI aws.
Utilizza le variabili d'ambiente di 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` utilizza Google Cloud SDK. Quindi, non è necessario installare il comando `gcloud`.
Se si desidera utilizzare il repository del progetto di destinazione, è possibile configurarlo tramite `GOOGLE_APPLICATION_CREDENTIAL`.```bash
# must set DOCKLE_USERNAME empty char
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credential.json
Il server BasicAuth necessita di DOCKLE_USERNAME e DOCKLE_PASSWORD.```bash
export DOCKLE_USERNAME={USERNAME}
export DOCKLE_PASSWORD={PASSWORD}
export DOCKLE_NON_SSL=true
## Collaboratori
### Collaboratori del codice
Questo progetto esiste grazie a tutte le persone che contribuiscono. [[Contribuisci](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>
### Collaboratori finanziari
Diventa un collaboratore finanziario e aiutaci a sostenere la nostra comunità. [[Contribuisci](https://opencollective.com/dockle/contribute)]
#### Privati
<a href="https://opencollective.com/dockle"><img src="https://opencollective.com/dockle/individuals.svg?width=890"></a>
#### Organizzazioni
Supporta questo progetto con la tua organizzazione. Il tuo logo apparirà qui con un link al tuo sito web. [[Contribuisci](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>
### Sostenitori dei programmi OSS
Questo progetto utilizza servizi forniti attraverso i seguenti programmi OSS.
<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>
# Licenza
- Apache License 2.0
# Autore
[@tomoyamachi](https://github.com/tomoyamachi) (Tomoya Amachi)
Un ringraziamento speciale a [@knqyf263](https://github.com/knqyf263) (Teppei Fukuda) e [Trivy](https://github.com/knqyf263/trivy)
| Non memorizzare segreti nei Dockerfile |
| FATAL |
| CIS-DI-0011 | Installa solo pacchetti verificati | INFO |
| Checkpoint Dockle per Docker |
| DKL-DI-0001 | Evita il comando sudo | FATAL |
| DKL-DI-0002 | Evita il montaggio di directory sensibili | FATAL |
| DKL-DI-0003 | Evita apt-get dist-upgrade | WARN |
| DKL-DI-0004 | Usa apk add con --no-cache | FATAL |
| DKL-DI-0005 | Pulisci le cache di apt-get | FATAL |
| DKL-DI-0006 | Evita il tag latest | WARN |
| Checkpoint Dockle per Linux |
| DKL-LI-0001 | Evita password vuota | FATAL |
| DKL-LI-0002 | UID/GROUP devono essere unici | FATAL |
| DKL-LI-0003 | Inserisci solo file necessari | INFO |