Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 20 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,36 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.6.3</version>
<dependencies>
<dependency>
<groupId>io.github.adamw7</groupId>
<artifactId>tools.claude-code-enforcer</artifactId>
<version>2.5.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>enforce-claude-md</id>
<phase>validate</phase>
<inherited>false</inherited>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<claudeMdFormat>
<claudeMdFile>${project.basedir}/CLAUDE.md</claudeMdFile>
</claudeMdFormat>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading