Code Monkey home page Code Monkey logo

clair-singularity's Introduction

👋 dtrudg

Hello, I'm David (or Dave) Trudgian. I'm an experienced software engineer with a Ph.D. in Computer Science, living in the UK. My studies and career have spanned machine learning, bioinformatics, and high performance computing (HPC).

I currently work for Sylabs where I am maintainer of the SingularityCE open source container runtime, and oversee SingularityPRO - a commercial long-term supported version.

I use this GitHub account for work related code and collaborations only. My personal stuff is elsewhere, and under different usernames. Note that I do not check GitHub notifications outside of working hours / workdays. It might take me a little while for me to get back to you if I'm on holiday.

clair-singularity's People

Contributors

dtrudg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

clair-singularity's Issues

Severity Filtering

Allow filtering reports by CVE severity, only returning vulns with equal or higher severity than level specificed.

Add initial test coverage

Add initial test coverage. Given the dated Clair DB docker images, should be able to get nice test verifying final output against test container images

Problem with sandbox build

This very useful took worked well with a container imported from Docker.

However, I am now trying it on an image built from a Singularity definition file, and I am seeing permission problems with the sandbox build. They sound similar to other sandbox problems reported recently.
The error I see is:

(clair-singularity) [software@easybuild clair-singularity]$ clair-singularity --bind-ip 10.1.0.3 --json-output ~/src/singularity/antspynet-0.0.3.sif > antspynet-clair-scan-$(date +%F).json
Exporting image to sandbox.
INFO:    Starting build...
INFO:    Creating sandbox directory...
FATAL:   While performing build: sandbox assemble failed: exit status 1: mv: cannot move ‘/tmp/sbuild-096432949/fs’ to ‘/tmp/tmproogpums’: Permission denied
Traceback (most recent call last):
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/clair_singularity-0.2.0-py3.6.egg/clair_singularity/image.py", line 33, in image_to_tgz
    subprocess.check_call(cmd)
  File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['singularity', 'build', '-F', '--sandbox', '/tmp/tmproogpums', '/home/software/src/singularity/antspynet-0.0.3.sif']' returned non-zero exit status 255.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/clair_singularity-0.2.0-py3.6.egg/clair_singularity/cli.py", line 32, in cli
    (tar_dir, tar_file) = image_to_tgz(image, quiet)
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/clair_singularity-0.2.0-py3.6.egg/clair_singularity/image.py", line 35, in image_to_tgz
    raise ImageException("Error calling Singularity export to create sandbox\n%s" % e)
clair_singularity.image.ImageException: Error calling Singularity export to create sandbox
Command '['singularity', 'build', '-F', '--sandbox', '/tmp/tmproogpums', '/home/software/src/singularity/antspynet-0.0.3.sif']' returned non-zero exit status 255.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/software/src/venv/clair-singularity/bin/clair-singularity", line 11, in <module>
    load_entry_point('clair-singularity==0.2.0', 'console_scripts', 'clair-singularity')()
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/Click-7.0-py3.6.egg/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/software/src/venv/clair-singularity/lib/python3.6/site-packages/clair_singularity-0.2.0-py3.6.egg/clair_singularity/cli.py", line 33, in cli
    except ImageError as e:
NameError: name 'ImageError' is not defined

SSL Client/Server certificate checking

Implement SSL certificate checks/use so that we can verify we are talking to a trusted Clair instance, and that only our trusted Clair instance is pulling the image we tell it to.

HTML report output

Implement a simple, attractive, easy to navigate HTML report of scan results

Cannot scan centos 8 image

WIth SingularityCE 3.8.1 on PATH...

03:00 PM $ clair-singularity centos_8.sif 
tar: ./etc/shadow-: Cannot open: Permission denied
tar: ./etc/shadow: Cannot open: Permission denied
tar: ./etc/gshadow-: Cannot open: Permission denied
tar: ./etc/gshadow: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors
Error calling gzip export to compress .tar file
Command '['tar', '-C', '/tmp/tmp2livbajn', '-zcf', '/tmp/tmpqxh1v6av/centos_8.sif.tar.gz', '.']' returned non-zero exit status 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.