Skip to content

Instantly share code, notes, and snippets.

View paulproteus's full-sized avatar

Asheesh Laroia paulproteus

View GitHub Profile
@paulproteus
paulproteus / images.md
Created April 18, 2021 04:35
Image scratcpad

just images

@paulproteus
paulproteus / README.md
Created October 23, 2022 14:39
tar-data-xfer
tar cf -  --exclude .Trash  --exclude Library/Caches --exclude Library/Cookies --exclude Library/Metadata/CoreSpotlight --exclude Library/PersonalizationPortrait --exclude Library/Safari --exclude Library/Containers --exclude 'Library/Group Containers' --exclude Library/Suggestions . | pv > /dev/null
@paulproteus
paulproteus / README.md
Last active November 1, 2023 16:39
nsjail within Docker (aarch64)

Overview

This document explains some risks of server-side image processing and explains a technique to make that much safer. I recommend using this technique.

Strategy

For a web app that is running in Docker, it's helpful to delegate work such as image conversion to a subprocess. We can confine subprocesses so they can only access non-sensitive data by using Linux security features while running them in the same Docker container as the full web app. This allows for complete mitigation of security issues in the subprocesses with maximum convenience and minimal slowdown.

Every few years, complex packages like imagemagick have critical security bugs; people find about one issue per month