Skip to content

Instantly share code, notes, and snippets.

View ProxiBlue's full-sized avatar
🏠
Working from home

Lucas van Staden ProxiBlue

🏠
Working from home
View GitHub Profile
@ProxiBlue
ProxiBlue / README.md
Created October 21, 2026 11:35
mage-os/framework session hardening for session.use_strict_mode (package-relative port of ssx's patch; untested with strict mode on)

mage-os/framework: session hardening for session.use_strict_mode

Package-relative port of ssx's original patch (https://gist.github.com/ssx/46930699a0b5506e4de1db0d8b96c619, written against vendor/magento/framework) for the mage-os/framework package. All credit for the change goes to ssx. This copy only rewrites the paths and regenerates the hunks so they apply cleanly.

What it changes

  • Session/SaveHandler.php: implements SessionUpdateTimestampHandlerInterface. Adds validateId() (rejects ids that have no stored session data, which is what session.use_strict_mode=1 needs) and updateTimestamp() (delegates to write(), as PHP does when the method is absent). validateId() hands the data it read to the next read() so the session is not read twice.
  • Session/SessionManager.php: when a session is already started, its id wins over the request cookie, because session_start() may have replaced it under strict mode.

Status

@ProxiBlue
ProxiBlue / 2026-09-29-cloudflare-magento2-best-practices.md
Created September 29, 2026 11:23
Cloudflare + Magento 2 best practice guide (WAF/OWASP CRS config)

Cloudflare + Magento 2 — best practice guide (compiled 2026-09-29)

Compiled from Cloudflare's own official docs + community sources, cross-checked against this zone's actual live config. Written as a follow-up to the two same-day OWASP CRS false-positive incidents on ticket #400 (storefront cookie walls, then the admin catalog/product/validate RCE false-positive).

1. The single highest-leverage fix for THIS zone

The #400 fix (05:04 UTC) set the OWASP ruleset override to:

@ProxiBlue
ProxiBlue / README.md
Created September 5, 2026 22:57
StyleSmuggler (sansec.io) mitigation — Mage-OS composer patches, vaimo format: rhoerr's defense-in-depth set adapted + CLI-only DI scanner guards

StyleSmuggler mitigation — Mage-OS composer patches (vaimo/composer-patches format)

Defense-in-depth patch set for StyleSmuggler (https://sansec.io/research/stylesmuggler — unauthenticated Magento/Adobe Commerce RCE, disclosed 2026-09-05, no vendor patch yet).

Adaptation of https://gist.github.com/rhoerr/291d29ef3bd201c96757cf262d92bdaf for Mage-OS package names, split per package with package-root-relative paths so they drop straight into vaimo/composer-patches, plus CLI-only guards on the two DI scanner sinks the original set does not cover (ClassesScanner::includeClass(), XmlInterceptorScanner::_handleControllerClassName() — same approach as

@ProxiBlue
ProxiBlue / mage-os-magento2-base-stylesmuggler-array-scanner-cli-only.patch
Created September 5, 2026 13:48
StyleSmuggler 0-day (sansec.io/research/stylesmuggler) - Magento DI-scanner CLI-only patch (GITHUB_408)
--- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/ArrayScanner.php
+++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/ArrayScanner.php
@@ -15,6 +15,12 @@
*/
public function collectEntities(array $files)
{
+ // StyleSmuggler 0-day (sansec.io/research/stylesmuggler, 2026-09) — this variable-path
+ // include is only ever meant to run via bin/magento setup:di:compile.
+ if (PHP_SAPI !== 'cli') {
+ throw new \RuntimeException('Magento DI scanners are CLI-only.');
@ProxiBlue
ProxiBlue / rm
Created August 30, 2026 02:24
make rm saver with ai
#!/bin/bash
# /bin/rm + /usr/bin/rm + /usr/local/bin/rm — wrapper that trashes instead of deleting.
#
# Why: 2026-06-29 incident — gitnexus-rebuild cron rm -rf'd .git on
# 3 projects. Moving to trash instead makes those mistakes recoverable.
#
# Installed via dpkg-divert: real coreutils rm moved to /bin/rm.real,
# this wrapper at /bin/rm (and /usr/bin/rm via the Ubuntu usrmerge symlink).
# That means EVERY caller — interactive, scripts, cron, even direct
# /bin/rm — hits this wrapper. No bypass.
@ProxiBlue
ProxiBlue / completeness-critical-fetch.md
Last active August 10, 2026 22:06
Gist to prevent claude to use webfetch due to summary issue

Full-page fetches only — MANDATORY (blanket, not just security)

Never use WebFetch (or any tool that pre-summarizes a page). Fetch the raw page and read it in full yourself. This applies to EVERY fetch — security scans, module/version checks, and general research/citation lookups alike. Widened 2026-08-11 from an advisory/CVE-only rule after the user made clear the same blind spot risks silently dropping content during research, not just security scans.

Why this exists

WebFetch's own tool description says it plainly: fetches the URL, converts HTML to markdown, processes the content with a small, fast model, and "results may be summarized if the content is very large." That intermediate model decides what's relevant before you ever see the page — on a long document it can silently drop a section.

2026-08-11 incident: a Claude instance in the lcd-mageos container was asked to check a security advisory URL against installed Amasty modules. It used WebFetch (internally referred to as "ctx_search" /

@ProxiBlue
ProxiBlue / tooling-setup-guide.md
Last active August 2, 2026 13:44
Setting up a disciplined AI coding-agent stack — plugins + reproducible patterns (guards, test gate, self-measurement, off-site backups, version discipline). By ProxiBlue.

Setting up a disciplined AI coding-agent stack — a setup guide

This is the how-to companion to an architecture review of ProxiBlue's AI-agent tooling. The review explains what the pieces are and why; this explains how to stand up your own version.

It comes in two halves:

  • Part 1 — the plugin stack. Four open-source Claude Code plugins you can install directly (ProxiBlue, MIT/Apache). These give you memory, orchestration,
@ProxiBlue
ProxiBlue / chrome-mcp
Created June 21, 2026 13:08
chrome-mcp — dedicated Chrome launcher for chrome-devtools MCP (CDP attach) that keeps daily-browsing profile clean from navigator.webdriver=true and the reCAPTCHA hits that come with it
#!/usr/bin/env bash
# Dedicated Chrome instance for the chrome-devtools MCP.
# - Separate user-data-dir → daily-browsing profile stays clean.
# - Bound to 127.0.0.1 (loopback only) → not reachable from LAN.
# - --user-data-dir means CDP attaches HERE, not to your daily browser.
#
# Usage:
# chrome-mcp # foreground (Ctrl+C to stop)
# chrome-mcp --headless
# chrome-mcp --bg # background; logs to /tmp/chrome-mcp.log
@ProxiBlue
ProxiBlue / gitnexus-ab-summary.md
Created June 17, 2026 12:35
GitNexus A/B — devils-advocate review WITH vs WITHOUT gitnexus, 2 rounds (stale vs fresh index)

GitNexus A/B — Devils-Advocate Review

Same Mage-OS plan (14 tasks). Same agent (Opus). Same prompt. Pass A = grep-only. Pass B = WITH gitnexus MCP.

Ran twice — Round 1 against a 105-commit-stale index, Round 2 after re-indexing.

Headline numbers

| | Round 1 (stale index) | Round 2 (fresh index) |

@ProxiBlue
ProxiBlue / code-investigation-rules.md
Last active April 21, 2026 21:42
claude skill to solve constant pushbacks

Investigation Protocol — MANDATORY

When a test fails, a system errors, or the user reports a bug, behave as follows. These steps are not guidance — they are mandatory. Skipping any of them is the exact failure mode being banned here.

Order of operations — NO SKIPPING

  1. Enumerate own blast radius FIRST. Run git diff --stat HEAD and git status. State out loud what has been changed this session, by file, in one line each. This is the first move on every failure, every time.

  2. Read ALL failure artefacts — not a sample.