惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
S
Security Affairs
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure Blog
雷峰网
雷峰网
Recent Announcements
Recent Announcements
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
博客园_首页
The Cloudflare Blog
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
S
SegmentFault 最新的问题
P
Proofpoint News Feed
Y
Y Combinator Blog
Jina AI
Jina AI
博客园 - 聂微东
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
F
Full Disclosure
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
T
Tailwind CSS Blog
J
Java Code Geeks
Vercel News
Vercel News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
罗磊的独立博客
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Blog of Author Tim Ferriss
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 三生石上(FineUI控件)
W
WeLiveSecurity
PCI Perspectives
PCI Perspectives
Attack and Defense Labs
Attack and Defense Labs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
宝玉的分享
宝玉的分享
IT之家
IT之家
Hacker News: Ask HN
Hacker News: Ask HN
The Register - Security
The Register - Security
T
The Exploit Database - CXSecurity.com
T
Threat Research - Cisco Blogs

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
GitHub - bartei/git-agecrypt: Transparent file-level encryption for git repositories, powered by age.
bartei81 · 2026-04-27 · via Hacker News: Show HN

CI Audit Coverage Latest release Downloads License: MPL-2.0 Rust

Website: https://bartei.github.io/git-agecrypt/

Transparent file-level encryption for files in a git repository, powered by age. The plaintext stays in your working tree; the ciphertext is what travels through git add, git push, and ends up in the remote.

git-agecrypt is a modern, portable replacement for git-crypt: same workflow, but using age instead of GPG. Recipients can be age x25519 keys, OpenSSH ed25519 / RSA keys, or any age plugin recipient (e.g. YubiKey PIV via age-plugin-yubikey).

Features

  • Encryption is transparent. Once configured, regular git add / git commit / git push / git pull / git diff work as usual — files are encrypted on the way into the index and decrypted on checkout.
  • Multi-recipient. Encrypt a file to any number of recipients; any single matching identity decrypts it.
  • Per-path policy. Different files can be encrypted to different recipient sets, configured in a single committed git-agecrypt.toml.
  • Key rotation friendly. Add or remove recipients without rewriting history; the next commit re-encrypts only what changed.
  • Hardware key support. Use age plugin recipients to keep the long-lived secret on a YubiKey or another secure element.
  • Stable ciphertext. Re-running git status / git add against an unchanged plaintext doesn't churn the encrypted blob — a blake3 sidecar makes the encrypted output deterministic relative to the working copy.

Installation

Pre-built binaries

Each release ships archives for:

Platform Archive
Linux x86_64 (glibc) git-agecrypt-vX.Y.Z-x86_64-unknown-linux-gnu.tar.gz
Linux x86_64 (musl, static) git-agecrypt-vX.Y.Z-x86_64-unknown-linux-musl.tar.gz
macOS Intel git-agecrypt-vX.Y.Z-x86_64-apple-darwin.tar.gz
macOS Apple Silicon git-agecrypt-vX.Y.Z-aarch64-apple-darwin.tar.gz
Windows x86_64 git-agecrypt-vX.Y.Z-x86_64-pc-windows-msvc.zip
# Example: Linux x86_64 musl, install to ~/.local/bin
$ curl -L https://github.com/bartei/git-agecrypt/releases/latest/download/git-agecrypt-vX.Y.Z-x86_64-unknown-linux-musl.tar.gz \
    | tar -xz -C ~/.local/bin
$ git-agecrypt --version

From source (cargo)

$ cargo install --git https://github.com/bartei/git-agecrypt

Or clone and build:

$ git clone https://github.com/bartei/git-agecrypt
$ cd git-agecrypt
$ cargo install --path .

Nix

$ nix profile install github:bartei/git-agecrypt

A development shell (pkg-config, libgit2, cargo-limit, cargo-watch, just, grcov) is available via nix develop or nix-shell.

Verify the install

$ git-agecrypt --help
$ git-agecrypt --version

The binary should be discoverable on PATH. git-agecrypt init records the absolute path to the executable in the repo's .git/config, so once a repo is initialized you can move the binary, but you'll need to re-run init afterwards.

Quick start (5 minutes)

This walkthrough encrypts secrets/api-token for yourself, using a fresh age x25519 keypair.

# 1. Generate a personal age identity. Treat the resulting file like an SSH
#    private key — it's the only thing that can decrypt the repo's secrets.
$ age-keygen -o ~/.config/age/personal.key
Public key: age1qz5y…0p7w
$ chmod 600 ~/.config/age/personal.key

# 2. Inside your git repo, install the filter integration.
$ cd ~/work/my-project
$ git-agecrypt init

# 3. Tell git-agecrypt where YOUR private key lives. This is local-only;
#    it goes into .git/config, not into a tracked file.
$ git-agecrypt config add -i ~/.config/age/personal.key

# 4. Create the file you want to encrypt and register a recipient for it.
$ mkdir -p secrets
$ printf 'super-secret-token\n' > secrets/api-token
$ git-agecrypt config add \
    -r age1qz5y…0p7w \
    -p secrets/api-token

# 5. Tell git which paths the filter applies to. .gitattributes is committed.
$ echo 'secrets/* filter=git-agecrypt diff=git-agecrypt' >> .gitattributes

# 6. Commit. The blob in git is encrypted; your working copy is plaintext.
$ git add .gitattributes git-agecrypt.toml secrets/api-token
$ git commit -m "encrypted api-token"

# 7. Verify: this prints ciphertext (starts with "age-encryption.org/v1").
$ git show HEAD:secrets/api-token

After cloning the repo on another machine, run git-agecrypt init once and git-agecrypt config add -i <path-to-private-key> — the recipients in git-agecrypt.toml are already there. git checkout will decrypt back to plaintext automatically.

Commands

All commands print contextual help with git-agecrypt <command> --help.

git-agecrypt init

Wires git-agecrypt into the current repository as a clean / smudge / textconv driver in .git/config. Idempotent — safe to re-run after moving the binary.

$ git-agecrypt init

git-agecrypt deinit

Removes the filter and diff configuration this tool added, and clears the per-file ciphertext cache under .git/git-agecrypt/. Files committed encrypted stay encrypted in historydeinit only removes the local integration, not the encryption itself.

$ git-agecrypt deinit

git-agecrypt status

Prints the currently configured identities (decryption keys) and recipients (encryption keys). Use this to confirm a repo is set up correctly.

$ git-agecrypt status
The following identities are currently configured:
    ✓ /home/alice/.config/age/personal.key

The following recipients are configured:
    secrets/api-token: age1qz5y…0p7w
    secrets/db.env:    age1qz5y…0p7w
    secrets/db.env:    age1jrnk…2qzp   # bob's key

A mark means the identity file exists and parses; a mark means it's misconfigured (file missing, wrong permissions, not a valid age key, etc.).

git-agecrypt config add -i <path> — register a decryption identity

Tells git-agecrypt where to find one of your private keys. Stored in .git/config under git-agecrypt.config.identity, so it's per-clone and never committed. You can register multiple identities; any one that matches will be used during decryption.

# Native age x25519 secret key file
$ git-agecrypt config add -i ~/.config/age/personal.key

# An OpenSSH ed25519 key already used for SSH auth
$ git-agecrypt config add -i ~/.ssh/id_ed25519

# A YubiKey-backed age plugin identity stub
$ git-agecrypt config add -i ~/.config/age/yubikey-stub.txt

git-agecrypt config remove -i <path>

Removes a previously registered identity. The key file itself is not deleted.

$ git-agecrypt config remove -i ~/.config/age/personal.key

git-agecrypt config list -i

Lists registered identities, each annotated with whether it currently parses as a valid age identity.

$ git-agecrypt config list -i
The following identities are currently configured:
    ✓ /home/alice/.config/age/personal.key
    ✓ /home/alice/.ssh/id_ed25519

git-agecrypt config add -r <recipient> -p <path>... — add an encryption recipient

Registers one or more public keys (recipients) that should be able to decrypt one or more paths. Both -r and -p accept multiple values; you can also repeat the command per recipient. The mapping lives in a committed git-agecrypt.toml at the repo root, so collaborators inherit it on clone.

Recipients can be:

  • An age native public key: age1…
  • An OpenSSH ssh-ed25519 or ssh-rsa line: typically cat ~/.ssh/id_ed25519.pub
  • An age plugin recipient: e.g. the age1yubikey1… line emitted by age-plugin-yubikey
# Encrypt one file to one recipient
$ git-agecrypt config add \
    -r "$(cat ~/.ssh/id_ed25519.pub)" \
    -p secrets/api-token

# Encrypt several files to the same recipient
$ git-agecrypt config add \
    -r age1qz5y…0p7w \
    -p secrets/api-token secrets/db.env config/prod.env

# Encrypt one file to several recipients (alice, bob, ci)
$ git-agecrypt config add \
    -r age1qz5y…0p7w \
    -r age1jrnk…2qzp \
    -r age1ci8m…lkpw \
    -p secrets/api-token

After the first config add, edit .gitattributes (a regular committed file) so git knows which paths use this filter:

secrets/**          filter=git-agecrypt diff=git-agecrypt
config/*.env        filter=git-agecrypt diff=git-agecrypt
**/*.secret.yaml    filter=git-agecrypt diff=git-agecrypt

Filters are applied to files, not directories — write secrets/** (or list specific files) rather than secrets/.

git-agecrypt config remove -r <recipient> — remove a recipient

Drop a recipient from one or more paths, or from every path it currently appears in. Removing a recipient does not rewrite history or re-encrypt existing blobs; it takes effect on the next change to each affected file.

# Drop bob from secrets/api-token only
$ git-agecrypt config remove \
    -r age1jrnk…2qzp \
    -p secrets/api-token

# Drop bob entirely (every path he was a recipient of)
$ git-agecrypt config remove -r age1jrnk…2qzp

# Clear all recipients of a path (e.g. before reassigning)
$ git-agecrypt config remove -p secrets/api-token

git-agecrypt config list -r

Prints the path → recipient mapping currently in git-agecrypt.toml.

$ git-agecrypt config list -r
The following recipients are configured:
    secrets/api-token: age1qz5y…0p7w
    secrets/api-token: age1jrnk…2qzp
    secrets/db.env:    age1qz5y…0p7w

Internal subcommands

git-agecrypt clean, smudge, and textconv are invoked by git itself via the filter wiring set up by init. You should not need to call them directly. They are hidden from --help to keep the user-facing CLI small.

Common workflows

Onboard a new collaborator (Bob)

Bob has just shared his age public key with you. To grant him access to a secret:

# 1. Add Bob's recipient to every file he should be able to decrypt.
$ git-agecrypt config add \
    -r age1jrnk…2qzp \
    -p secrets/api-token secrets/db.env

# 2. Touch each affected file so the next commit re-encrypts to the
#    expanded recipient set. (`cat … >` rewrites mtime in place.)
$ for f in secrets/api-token secrets/db.env; do cp "$f" "$f.tmp" && mv "$f.tmp" "$f"; done

# 3. Commit and push.
$ git add git-agecrypt.toml secrets/api-token secrets/db.env
$ git commit -m "grant bob access to api-token and db.env"
$ git push

On Bob's side:

$ git clone <repo>
$ cd <repo>
$ git-agecrypt init
$ git-agecrypt config add -i ~/.config/age/bob.key
$ git checkout -- secrets/   # smudge filter decrypts on checkout

Off-board a collaborator (revoke Bob)

$ git-agecrypt config remove -r age1jrnk…2qzp
# Re-touch every file so it gets re-encrypted to the reduced recipient set.
$ git ls-files | xargs -I {} sh -c 'grep -q git-agecrypt .gitattributes && cp "{}" "{}.tmp" && mv "{}.tmp" "{}"' || true
$ git add -A && git commit -m "revoke bob"
$ git push

Important: git-agecrypt controls the current state of the repository, not its history. If Bob ever cloned the repo, he still holds copies of the encrypted blobs as they were at clone time, and his identity can still decrypt them. After revoking, rotate the underlying secrets (e.g. issue a new API token, change the DB password) — that is the actual revocation.

Use a YubiKey via age-plugin-yubikey

# One-time setup — generates a hardware-backed age identity slot.
$ age-plugin-yubikey
# Pick "Generate a new identity"; note the printed recipient (age1yubikey1…)
# and the saved identity stub file (e.g. ~/.config/age/yubikey-stub.txt).

# Register the stub locally as your identity.
$ git-agecrypt config add -i ~/.config/age/yubikey-stub.txt

# Register the printed recipient so files get encrypted to your YubiKey.
$ git-agecrypt config add -r age1yubikey1… -p secrets/api-token

Decryption now requires the YubiKey to be plugged in and (depending on slot config) touched.

CI/CD: a deploy key that can read secrets

Generate a dedicated keypair for CI, register the public key as a recipient, and inject the private key into the CI environment (e.g. as a base64-encoded secret).

# Local: generate the CI keypair
$ age-keygen -o ./ci.key
Public key: age1ci8m…lkpw
$ git-agecrypt config add -r age1ci8m…lkpw -p $(git ls-files secrets/)

# CI workflow (pseudo-code):
#   echo "$AGE_CI_KEY" > /tmp/ci.key && chmod 600 /tmp/ci.key
#   git-agecrypt init
#   git-agecrypt config add -i /tmp/ci.key
#   git checkout -- secrets/

Encrypt a brand new file in a fresh clone

$ git-agecrypt init
$ git-agecrypt config add -i ~/.config/age/personal.key
$ printf 'shh\n' > secrets/new-token
$ git-agecrypt config add -r age1qz5y…0p7w -p secrets/new-token
$ echo 'secrets/new-token filter=git-agecrypt diff=git-agecrypt' >> .gitattributes
$ git add .gitattributes git-agecrypt.toml secrets/new-token
$ git commit -m "encrypted new-token"

Inspect what's actually in git

# What does git see for this file? (Should be age ciphertext.)
$ git show HEAD:secrets/api-token

# Diff between commits decrypts via the textconv filter and shows plaintext.
$ git log -p secrets/api-token

# The working copy is always plaintext.
$ cat secrets/api-token

Tear down

$ git-agecrypt deinit

This removes the filter wiring from .git/config and clears the local .git/git-agecrypt/ cache. Tracked files (.gitattributes, git-agecrypt.toml) are not modified — delete them by hand if you want to fully un-encrypt the repo.

How it works

git-agecrypt plugs into git's smudge / clean / textconv filter mechanism. After init, the repo's .git/config contains:

[filter "git-agecrypt"]
    required = true
    smudge   = /path/to/git-agecrypt smudge -f %f
    clean    = /path/to/git-agecrypt clean -f %f
[diff "git-agecrypt"]
    textconv = /path/to/git-agecrypt textconv

Git invokes these driver commands per file when .gitattributes opts the path in:

  • clean runs on git add. Plaintext is read on stdin; ciphertext goes to stdout into the index.
  • smudge runs on git checkout. Ciphertext from the index is read on stdin; plaintext is written into the working tree.
  • textconv runs on git diff / git log -p. The encrypted file is decrypted on the fly so diffs show plaintext.

Stable ciphertext via blake3 sidecars

Age encryption is non-deterministic: the same plaintext encrypted twice produces two different ciphertexts. Without mitigation, every git status / git add would create a fresh encrypted blob and show every encrypted file as modified. To avoid this, clean keeps two sidecar files per encrypted path under .git/git-agecrypt/:

  • <path>.hash — blake3 hash of the most recent plaintext seen
  • <path>.age — the ciphertext last produced for that plaintext

When clean is invoked, it hashes the incoming plaintext. If the hash matches the saved one, the saved ciphertext is emitted verbatim — git sees no change. If the hash differs, clean decrypts the version currently in HEAD and compares it against the new plaintext; if they're equal, the HEAD ciphertext is reused. Only if both checks fail does the file get re-encrypted with fresh randomness.

smudge populates these sidecars too, so the next clean on the same plaintext short-circuits.

Where things are stored

Location Contents Tracked in git?
git-agecrypt.toml (repo root) path → recipient mappings Yes — committed and shared
.gitattributes which paths use the filter Yes — committed and shared
.git/config (filter wiring) absolute path to the binary No
.git/config ([git-agecrypt "config"] identity) paths to your private keys No
.git/git-agecrypt/*.{hash,age} per-file ciphertext + plaintext-hash cache No

Encryption never needs the private key, so git-agecrypt config add -r works on a fresh clone before any identity is configured. Decryption of course does — that's what config add -i is for.

Limitations

  • The binary is re-executed once per file per git operation. Repos with thousands of encrypted files will see noticeable overhead. Implementing git's long-running filter protocol would amortize this, but isn't done yet.
  • During encrypt / decrypt the whole file is loaded into memory. Don't use this for files that don't fit in RAM.
  • Filters apply to files, not directories. Use secrets/**, not secrets/, in .gitattributes.
  • Removing a recipient does not rewrite git history — old commits remain decryptable by the previous keys. Treat key revocation as a prompt to also rotate the underlying secrets.

Known security advisories

The age crate transitively depends on rsa 0.9.x, which is affected by RUSTSEC-2023-0071 ("Marvin Attack" — potential key recovery through timing sidechannels). No upstream fix is currently available. This advisory only affects users who decrypt files for SSH-RSA recipients; users who only use x25519 (age native), ed25519 SSH keys, or age plugin recipients are not impacted.

The advisory is whitelisted in .cargo/audit.toml so CI's cargo audit job stays green; it will be removed as soon as upstream ships a fix.

Contributing

Bug reports and PRs are welcome — open an issue at https://github.com/bartei/git-agecrypt/issues. Local development setup:

$ just check          # fmt + clippy + tests
$ just docker-test    # full test suite + coverage in a sandboxed container
$ just coverage       # local coverage with cargo-llvm-cov

CI runs cargo fmt --check, cargo clippy -D warnings, the test suite on Linux / macOS / Windows, cargo audit, and a cargo llvm-cov coverage job. The coverage job:

  • prints the per-file table on the run's Summary page (no need to download the artifact),
  • uploads lcov.info / coverage.json / a per-file summary as a downloadable artifact,
  • gates CI with --fail-under-lines 80,
  • on main, refreshes the coverage badge by publishing a shields.io endpoint JSON to the orphan coverage-badge branch.

License

Mozilla Public License 2.0.