Skip to content

Add SpotBugs check to CI and expand PATH_TRAVERSAL_IN suppression#273

Merged
bernardladenthin merged 2 commits into
mainfrom
claude/friendly-feynman-as1vh1
Jun 26, 2026
Merged

Add SpotBugs check to CI and expand PATH_TRAVERSAL_IN suppression#273
bernardladenthin merged 2 commits into
mainfrom
claude/friendly-feynman-as1vh1

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Add SpotBugs static analysis check to the CI pipeline (fail-fast on findings)
  • Expand the PATH_TRAVERSAL_IN suppression in spotbugs-exclude.xml to cover OfflineModelGuard and ModelParameters in addition to LlamaLoader
  • Update the suppression comment with a detailed threat-model analysis explaining why these are false positives (all inputs are operator-controlled JVM properties, not untrusted end-user input)

Test plan

  • CI is green on this branch (SpotBugs check now runs and passes)
  • Existing SpotBugs exclusions remain valid

Related issues / PRs

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes (if there are, I have notified the maintainer privately per SECURITY.md)

https://claude.ai/code/session_0137c1LhUbNvW3kt4eF9Kqyb

claude added 2 commits June 26, 2026 06:38
…AVERSAL_IN

spotbugs:check is bound to the Maven verify phase, which only the publish
deploy goal reaches, so SpotBugs ran only at snapshot/release publish — a
PATH_TRAVERSAL_IN finding red a release after every jar had already built.

Add a SpotBugs step to the existing fast code-style job (after Spotless,
before the informational jdeps step) so it runs on every PR/push and gates
publish (publish-* already needs: code-style). Mirrors the existing early
Spotless gate; no needs: change required.

Provisionally suppress the PATH_TRAVERSAL_IN finding in OfflineModelGuard /
ModelParameters (operator-supplied --model path; same threat model as the
existing LlamaLoader suppression) and track an open deep-check in TODO.md for
whether it — and the LlamaLoader suppression — can be genuinely resolved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137c1LhUbNvW3kt4eF9Kqyb
…e positive)

Deep-checked the two PATH_TRAVERSAL_IN sites flagged by findsecbugs:
LlamaLoader (native-lib path from the lib.path / java.library.path / tmpdir
JVM properties) and OfflineModelGuard.check (a read-only Files.exists on the
configured model path). In both the tainted input is the operator's own
process configuration set at launch, not untrusted input crossing a privilege
boundary, and there is no allowed-root to validate against (pointing at an
arbitrary GGUF/library anywhere on disk is the whole point). So it is a settled
false positive for a JNI library and no code fix is appropriate.

Consolidate the two suppression blocks into one finalized <Match> over all
three classes with the reviewed rationale, drop the "provisional/under review"
language, and close the deep-check item in TODO.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137c1LhUbNvW3kt4eF9Kqyb
@sonarqubecloud

Copy link
Copy Markdown

@bernardladenthin bernardladenthin merged commit b9ad93a into main Jun 26, 2026
16 of 19 checks passed
@bernardladenthin bernardladenthin deleted the claude/friendly-feynman-as1vh1 branch June 26, 2026 06:59
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