Skip to content

Instantly share code, notes, and snippets.

View ppkarwasz's full-sized avatar
💭
Available for Open Source contract work

Piotr P. Karwasz ppkarwasz

💭
Available for Open Source contract work
View GitHub Profile
@ppkarwasz
ppkarwasz / client.c
Created February 16, 2020 21:05
Small remote command execution
#include <stdio.h>
#include <stdlib.h>
#include "libwrapper.h"
int main(int argc, char *const argv[]) {
int ctrl = prepare_socket(true);
if (argc < 2) {
@ppkarwasz
ppkarwasz / MetaProxyServlet.java
Last active December 28, 2020 13:10
An example how to register `ProxyServlet` instances during runtime.
package pl.copernik.servlet;
import java.io.IOException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.TreeMap;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
@ppkarwasz
ppkarwasz / Example.java
Created January 17, 2021 19:41
JAXB: example of remapping of unqualified elements
/*
* Add this annotation to the package:
* @XmlSchema(xmlns = {
* @XmlNs(prefix = "", namespaceURI = Example.NS1),
* @XmlNs(prefix = "name2", namespaceURI = Example.NS2)}, elementFormDefault =
* XmlNsForm.QUALIFIED)
*/
public class Example {
@XmlType(namespace = XMLConstants.NULL_NS_URI)
@ppkarwasz
ppkarwasz / BND Baseline report
Last active January 24, 2024 09:27
Difference between `org.apache.logging.log4j:log4j-1.2-api` 2.22.1 and `log4j:log4j` 1.2.17
===============================================================
Name Type Delta New Old Suggest
org.apache.logging.log4j.1.2.api BUNDLE MAJOR 2.22.1 1.2.17 -
MAJOR BUNDLE log4j-1.2-api-2.22.1
MAJOR API <api>
MAJOR PACKAGE org.apache.log4j
ADDED CLASS org.apache.log4j.AppenderSkeleton$NoOpErrorHandler
ADDED ACCESS static
ADDED IMPLEMENTS org.apache.log4j.spi.ErrorHandler
ADDED METHOD <init>()
@ppkarwasz
ppkarwasz / sbom.txt
Last active September 1, 2025 11:59
Contents of Apache Solr 9.9.0 binary distribution
com.adobe.xmp:xmpcore:6.1.10
com.beust:jcommander:1.82
com.carrotsearch:hppc:0.10.0
com.cybozu.labs:langdetect:1.1-20120112
com.epam:parso:2.0.14
com.fasterxml.jackson.core:jackson-annotations:2.18.0
com.fasterxml.jackson.core:jackson-core:2.18.0
com.fasterxml.jackson.core:jackson-databind:2.18.0
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.18.0
com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.18.0
@ppkarwasz
ppkarwasz / cves.txt
Last active January 12, 2026 11:36
Vulnerabilities in Apache Solr 9.9.0 (build environment + runtime, Maven-only)
# CVEs in Apache Solr 9.9.0 build/runtime environment up to 2025-11-06 (release of 9.10.0)
CVE-2016-1000027
CVE-2020-29582
CVE-2020-36518
CVE-2020-8908
CVE-2022-1471
CVE-2022-24329
CVE-2022-25857
CVE-2022-38749
CVE-2022-38750
@ppkarwasz
ppkarwasz / flume-thread-model.adoc
Created May 13, 2026 14:44
Flume threat model
@ppkarwasz
ppkarwasz / log4j-threat-model.md
Created May 13, 2026 16:36
Log4j draft threat model

Apache Log4j 2 — Threat Model

§4.1 Header

  • Project: Apache Log4j 2 (apache/logging-log4j2)
  • Version pinned: 2.26.0 (latest GA at time of writing; HEAD = 2.27.0-SNAPSHOT)
  • Java baseline: Java 17
  • Date: 2026-05-13
  • Author: drafted by the produce-threat-model skill in interview-first mode with a maintainer in the loop
  • Status: draft v1, under maintainer review
@ppkarwasz
ppkarwasz / httpd-thread-model-v1.md
Created May 13, 2026 19:41
Draft of Apache HTTP Server Threat Model

Apache HTTP Server 2.4.x — Threat Model

1. Header

  • Project: Apache HTTP Server (apache/httpd), branch 2.4.x
  • Repository commit basis: shallow clone of origin/2.4.x taken 2026-05-13
  • Date: 2026-05-13
  • Author: drafted by an external reviewer working from public artifacts; not yet ratified by the httpd PMC
  • Version binding: this document describes the implicit contract for the 2.4.x line as a whole. The release-stability policy in VERSIONING forbids breaking module API or runtime configuration within 2.4.x, so the threat model is expected to remain stable across patch releases. A report against a specific 2.4.<n> release should be triaged against this document as it stood at that tag.
  • Reporting cross-reference: vulnerabilities should be reported to security@httpd.apache.org per httpd.apache.org/security_report.html. Findings that fall under §3 or §9 of this document will be closed by reference to it.
@ppkarwasz
ppkarwasz / zookeeper-threat-model.md
Last active June 18, 2026 19:19
Draft Zookeeper threat model

Apache ZooKeeper — Threat Model

Produced with the threat-model-producer skill (https://gist.github.com/potiuk/da14a826283038ddfe38cc9fe6310573). This is the implicit contract between ZooKeeper and its downstream operators/integrators: what is in scope, what is out, what the project claims, and what it disclaims. It is not an audit, a CVE list, or a secure-coding guide.

§1 Header