Coder Social home page Coder Social logo

squilt-python's Introduction

squilt

Wrapper to confine quilt with nsjail

Why?

Using quilt on untrusted spec files is not secure. For more see this posting by Matthias.

Matthias developed the original exploit, but as described in the posting, any command in %prep is run as the user calling quilt without any limitations. This was (at least to us) unexpected.

Usage

If you add an alias quilt=squilt or copy this script as 'quilt' to a directory that is earlier in $PATH you should be able to use it like you use quilt without noticying a difference.

Protection Level

squilt uses namespace isolation techniques to mark most of the hosts file systems as read-only and to make possibly sensitive data inacessible (like the user's home directory or most system configuration files). Write access is still necessary in the current working directory where squilt is invoked. This means a malicous RPM spec file could still manipulate the RPM package's directory contents. When working with untrusted spec files this should be obvious, however.

Runtime Configuration

Squilt does not support command line parameters, because it acts as a frontend to the actual quilt program and thus passes on any command line parameters to it.

To still allow some degree of configuration the following environment variables are recognized by squilt:

  • SQUILT_VERBOSE: if set then the verbosity of squilt and nsjail is increased to give a better picture of what happens.
  • SQUILT_DEBUG: if set then even more internals of the squilt operation are shown. This currently means the temporary nsjail configuration file is dumped onto stdout before executing quilt.
  • SQUILT_ENTER_SHELL: if set then instead of actually running quilt, an interactive shell in the jail environment is invoked. This allows interactive debugging of the shell environment. Note that some things are different in this mode: For example the /proc directory is mounted which is normally not the case.
  • SQUILT_EXTRA_MOUNTS: to allow extra mount operations in the jail environment without having to modify the squilt main script you can specify a semicolon separted list of extra MountSpec entries that will be added. For example: SQUILT_EXTRA_MOUNTS="MountSpec(src='/opt')". This would be mounting /opt from the host into the jail environment.

squilt-python's People

Contributors

mgerstner avatar jsegitz avatar filippobonazzisuse avatar

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.