Skip to content

Instantly share code, notes, and snippets.

View monperrus's full-sized avatar

Martin Monperrus monperrus

View GitHub Profile
@monperrus
monperrus / cors.md
Created June 9, 2026 18:43
CORS Preflight (HTTP OPTIONS) Support for Agent Endpoints

CORS Preflight (HTTP OPTIONS) Support for Agent Endpoints

This document describes CORS (Cross-Origin Resource Sharing) preflight support for all LLM API endpoints used by the agent specs in this project.

What is CORS?

CORS is a browser security mechanism that restricts cross-origin HTTP requests. Before making an actual request, browsers send a preflight OPTIONS request to check if the server allows the cross-origin request. The server must respond with appropriate Access-Control-Allow-* headers for the browser to proceed.

Why CORS Matters for LLM Endpoints

@monperrus
monperrus / README.md
Created May 25, 2026 06:43
Securing the Linux Secret Service API against Enumeration Attacks

Securing the Linux Secret Service API against Enumeration Attacks

Background

The Secret Service API is a D-Bus interface (org.freedesktop.secrets) implemented by GNOME Keyring. Applications use it to store and retrieve credentials. Once your desktop session is unlocked (at login), any process running as your user can talk to this interface without further authentication.

Threat model

@monperrus
monperrus / endorsement.md
Last active May 19, 2026 04:15
Arxiv endorsement notice May 2026

Do you endorse XXXXX?

The person listed below wishes to submit work to the cs.SE (Software Engineering) subject category of arXiv. To do this, they must be endorsed by an existing arXiv user with sufficient publication history on arXiv. You are such a person.

Endorsement request from:

What does my endorsement do?

Your endorsement will enable to upload articles to cs.SE. We ask that you verify that they are a competent member of the scientific community and will submit legitimate research work that is relevant to cs.SE. Considerations

@monperrus
monperrus / doc.md
Created May 8, 2026 07:15
Flatpak Evolution in full dark mode

Flatpak Evolution in full dark mode

There are three actions to get Flatpak Evolution in full dark mode.

1. UI

flatpak override --user --env=GTK_THEME=Adwaita:dark org.gnome.Evolution
@monperrus
monperrus / doc.md
Last active May 8, 2026 07:28
Copilot remote sessions endpoint

Copilot remote sessions endpoint

The copilot --resume Remote tab calls a live Copilot API, not the local session store.

Endpoint

GET https://api.individual.githubcopilot.com/agents/sessions?limit=20&integration_id=copilot-developer-cli
@monperrus
monperrus / post.md
Created May 5, 2026 20:30
Claude.ai GitHub MCP Connector with Write Access

Claude.ai GitHub MCP Connector with Write Access

Problem

The built-in GitHub MCP connector in Claude.ai is read-only. It can read files and repositories (including private ones), but cannot perform any write operations such as:

  • Creating branches
  • Pushing or editing files
  • Creating pull requests
@monperrus
monperrus / codex-openrouter-gist.md
Last active April 18, 2026 18:16
Running Codex on top of OpenRouter

Running Codex on top of OpenRouter

Codex CLI supports custom model providers, so you can point it at OpenRouter instead of the default OpenAI endpoint.

Wrapper script

#!/bin/bash
set -euo pipefail
@monperrus
monperrus / PR_DESCRIPTION.txt
Last active April 15, 2026 06:31
Proportion of Anonymous Edits on English Wikipedia — March 2026
## Result: Proportion of Anonymous Edits on English Wikipedia — March 2026
Using the [Wikimedia Analytics REST API](https://wikimedia.org/api/rest_v1/), edit counts for the last complete month (March 2026):
| Metric | Count |
|---|---|
| Total edits | 5,389,374 |
| Anonymous edits | 454,619 |
| **Proportion anonymous** | **8.44%** |
@monperrus
monperrus / note.md
Created April 15, 2026 05:38
list of allowed domains in claude.ai sandboxed agents (April 15 2026)

From the network configuration:

Allowed domains only:

  • api.anthropic.com
  • archive.ubuntu.com
  • crates.io
  • files.pythonhosted.org
  • github.com
  • index.crates.io
  • npmjs.com / npmjs.org / www.npmjs.com / www.npmjs.org
@monperrus
monperrus / enable-sponsorship-github.py
Last active March 21, 2026 06:45
Python script to enable GitHub sponsorships for all repositories in an organization using the GraphQL mutation API.
#! /usr/bin/env python3
"""Enable GitHub sponsorships for all repositories in an organization.
This script:
- Reads a GitHub personal access token from the local keyring
- Lists all repositories in the configured organization
- Skips archived repositories
- Enables the sponsorship button on each remaining repository via the GitHub API
Requirements: