LXC container support without LXD (#552)
* LXC container support without LXD * Fix: LXC required root privilege * Update README
This commit is contained in:
35
README.md
35
README.md
@@ -81,9 +81,10 @@ Table of Contents
|
||||
* [Example: Scan specific servers](#example-scan-specific-servers)
|
||||
* [Example: Scan via shell instead of SSH.](#example-scan-via-shell-instead-of-ssh)
|
||||
* [cron](#cron)
|
||||
* [Example: Scan containers (Docker/LXD)](#example-scan-containers-dockerlxd)
|
||||
* [Example: Scan containers (Docker/LXD/LXC)](#example-scan-containers-dockerlxdlxc)
|
||||
* [Docker](#docker)
|
||||
* [LXD](#lxd)
|
||||
* [LXC](#lxc)
|
||||
* [Usage: Report](#usage-report)
|
||||
* [How to read a report](#how-to-read-a-report)
|
||||
* [Example](#example-1)
|
||||
@@ -747,7 +748,7 @@ host = "172.31.4.82"
|
||||
# ["key", "value"],
|
||||
#]
|
||||
#[servers.172-31-4-82.containers]
|
||||
#type = "lxd" # or "docker"
|
||||
#type = "lxd" # or "docker" or "lxc"
|
||||
#includes = ["${running}"]
|
||||
#excludes = ["container_name", "container_id"]
|
||||
```
|
||||
@@ -852,7 +853,7 @@ You can customize your configuration using this template.
|
||||
# ["key", "value"],
|
||||
#]
|
||||
#[servers.172-31-4-82.containers]
|
||||
#type = "lxd" # or "docker"
|
||||
#type = "lxd" # or "docker" or "lxc"
|
||||
#includes = ["${running}"]
|
||||
#excludes = ["container_name", "container_id"]
|
||||
```
|
||||
@@ -867,7 +868,7 @@ You can customize your configuration using this template.
|
||||
- cpeNames: see [Usage: Scan vulnerability of non-OS package](#usage-scan-vulnerability-of-non-os-package)
|
||||
- ignoreCves: CVE IDs that will not be reported. But output to JSON file.
|
||||
- optional: Add additional information to JSON report.
|
||||
- containers: see [Example: Scan containers (Docker/LXD)(#example-scan-containers-dockerlxd)
|
||||
- containers: see [Example: Scan containers (Docker/LXD/LXC)(#example-scan-containers-dockerlxdlxc)
|
||||
|
||||
Vuls supports two types of SSH. One is external command. The other is native go implementation. For details, see [-ssh-native-insecure option](#-ssh-native-insecure-option)
|
||||
|
||||
@@ -1108,7 +1109,7 @@ If you use local scan mode for cron jobs, don't forget to add below line to `/et
|
||||
Defaults:vuls !requiretty
|
||||
```
|
||||
|
||||
## Example: Scan containers (Docker/LXD)
|
||||
## Example: Scan containers (Docker/LXD/LXC)
|
||||
|
||||
It is common that keep containers running without SSHd daemon.
|
||||
see [Docker Blog:Why you don't need to run SSHd in your Docker containers](https://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/)
|
||||
@@ -1182,6 +1183,30 @@ type = "lxd"
|
||||
includes = ["${running}"]
|
||||
```
|
||||
|
||||
### LXC
|
||||
|
||||
Vuls scans lxc via `lxc-attach` instead of SSH.
|
||||
```
|
||||
[servers]
|
||||
|
||||
[servers.172-31-4-82]
|
||||
host = "172.31.4.82"
|
||||
user = "ec2-user"
|
||||
keyPath = "/home/username/.ssh/id_rsa"
|
||||
|
||||
[servers.172-31-4-82.containers]
|
||||
type = "lxc"
|
||||
includes = ["${running}"]
|
||||
```
|
||||
|
||||
LXC required root privilege.
|
||||
|
||||
Example of /etc/sudoers on target servers
|
||||
|
||||
```
|
||||
vuls ALL=(ALL) NOPASSWD:/usr/bin/lxc-attach -n *, /usr/bin/lxc-ls *
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
# Usage: Report
|
||||
|
||||
Reference in New Issue
Block a user