Skip to content

chore(v0.4.0): foundation — deps, ArchUnit fix, LICENSE, pom metadata#59

Merged
VirusAlex merged 1 commit into
mainfrom
chore/v040-foundation
Apr 30, 2026
Merged

chore(v0.4.0): foundation — deps, ArchUnit fix, LICENSE, pom metadata#59
VirusAlex merged 1 commit into
mainfrom
chore/v040-foundation

Conversation

@VirusAlex
Copy link
Copy Markdown
Owner

Summary

First of ~5 PRs that close the v1.0.0 audit blockers/highs/mediums. This one is mechanical: dep bumps, ArchUnit fix, LICENSE, pom metadata, version bump. No behaviour change in production code.

Closes audit BLOCKERs B1, B2, B3, B4 and HIGH H4.

Why this matters

ArchUnit 1.3.0 + JDK 25 class-file v69 = ArchUnit drops every production class at import time and the no-delete invariant is unenforced. I confirmed this by running mvn test -Dtest=ArchitectureTest locally: 117 Couldn't import class from ... warnings, all 5 rules trivially pass against an empty set. The headline safety guarantee of the project was a no-op for the entire v0.3.x line. Bump fixes it.

Plus: Logback 1.5.12 has CVE-2024-12798 (HIGH). LICENSE was missing → all-rights-reserved by default. pom said 0.1.0-SNAPSHOT while latest tag is v0.3.3. Etc.

Changes

Build / packaging

  • Bump archunit 1.3.0 → 1.4.1 (Java 25 support).
  • Bump logback 1.5.12 → 1.5.13 (CVE-2024-12798).
  • Bump javalin 6.4.0 → 6.7.0 (latest 6.x — Javalin 7 / Jetty 12 unreleased; staying on Jetty 11.0.25, its latest patch).

ArchUnit hardening

  • New sanity assert archUnitImportedProductionClasses fails the build if fewer than 50 classes were imported — catches future bytecode-vs-archunit drift before rules silently no-op again.
  • Whitelist FileSidecarStore (sparse pre-allocation via setLength, never shrinks; would now fail B2 since B1 unblocked the import).
  • New rule: ban FileChannel.truncate outside the whitelist (NIO twin of RandomAccessFile.setLength).
  • New rule: ban access to StandardOpenOption.TRUNCATE_EXISTING outside the whitelist.

License / metadata

  • LICENSE (Apache-2.0) and NOTICE listing bundled third-party deps at repo root.
  • pom.xml gains <licenses>, <scm>, <url>, <developers>, <inceptionYear>; description drops the "Debian" remnant.
  • Container image labels: licenses="NOASSERTION""Apache-2.0" (Dockerfile + release.yml).

Version + misc

  • pom.xml version 0.1.0-SNAPSHOT0.4.0-SNAPSHOT.
  • .dockerignore so local docker build doesn't ship the entire worktree (.git, target/, .worktrees/, src/, …).
  • ci.yml: concurrency group cancels superseded runs on the same ref.
  • README.md: full ArchUnit whitelist (now 4 classes, not "one path"); list new banned APIs.
  • CHANGELOG.md seeded with the v0.4.0 entry.

Test plan

  • Local mvn test -Dtest=ArchitectureTest8 tests pass (5 original + sanity + 2 new bans). Pre-bump: silent no-op.
  • Local mvn test → 361 tests, 0 failures, 56 errors — all in the known Windows-env Jetty-loopback category, none new.
  • CI green on Linux (the only env where Jetty server-tier tests run).
  • Manual: ./mvnw verify produces target/netcopy.jar whose --version prints netcopy 0.4.0-SNAPSHOT.

Follow-ups (separate PRs in this v0.4.0 train)

  • PR-B: security hardening (NOFOLLOW_LINKS, manifest/register validation, acknowledgeOverwrite, hashHex rename, token scope, browse-stats fix)
  • PR-C: resource limits (ManifestRegistry cleanup, SO_TIMEOUT, conn caps, WS sub cap, body size, posix perms, shared HttpClient)
  • PR-D: state schema + Docker (schemaVersion, HEALTHCHECK, multi-arch, :latest conditional, SHA-pin, gosu checksum)
  • PR-E: docs alignment (README endpoint table, XXH3/SHA-256, data-formats.md proto v2)

🤖 Generated with Claude Code

…adata

Closes audit BLOCKERs B1, B2, B3, B4 and HIGH H4. Mechanical changes only;
no behavioural change in production code.

Build / packaging
- Bump archunit 1.3.0 → 1.4.1 (Java 25 / class file v69 support; pre-1.4
  silently dropped every production class on import, so all five no-delete
  rules trivially passed against an empty class set — the advertised
  no-delete invariant was unenforced for the entire v0.3.x line).
- Bump logback 1.5.12 → 1.5.13 (CVE-2024-12798).
- Bump javalin 6.4.0 → 6.7.0 (latest 6.x; Javalin 7 / Jetty 12 not yet
  released, so we stay on Jetty 11.0.25 — its latest patch line, security
  backports through 2025).

ArchUnit hardening
- New sanity assert archUnitImportedProductionClasses: fails the build if
  fewer than 50 production classes are imported. Catches future
  bytecode-version-vs-archunit drift before the rules silently no-op again.
- Whitelist FileSidecarStore.setLength (sparse pre-allocation only — never
  shrinks; flagged by audit B2 once B1 was fixed).
- New rule: ban FileChannel.truncate outside the whitelist (NIO twin of
  RandomAccessFile.setLength, identical hazard, previously uncovered).
- New rule: ban access to StandardOpenOption.TRUNCATE_EXISTING outside the
  whitelist (zeroes the target file before writing — only legitimate user is
  JsonJobStore.writeAtomic on its tmp file).

License / metadata
- Apache-2.0 LICENSE and NOTICE files at repo root. Without them v0.3.x was
  technically all-rights-reserved by default copyright and could not be
  legally redistributed despite "open" framing.
- pom.xml gains <licenses>, <scm>, <url>, <developers>, <inceptionYear>;
  description drops the "Debian" remnant.
- Container image labels switched from licenses="NOASSERTION" to "Apache-2.0"
  (Dockerfile + release.yml).

Version drift fix
- pom.xml version 0.1.0-SNAPSHOT → 0.4.0-SNAPSHOT. Latest tag is v0.3.3, so
  --version on a locally-built jar was reporting 0.1.0-SNAPSHOT.

CI
- ci.yml: concurrency group cancels superseded runs on the same ref. Saves
  runner minutes on PR pushes.

Misc
- .dockerignore: stops local `docker build` from shipping .git, target/,
  .worktrees/, src/, etc. into the image's build context (multi-hundred MB
  was being copied unnecessarily).
- README: list full ArchUnit whitelist (3 → 4 classes after this commit) and
  the new banned APIs; drop the "one whitelisted code path" claim that was
  incorrect even before this change.
- CHANGELOG.md seeded with the v0.4.0 entry plus brief history of the 0.3.x
  line.

Local mvn test: 361 unit tests, 0 failures, 56 errors all in the known
Jetty-loopback Windows-env category (server-tier tests). Linux CI is green.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@VirusAlex VirusAlex merged commit eb89c13 into main Apr 30, 2026
1 check passed
@VirusAlex VirusAlex deleted the chore/v040-foundation branch April 30, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants