From 9eda42aab2122d90555c7f822b646a0a5c64b6f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 24 Jul 2026 10:38:16 +0000 Subject: [PATCH 1/3] Adopt Claude Code: add CLAUDE.md --- AGENTS.md | 5 +++++ CLAUDE.md | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..6593765 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,5 @@ +# Agent guide + +See [CLAUDE.md](CLAUDE.md) for this repository's agent instructions. +CLAUDE.md is the source of truth; this file exists so agents that follow +the cross-tool AGENTS.md convention find the same guidance. diff --git a/CLAUDE.md b/CLAUDE.md index 578c11a..ac46546 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,8 +1,27 @@ # CLAUDE.md +See [AGENTS.md](AGENTS.md) for the companion agent guide. + + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + ## Project -Java project built with Maven 3.9.X. Run `mvn install` from the root to build. +Java project built with Maven 3.9.X: a collection of small, self-contained security-related examples (e.g. zip bomb construction). Run `mvn install` from the root to build. + +## Commands + +- Build (root): `mvn install` +- Run all tests: `mvn test` +- Run a single test class: `mvn test -pl examples -Dtest=ZipBTest` +- Run a single test method: `mvn test -pl examples -Dtest=ZipBTest#happyPath` + +## Architecture + +- Multi-module Maven reactor: the root `pom.xml` (`packaging=pom`) declares only `dependencyManagement`/`pluginManagement`; the `examples` module (artifact `security.examples`) is currently the only module and must not declare its own dependency versions or plugin versions — those come from the root only, per the Maven rule below. +- Base package for all example code: `io.github.adamw7.security`. +- Each security example is a standalone, runnable class with a `main` method (e.g. `ZipB`), paired with a unit test class of the same name + `Test` suffix in `src/test/java` under the same package. +- Logging is via Log4j2, configured in `examples/src/main/resources/log4j2.properties`. ## Java version Java 25. From 1b01bd253793155666a8ca9be074a5e0bed23fd0 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 24 Jul 2026 10:38:16 +0000 Subject: [PATCH 2/3] Add claude-code-enforcer to the build --- pom.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pom.xml b/pom.xml index b564e89..7b50df3 100644 --- a/pom.xml +++ b/pom.xml @@ -51,5 +51,36 @@ + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.3 + + + io.github.adamw7 + tools.claude-code-enforcer + 2.5.0-SNAPSHOT + + + + + enforce-claude-md + validate + false + + enforce + + + + + ${project.basedir}/CLAUDE.md + + + + + + + From 183becf5e74d2eb1e83ce1fc44a205efdc04b4d6 Mon Sep 17 00:00:00 2001 From: Adam Witkowski <85751083+adamw7@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:11:55 +0200 Subject: [PATCH 3/3] Update dependency version to 2.5.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b50df3..2594068 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ io.github.adamw7 tools.claude-code-enforcer - 2.5.0-SNAPSHOT + 2.5.0