Skip to content

Instantly share code, notes, and snippets.

@deadlysyn
Last active October 13, 2020 03:04
Show Gist options
  • Save deadlysyn/ff3c13c6acb6e9f4182e180b4ff8a6cf to your computer and use it in GitHub Desktop.
Save deadlysyn/ff3c13c6acb6e9f4182e180b4ff8a6cf to your computer and use it in GitHub Desktop.
ahab docker failure
❯ go test -timeout 20m -run TestDockerIntegration ./...
? github.com/sonatype-nexus-community/ahab [no test files]
? github.com/sonatype-nexus-community/ahab/audit [no test files]
? github.com/sonatype-nexus-community/ahab/buildversion [no test files]
? github.com/sonatype-nexus-community/ahab/cmd [no test files]
[SETUP]
Output 2: 0
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
Error: exit status 1
Output 1: 1
--- FAIL: TestDockerIntegration (333.00s)
--- FAIL: TestDockerIntegration/docker (333.00s)
--- FAIL: TestDockerIntegration/docker/yum (18.71s)
docker_test.go:49: >>>>>>>>>>>>>> yum: Started
docker_test.go:50: >>>>>>>>>>>>>> yum: yum/Dockerfile
docker_test.go:52: >>>>>>>>>>>>>> yum: Sending build context to Docker daemon 12.15MB
Step 1/7 : FROM centos:latest
---> 0d120b6ccaa8
Step 2/7 : WORKDIR /ahab-docker
---> Running in a4d6a3194bb7
Removing intermediate container a4d6a3194bb7
---> fa17b9ade279
Step 3/7 : RUN yum -y install epel-release python3-pip
---> Running in 42f100f9695e
CentOS-8 - AppStream 1.4 MB/s | 5.8 MB 00:04
CentOS-8 - Base 2.5 MB/s | 2.2 MB 00:00
CentOS-8 - Extras 2.3 kB/s | 8.1 kB 00:03
Dependencies resolved.
================================================================================
Package Arch Version Repo Size
================================================================================
Installing:
epel-release noarch 8-8.el8 extras 23 k
python3-pip noarch 9.0.3-16.el8 AppStream 19 k
Installing dependencies:
platform-python-pip noarch 9.0.3-16.el8 BaseOS 1.8 M
python3-setuptools noarch 39.2.0-5.el8 BaseOS 162 k
python36 x86_64 3.6.8-2.module_el8.1.0+245+c39af44f AppStream 19 k
Enabling module streams:
python36 3.6 Transaction Summary
================================================================================
Install 5 Packages
Total download size: 2.1 M
Installed size: 7.9 M
Downloading Packages:
(1/5): python3-pip-9.0.3-16.el8.noarch.rpm 52 kB/s | 19 kB 00:00
(2/5): python36-3.6.8-2.module_el8.1.0+245+c39a 42 kB/s | 19 kB 00:00
(3/5): python3-setuptools-39.2.0-5.el8.noarch.r 140 kB/s | 162 kB 00:01
(4/5): platform-python-pip-9.0.3-16.el8.noarch. 1.0 MB/s | 1.8 MB 00:01
(5/5): epel-release-8-8.el8.noarch.rpm 15 kB/s | 23 kB 00:01
--------------------------------------------------------------------------------
Total 753 kB/s | 2.1 MB 00:02
warning: /var/cache/dnf/AppStream-02e86d1c976ab532/packages/python3-pip-9.0.3-16.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS-8 - AppStream 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x8483C65D:
Userid : "CentOS (CentOS Official Signing Key) <security@centos.org>"
Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-setuptools-39.2.0-5.el8.noarch 1/5
Installing : platform-python-pip-9.0.3-16.el8.noarch 2/5
Installing : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 3/5
Running scriptlet: python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 3/5
Installing : python3-pip-9.0.3-16.el8.noarch 4/5
Installing : epel-release-8-8.el8.noarch 5/5
Running scriptlet: epel-release-8-8.el8.noarch 5/5
Verifying : python3-pip-9.0.3-16.el8.noarch 1/5
Verifying : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 2/5
Verifying : platform-python-pip-9.0.3-16.el8.noarch 3/5
Verifying : python3-setuptools-39.2.0-5.el8.noarch 4/5
Verifying : epel-release-8-8.el8.noarch 5/5
Installed:
epel-release-8-8.el8.noarch platform-python-pip-9.0.3-16.el8.noarch python3-pip-9.0.3-16.el8.noarch python3-setuptools-39.2.0-5.el8.noarch python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 Complete!
Removing intermediate container 42f100f9695e
---> 40f304dbf259
Step 4/7 : COPY ahab .
---> b2614cf6dec1
Step 5/7 : RUN yum list installed
---> Running in 58042003ee8b
Installed Packages
acl.x86_64 2.2.53-1.el8 @System
audit-libs.x86_64 3.0-0.17.20191104git1c2f876.el8 @System
basesystem.noarch 11-5.el8 @System
bash.x86_64 4.4.19-10.el8 @System
bind-export-libs.x86_64 32:9.11.13-5.el8_2 @System
binutils.x86_64 2.30-73.el8 @System
bzip2-libs.x86_64 1.0.6-26.el8 @System
ca-certificates.noarch 2019.2.32-80.0.el8_1 @System
centos-gpg-keys.noarch 8.2-2.2004.0.1.el8 @System
centos-release.x86_64 8.2-2.2004.0.1.el8 @System
centos-repos.x86_64 8.2-2.2004.0.1.el8 @System
chkconfig.x86_64 1.11-1.el8 @System
coreutils-single.x86_64 8.30-7.el8_2.1 @System
cpio.x86_64 2.12-8.el8 @System
cracklib.x86_64 2.9.6-15.el8 @System
crypto-policies.noarch 20191128-2.git23e1bf1.el8 @System
cryptsetup-libs.x86_64 2.2.2-1.el8 @System
curl.x86_64 7.61.1-12.el8 @System
cyrus-sasl-lib.x86_64 2.1.27-1.el8 @System
dbus.x86_64 1:1.12.8-10.el8_2 @System
dbus-common.noarch 1:1.12.8-10.el8_2 @System
dbus-daemon.x86_64 1:1.12.8-10.el8_2 @System
dbus-libs.x86_64 1:1.12.8-10.el8_2 @System
dbus-tools.x86_64 1:1.12.8-10.el8_2 @System
device-mapper.x86_64 8:1.02.169-3.el8 @System
device-mapper-libs.x86_64 8:1.02.169-3.el8 @System
dhcp-client.x86_64 12:4.3.6-40.el8 @System
dhcp-common.noarch 12:4.3.6-40.el8 @System
dhcp-libs.x86_64 12:4.3.6-40.el8 @System
dnf.noarch 4.2.17-7.el8_2 @System
dnf-data.noarch 4.2.17-7.el8_2 @System
dracut.x86_64 049-70.git20200228.el8 @System
dracut-network.x86_64 049-70.git20200228.el8 @System
dracut-squash.x86_64 049-70.git20200228.el8 @System
elfutils-default-yama-scope.noarch
0.178-7.el8 @System
elfutils-libelf.x86_64 0.178-7.el8 @System
elfutils-libs.x86_64 0.178-7.el8 @System
epel-release.noarch 8-8.el8 @extras
ethtool.x86_64 2:5.0-2.el8 @System
expat.x86_64 2.2.5-3.el8 @System
file-libs.x86_64 5.33-13.el8 @System
filesystem.x86_64 3.8-2.el8 @System
findutils.x86_64 1:4.6.0-20.el8 @System
gawk.x86_64 4.2.1-1.el8 @System
gdbm.x86_64 1:1.18-1.el8 @System
gdbm-libs.x86_64 1:1.18-1.el8 @System
glib2.x86_64 2.56.4-8.el8 @System
glibc.x86_64 2.28-101.el8 @System
glibc-common.x86_64 2.28-101.el8 @System
glibc-minimal-langpack.x86_64 2.28-101.el8 @System
gmp.x86_64 1:6.1.2-10.el8 @System
gnupg2.x86_64 2.2.9-1.el8 @System
gnutls.x86_64 3.6.8-11.el8_2 @System
gpgme.x86_64 1.10.0-6.el8.0.1 @System
grep.x86_64 3.1-6.el8 @System
gzip.x86_64 1.9-9.el8 @System
hostname.x86_64 3.20-6.el8 @System
ima-evm-utils.x86_64 1.1-5.el8 @System
info.x86_64 6.5-6.el8 @System
ipcalc.x86_64 0.2.4-4.el8 @System
iproute.x86_64 5.3.0-1.el8 @System
iptables-libs.x86_64 1.8.4-10.el8_2.1 @System
iputils.x86_64 20180629-2.el8 @System
json-c.x86_64 0.13.1-0.2.el8 @System
kexec-tools.x86_64 2.0.20-14.el8 @System
keyutils-libs.x86_64 1.5.10-6.el8 @System
kmod.x86_64 25-16.el8 @System
kmod-libs.x86_64 25-16.el8 @System
krb5-libs.x86_64 1.17-18.el8 @System
langpacks-en.noarch 1.0-12.el8 @System
less.x86_64 530-1.el8 @System
libacl.x86_64 2.2.53-1.el8 @System
libarchive.x86_64 3.3.2-8.el8_1 @System
libassuan.x86_64 2.5.1-3.el8 @System
libattr.x86_64 2.4.48-3.el8 @System
libblkid.x86_64 2.32.1-22.el8 @System
libcap.x86_64 2.26-3.el8 @System
libcap-ng.x86_64 0.7.9-5.el8 @System
libcom_err.x86_64 1.45.4-3.el8 @System
libcomps.x86_64 0.1.11-4.el8 @System
libcurl-minimal.x86_64 7.61.1-12.el8 @System
libdb.x86_64 5.3.28-37.el8 @System
libdb-utils.x86_64 5.3.28-37.el8 @System
libdnf.x86_64 0.39.1-6.el8_2 @System
libfdisk.x86_64 2.32.1-22.el8 @System
libffi.x86_64 3.1-21.el8 @System
libgcc.x86_64 8.3.1-5.el8.0.2 @System
libgcrypt.x86_64 1.8.3-4.el8 @System
libgpg-error.x86_64 1.31-1.el8 @System
libidn2.x86_64 2.2.0-1.el8 @System
libkcapi.x86_64 1.1.1-16_1.el8 @System
libkcapi-hmaccalc.x86_64 1.1.1-16_1.el8 @System
libksba.x86_64 1.3.5-7.el8 @System
libmetalink.x86_64 0.1.3-7.el8 @System
libmnl.x86_64 1.0.4-6.el8 @System
libmodulemd1.x86_64 1.8.16-0.2.8.2.1 @System
libmount.x86_64 2.32.1-22.el8 @System
libnghttp2.x86_64 1.33.0-3.el8_2.1 @System
libnsl2.x86_64 1.2.0-2.20180605git4a062cf.el8 @System
libpcap.x86_64 14:1.9.0-3.el8 @System
libpwquality.x86_64 1.4.0-9.el8 @System
librepo.x86_64 1.11.0-2.el8 @System
libreport-filesystem.x86_64 2.9.5-10.el8 @System
libseccomp.x86_64 2.4.1-1.el8 @System
libselinux.x86_64 2.9-3.el8 @System
libsemanage.x86_64 2.9-2.el8 @System
libsepol.x86_64 2.9-1.el8 @System
libsigsegv.x86_64 2.11-5.el8 @System
libsmartcols.x86_64 2.32.1-22.el8 @System
libsolv.x86_64 0.7.7-1.el8 @System
libstdc++.x86_64 8.3.1-5.el8.0.2 @System
libtasn1.x86_64 4.13-3.el8 @System
libtirpc.x86_64 1.1.4-4.el8 @System
libunistring.x86_64 0.9.9-3.el8 @System
libusbx.x86_64 1.0.22-1.el8 @System
libutempter.x86_64 1.1.6-14.el8 @System
libuuid.x86_64 2.32.1-22.el8 @System
libverto.x86_64 0.3.0-5.el8 @System
libxcrypt.x86_64 4.1.1-4.el8 @System
libxml2.x86_64 2.9.7-7.el8 @System
libyaml.x86_64 0.1.7-5.el8 @System
libzstd.x86_64 1.4.2-2.el8 @System
lua-libs.x86_64 5.3.4-11.el8 @System
lz4-libs.x86_64 1.8.1.2-4.el8 @System
lzo.x86_64 2.08-14.el8 @System
mpfr.x86_64 3.1.6-1.el8 @System
ncurses-base.noarch 6.1-7.20180224.el8 @System
ncurses-libs.x86_64 6.1-7.20180224.el8 @System
nettle.x86_64 3.4.1-1.el8 @System
npth.x86_64 1.5-4.el8 @System
openldap.x86_64 2.4.46-11.el8_1 @System
openssl-libs.x86_64 1:1.1.1c-15.el8 @System
p11-kit.x86_64 0.23.14-5.el8_0 @System
p11-kit-trust.x86_64 0.23.14-5.el8_0 @System
pam.x86_64 1.3.1-8.el8 @System
pcre.x86_64 8.42-4.el8 @System
pcre2.x86_64 10.32-1.el8 @System
platform-python.x86_64 3.6.8-23.el8 @System
platform-python-pip.noarch 9.0.3-16.el8 @BaseOS
platform-python-setuptools.noarch 39.2.0-5.el8 @System
popt.x86_64 1.16-14.el8 @System
procps-ng.x86_64 3.3.15-1.el8 @System
python3-dnf.noarch 4.2.17-7.el8_2 @System
python3-gpg.x86_64 1.10.0-6.el8.0.1 @System
python3-hawkey.x86_64 0.39.1-6.el8_2 @System
python3-libcomps.x86_64 0.1.11-4.el8 @System
python3-libdnf.x86_64 0.39.1-6.el8_2 @System
python3-libs.x86_64 3.6.8-23.el8 @System
python3-pip.noarch 9.0.3-16.el8 @AppStream
python3-pip-wheel.noarch 9.0.3-16.el8 @System
python3-rpm.x86_64 4.14.2-37.el8 @System
python3-setuptools.noarch 39.2.0-5.el8 @BaseOS
python3-setuptools-wheel.noarch 39.2.0-5.el8 @System
python36.x86_64 3.6.8-2.module_el8.1.0+245+c39af44f @AppStream
readline.x86_64 7.0-10.el8 @System
rootfiles.noarch 8.1-22.el8 @System
rpm.x86_64 4.14.2-37.el8 @System
rpm-build-libs.x86_64 4.14.2-37.el8 @System
rpm-libs.x86_64 4.14.2-37.el8 @System
sed.x86_64 4.5-1.el8 @System
setup.noarch 2.12.2-5.el8 @System
shadow-utils.x86_64 2:4.6-8.el8 @System
snappy.x86_64 1.1.7-5.el8 @System
sqlite-libs.x86_64 3.26.0-6.el8 @System
squashfs-tools.x86_64 4.3-19.el8 @System
systemd.x86_64 239-31.el8_2.2 @System
systemd-libs.x86_64 239-31.el8_2.2 @System
systemd-pam.x86_64 239-31.el8_2.2 @System
systemd-udev.x86_64 239-31.el8_2.2 @System
tar.x86_64 2:1.30-4.el8 @System
tzdata.noarch 2020a-1.el8 @System
util-linux.x86_64 2.32.1-22.el8 @System
vim-minimal.x86_64 2:8.0.1763-13.el8 @System
xz.x86_64 5.2.4-3.el8 @System
xz-libs.x86_64 5.2.4-3.el8 @System
yum.noarch 4.2.17-7.el8_2 @System
zlib.x86_64 1.2.11-13.el8 @System
Removing intermediate container 58042003ee8b
---> daaabe5a6b54
Step 6/7 : RUN yum list installed | ./ahab chase --os fedora
---> Running in 06f7a4406486
Flag --os has been deprecated, use package-manager
______ __ __
/\ _ \ /\ \ /\ \
\ \ \L\ \ \ \ \___ __ \ \ \____
\ \ __ \ \ \ _ `\ /'__`\ \ \ '__`\
\ \ \/\ \ \ \ \ \ \ /\ \L\.\_ \ \ \L\ \
\ \_\ \_\ \ \_\ \_\\ \__/.\_\ \ \_,__/
\/_/\/_/ \/_/\/_/ \/__/\/_/ \/___/
_ _ _ _
/_) /_` _ _ _ _/_ _ _ (/ /_` _ . _ _ _/ _
/_) /_/ ._/ /_// //_|/ /_/ /_//_' (_X / / / /_'/ //_/ _\
_/ _/ /
Ahab version: development
2020/10/13 02:07:12 Found beginning line of Yum Install List
Usage:
ahab chase [flags]
Examples:
dpkg-query --show --showformat='${Package} ${Version}\n' | ./ahab chase
yum list installed | ./ahab chase
dnf list installed | ./ahab chase
apk info -vv | sort | ./ahab chase
Flags:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ OSS Index ID ┃ 07a2fc6e-842c-4e05-86f7-5151667eb860 ┃
┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ CVSS Score ┃ 7.5/10 (High) ┃
┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ CVSS Vector ┃ AV:N/AC:L/Au:N/C:P/I:P/A:P ┃
┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ Link for more info ┃ https://ossindex.sonatype.org/vuln/07a2fc6e-842c-4e05-86f7-5151667eb860?component-type=rpm&component-name=sqlite&utm_source=ahab-client&utm_medium=integration&utm_content=development ┃
┗━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ [CVE-2015-3414] Improper Input Validation Uh oh, an error occurred, if this persists try rerunning with -v, -vv, or -vvv to get more information in the logs
Error: runtime error: index out of range [1] with length 1
Check log file at /root/.ossindex/ahab.combined.log for more information
-v, -- count Set log level, higher is more verbose
--clean-cache Flag to clean the database cache for OSS Index
-e, --exclude-vulnerability CveListFlag Comma separated list of CVEs to exclude (default [])
-x, --exclude-vulnerability-file string Path to a file containing newline separated CVEs to be excluded (default "./.ahab-ignore")
-h, --help help for chase
--loud Specify if you want non vulnerable packages included in your output
--no-color Specify if you want no color in your results
--os string Specify a value for the operating system type you want to scan (alpine, debian, fedora). Useful if autodetection fails and/or you want to explicitly set it. (DEPRECATED: use package-manager)
--output string Specify the output type you want (json, text, csv) (default "text")
--package-manager string Specify package manager type you want to scan (apk, dnf, dpkg or yum). Useful if autodetection fails and/or you want to explicitly set it.
--quiet Quiet removes the header from being printed
--token string Specify your OSS Index API Token
--user string Specify your OSS Index Username
The command '/bin/sh -c yum list installed | ./ahab chase --os fedora' returned a non-zero code: 1
docker_test.go:55: >>>>>>>>>>>>>> yum: Docker build failed and was not due to vulnerable packages. See test output for more details.
FAIL
[TEARDOWN]
FAIL github.com/sonatype-nexus-community/ahab/docker 333.733s
? github.com/sonatype-nexus-community/ahab/logger [no test files]
? github.com/sonatype-nexus-community/ahab/packages [no test files]
ok github.com/sonatype-nexus-community/ahab/parse 0.003s [no tests to run]
FAIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment