All Projects → dtrudg → clair-singularity

dtrudg / clair-singularity

Licence: BSD-3-Clause license
Scan Singularity container images using a Clair server

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to clair-singularity

clair-cicd
Making CoreOS' Clair easily work in CI/CD pipelines
Stars: ✭ 27 (+92.86%)
Mutual labels:  security-audit, clair
Blowhole
Docker auditing and enumeration script.
Stars: ✭ 21 (+50%)
Mutual labels:  security-audit
Nginx log check
Nginx日志安全分析脚本
Stars: ✭ 250 (+1685.71%)
Mutual labels:  security-audit
default-http-login-hunter
Login hunter of default credentials for administrative web interfaces leveraging NNdefaccts dataset.
Stars: ✭ 285 (+1935.71%)
Mutual labels:  security-audit
Crumble
Menu driven wordlist generator in C++
Stars: ✭ 19 (+35.71%)
Mutual labels:  security-audit
Jxnet
Jxnet is a Java library for capturing and sending custom network packet buffers with no copies. Jxnet wraps a native packet capture library (libpcap/winpcap/npcap) via JNI (Java Native Interface).
Stars: ✭ 26 (+85.71%)
Mutual labels:  security-audit
Cobra
Source Code Security Audit (源代码安全审计)
Stars: ✭ 2,802 (+19914.29%)
Mutual labels:  security-audit
rubysec
RubySec Field Guide
Stars: ✭ 41 (+192.86%)
Mutual labels:  security-audit
cli
The universal GraphQL API and CSPM tool for AWS, Azure, GCP, K8s, and tencent.
Stars: ✭ 811 (+5692.86%)
Mutual labels:  security-audit
burp-aem-scanner
Burp Scanner extension to fingerprint and actively scan instances of the Adobe Experience Manager CMS. It checks the website for common misconfigurations and security holes.
Stars: ✭ 60 (+328.57%)
Mutual labels:  security-audit
Chat-Bot-Security-Checklist
Chat Bot Security Checklist
Stars: ✭ 20 (+42.86%)
Mutual labels:  security-audit
sregistry-cli
Singularity Global Client for container management
Stars: ✭ 13 (-7.14%)
Mutual labels:  singularity-container
pip-audit
Audits Python environments and dependency trees for known vulnerabilities
Stars: ✭ 735 (+5150%)
Mutual labels:  security-audit
prowler
Prowler is an Open Source Security tool for AWS, Azure and GCP to perform Cloud Security best practices assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. It contains hundreds of controls covering CIS, PCI-DSS, ISO27001, GDPR, HIPAA, FFIEC, SOC2, AWS FTR, ENS and custom security frameworks.
Stars: ✭ 8,046 (+57371.43%)
Mutual labels:  security-audit
nerfball
Want to see how something like Internet Chemotherapy works without bricking your own vms? This is a jail to reduce the python runtime from doing bad things on the host when running untrusted code. Nerf what you do not need 👾 + 🐛 ⚽ 🏈 🐳
Stars: ✭ 19 (+35.71%)
Mutual labels:  security-audit
Rspet
RSPET (Reverse Shell and Post Exploitation Tool) is a Python based reverse shell equipped with functionalities that assist in a post exploitation scenario.
Stars: ✭ 251 (+1692.86%)
Mutual labels:  security-audit
dep-scan
Fully open-source security audit for project dependencies based on known vulnerabilities and advisories. Supports both local repos and container images. Integrates with various CI environments such as Azure Pipelines, CircleCI and Google CloudBuild. No server required!
Stars: ✭ 346 (+2371.43%)
Mutual labels:  security-audit
LogESP
Open Source SIEM (Security Information and Event Management system).
Stars: ✭ 162 (+1057.14%)
Mutual labels:  security-audit
Industrial-Security-Auditing-Framework
ISAF aims to be a framework that provides the necessary tools for the correct security audit of industrial environments. This repo is a mirror of https://gitlab.com/d0ubl3g/industrial-security-auditing-framework.
Stars: ✭ 43 (+207.14%)
Mutual labels:  security-audit
SharePoint-Security
A Github Repository Created to compliment a BSides Canberra 2018 talk on SharePoint Security.
Stars: ✭ 42 (+200%)
Mutual labels:  security-audit

clair-singularity

CircleCI

Scan Singularity container images for security vulnerabilities using CoreOS Clair.

screenshot

The CoreOS Clair vulnerability scanner is a useful tool able to scan docker and other container formats for security vulnerabilities. It obtains up-to-date lists of vulnerabilities for various platforms (namespaces) from public databases.

We can use Clair to scan singularity containers, by exploiting the fact that an exported .tar.gz of a singularity container image is similar to a single layer docker image.

This tool:

  • Exports a singularity image to a temporary .tar.gz file (this will be under $TMPDIR)
  • Serves the .tar.gz file via an in-built http server, so the Clair service can retrieve it
  • Calls the Clair API to ingest the .tar.gz file as a layer for analysis
  • Calls the Clair API to retireve a vulnerability report for this layer
  • Displays a simple text, or full JSON format report

Based on experiments detailed in this Gist

IMPORTANT NOTES

Functionality was last tested using SingularityCE 3.9.7.

This tool should be considered proof of concept, not heavily tested. Use at your own risk.

There is no support yet for SSL client certificates to verify that we are sending API requests to a trusted Clair instance, or that only a trusted Clair instance can retrieve images from the inbuilt http server. This means that this solution is insecure except with an isolated local install of Clair.

Requirements

To use clair-singularity you will need a Linux host with:

  • Python 3.5 or greater installed
  • SingularityCE 3+ installed (tested with 3.9.7) and the singularity executable in your PATH
  • A Clair instance running somewhere, that is able to access the machine you will run clair-singularity on. It's easiest to accomplish this using docker to run a local Clair instance as below.

Starting a local Clair instance

If you have docker available on your local machine, the easiest way to start scanning your Singularity images is to fire up a Clair instance locally, with docker. The official Clair docker images are a blank slate, and do not include any vulnerability information. At startup Clair will have to download vulnerability information from the internet, which can be quite slow. Images from github user arminc are available that include pre-seeded databases:

https://github.com/arminc/clair-local-scan

To startup a Clair instance locally using these instances:

docker run -d --name db arminc/clair-db:2022-03-31
docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.1.8_9bca9a9a7bce2fd2e84efcc98ab00c040177e258

Replace the clair-db:2022-03-31 image tag with a later date for newer vulnerabilities

Installation

Clone the git repo, or download and extract the zip then:

python setup.py install

Usage

Clair on same machine

To scan a singularity image, using a clair instance running under local docker, on port 6060:

clair-singularity myimage.sif

/If your hostname is not resolvable to a non-localhost IP of your machine, accessible to docker containers, you must specify the IP with --bind-ip/

Clair on a different machine

If clair is running on a different machine, you must use the --clair-uri option to specify the base URI to the clair instance, and the --bind-ip and/or --bind-port options to specify a public IP and port on this machine, that clair can access to retrieve images from clair-singularity.

clair-singularity \
 --clair-uri http://10.0.1.202:6060 \
 --bind-ip=10.0.1.201 \
 --bind-port=8088 myimage.img

Full JSON Reports

By default, clair-singularity gives a simplified text report on STDOUT. To obtain the full JSON report returned by Clair use the --jsoon-output option.

clair-singularity --json-output myimage.img
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].