Skip to content

style: fix all checkstyle violations - #115

Merged
MarkusPaulsen merged 7 commits into
mainfrom
chore/fix-checkstyle-violations
Jul 15, 2026
Merged

style: fix all checkstyle violations#115
MarkusPaulsen merged 7 commits into
mainfrom
chore/fix-checkstyle-violations

Conversation

@MarkusPaulsen

Copy link
Copy Markdown
Collaborator

Summary

Clears all 347 checkstyle violations reported by the new static analysis job, so mvn checkstyle:check passes and that step of the job turns green.

What changed

  • 271 NeedBraces: braces added to single-statement if/for bodies. A brace-less branch is the goto fail shape, where a later edit silently lands outside the branch, which is worth avoiding in a security boundary. Applied with the OpenRewrite NeedBraces recipe, so the transformation is made on the syntax tree rather than by matching text.
  • 22 HideUtilityClassConstructor: private constructors that throw, following the convention the code base already uses and that FileHandlerConstantsTest and JavaWalaTestCaseCollectionTest assert. Advice classes use the instrumentation message key, the others the general one.
  • 24 FinalClass: classes that only have private constructors are now final. This is not an API break: a private constructor already made subclassing impossible.
  • 18 ConstantName: constants renamed to upper snake case, including the eleven public pointcut maps (methodsWhichCanReadFiles becomes METHODS_WHICH_CAN_READ_FILES, and so on). Their 67 references across the agent, the binding definitions and two tests are renamed with them.
  • 12 EqualsAvoidNull: the string literal moves to the left of equals. Every site was checked individually, because this is the one fix that could have silently weakened the boundary: four sites are already null-guarded (aopMode == null || ...), three read values that are never null (StackTraceElement.getClassName, Class.getName), three are on a @Nonnull parameter, and the "/" comparison fails closed either way. No site relied on the NullPointerException as its fail-closed path.
  • MissingSwitchDefault: the switch over JavaAOPTestCaseSupported gets a default branch that throws. The cases are exhaustive today, so it is only reachable once a new kind of test case is added, and failing loudly there beats writing no advice settings and running that test case unguarded.
  • MultipleVariableDeclarations, RedundantModifier, ParameterName: one each.

Validation

  • mvn checkstyle:check: 0 violations (was 347)
  • mvn spotless:check: passes
  • mvn compile and mvn test-compile: pass
  • mvn test -Parchitecture-tests: 573 tests, 0 failures, identical to the baseline before these fixes

Note

The functional test half exceeds the 45-minute CI budget on main as well, so it is not green there yet. That is pre-existing and independent of this branch.

The static analysis job reported 347 checkstyle violations. This clears them,
so mvn checkstyle:check now passes.

- add braces to 271 single-statement if and for bodies. A brace-less branch is
  the shape behind the "goto fail" class of bug, where a later edit silently
  lands outside the branch, which is worth avoiding in a security boundary.
  Applied with the OpenRewrite NeedBraces recipe, so the change is made on the
  syntax tree rather than by matching text
- give the 22 utility classes a private constructor that throws, following the
  convention the code base already uses and that FileHandlerConstantsTest and
  JavaWalaTestCaseCollectionTest assert, and make the 24 classes final that
  only have private constructors
- rename the constants that were not in upper snake case, including the eleven
  public pointcut maps, whose 67 references across the agent, the binding
  definitions and two tests are updated with them
- put the string literal on the left in the twelve equals comparisons that had
  it on the right. Each site is either already null-guarded, or reads a value
  that is never null (StackTraceElement.getClassName, Class.getName), or is a
  @nonnull parameter, so no site relied on the null pointer exception as its
  fail-closed path
- give the switch over JavaAOPTestCaseSupported a default branch that throws.
  The cases are exhaustive today, so it is only reachable once a new kind of
  test case is added, and failing loudly there is better than writing no advice
  settings and running the test case unguarded
- split a multiple variable declaration, drop a redundant public modifier and
  rename a WALA parameter that was called G
Copilot AI review requested due to automatic review settings July 14, 2026 20:48
@MarkusPaulsen
MarkusPaulsen requested review from a team and krusche as code owners July 14, 2026 20:48
@github-actions github-actions Bot added aop Automated area label: aop architecture Automated area label: architecture ast Automated area label: ast tests Automated area label: tests labels Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@MarkusPaulsen, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 798fd5c0-6bdd-4ddf-a068-893cc3793184

📥 Commits

Reviewing files that changed from the base of the PR and between 373d47e and 5e2b332.

📒 Files selected for processing (3)
  • src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java
  • src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ClassMemberAccessor.java
📝 Walkthrough

Walkthrough

The pull request hardens utility and instrumentation classes, renames pointcut constants, prevents advice instantiation, improves reset handling and caching, corrects localisation keys, and standardises control-flow blocks.

Changes

Instrumentation contracts and runtime safety

Layer / File(s) Summary
Pointcut definitions and wiring
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/..., src/test/java/.../instrumentation/...
Pointcut maps are renamed to uppercase constants, agent and binding references are updated, and coverage tests use the renamed maps.
Advice construction and guards
src/main/java/de/tum/cit/ase/ares/api/aop/java/...
Advice classes reject instantiation, unsupported enum values fail explicitly, and selected comparisons use literal-first equality.
Security and cache handling
src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java, src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java
IO-manager caching uses ConcurrentHashMap; reset failures are thrown or attached as suppressed exceptions according to test failure state.

API and implementation hardening

Layer / File(s) Summary
Utility contracts and identifiers
src/main/java/de/tum/cit/ase/ares/api/...
Selected classes are final, and logger, graph, primitive-wrapper, and localisation-cache identifiers are standardised.
Control-flow structure
src/main/java/de/tum/cit/ase/ares/api/{dynamic,internal,io,jqwik,jupiter,security,util}/...
Validation, sanitisation, IO, extension, security, and utility branches are rewritten with explicit braces while retaining their conditions and outcomes.
Architecture and structural checks
src/main/java/de/tum/cit/ase/ares/api/{architecture,structural,ast}/...
WALA helpers, structural providers, class scanning, AST checks, and resource-limit handling receive equivalent block-structured control flow.
Localisation correction
src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java, src/main/resources/de/tum/cit/ase/ares/api/localization/*
The method-annotation localisation key is corrected in code and both message bundles.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: security fix

Suggested reviewers: krusche

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.96% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed Concise and directly reflects the checkstyle clean-up and automation-focused static-analysis fix.
Description check ✅ Passed It includes Summary and Changes, and the rationale is covered implicitly even without a separate heading.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sandbox Fail-Closed Behaviour ✅ Passed Behavioural edits stay deny-by-default: unsupported enum values now throw, bootstrap reset failures throw SecurityException, and null-prone equals checks were made null-safe.
Trusted Boundary Preservation ✅ Passed PASS: edits are confined to trusted Ares code/tests/resources, with no student-controlled paths touched; boundary-related changes are utility hardening or brace-only.
Github Workflow Least Privilege ✅ Passed No workflow files changed in the PR diff; existing workflows use job-scoped read-only permissions, persist-credentials: false, and the sole pull_request_target job does not checkout PR code.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/fix-checkstyle-violations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves the large set of Checkstyle findings introduced by the new static analysis job, with a focus on enforcing consistent control-flow bracing, utility-class patterns, and constant naming across the Ares API and instrumentation code.

Changes:

  • Added missing braces around single-statement control-flow blocks (NeedBraces) across main + test sources.
  • Standardized utility/helper classes (final where applicable, hidden constructors) and renamed many constants/maps to comply with ConstantName / FinalClass / HideUtilityClassConstructor.
  • Adjusted several equality checks to be null-safe (EqualsAvoidNull) and added a defensive default branch for an exhaustive switch.

Reviewed changes

Copilot reviewed 108 out of 108 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationDesktopClassificationTest.java Update to renamed pointcut constant map identifiers.
src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolboxTest.java Update to renamed pointcut constant map identifiers.
src/main/java/de/tum/cit/ase/ares/api/util/UnexpectedExceptionError.java NeedBraces cleanup in suppressed/nullable handling.
src/main/java/de/tum/cit/ase/ares/api/util/ReflectionTestUtils.java NeedBraces cleanup in reflection helpers.
src/main/java/de/tum/cit/ase/ares/api/util/ProjectSourcesFinder.java Convert to utility pattern (final + throwing private ctor) + NeedBraces.
src/main/java/de/tum/cit/ase/ares/api/util/PathRule.java NeedBraces cleanup in matching/equals implementation.
src/main/java/de/tum/cit/ase/ares/api/util/PackageRule.java NeedBraces cleanup + loop bracing in regex conversion.
src/main/java/de/tum/cit/ase/ares/api/util/IgnorantUnmodifiableList.java NeedBraces cleanup in iterator mutation guard.
src/main/java/de/tum/cit/ase/ares/api/util/FileTools.java Utility-class finalization + minor maintainability refactor for declarations/NeedBraces.
src/main/java/de/tum/cit/ase/ares/api/util/DependencyManager.java Logger constant naming alignment (LOG) + updated references.
src/main/java/de/tum/cit/ase/ares/api/util/DelayedFilter.java NeedBraces cleanup in constructor and state transitions.
src/main/java/de/tum/cit/ase/ares/api/util/ClassMemberAccessor.java Utility-class finalization.
src/main/java/de/tum/cit/ase/ares/api/TestUtils.java NeedBraces cleanup in thread-group traversal loop.
src/main/java/de/tum/cit/ase/ares/api/structural/testutils/ClassNameScanner.java NeedBraces cleanup in scan logic and filesystem walk.
src/main/java/de/tum/cit/ase/ares/api/structural/StructuralTestProvider.java NeedBraces cleanup in validation and JSON processing loops.
src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java NeedBraces cleanup in method checking and error throwing.
src/main/java/de/tum/cit/ase/ares/api/structural/ConstructorTestProvider.java NeedBraces cleanup in constructor checking and error throwing.
src/main/java/de/tum/cit/ase/ares/api/structural/ClassTestProvider.java NeedBraces cleanup in class-property validation.
src/main/java/de/tum/cit/ase/ares/api/structural/AttributeTestProvider.java NeedBraces cleanup in attribute checking and enum validation.
src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java NeedBraces cleanup in static init whitelist handling.
src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfigurationBuilder.java NeedBraces cleanup in validation and file-reading logic.
src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfiguration.java NeedBraces cleanup in equals implementation.
src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java Utility-class finalization.
src/main/java/de/tum/cit/ase/ares/api/PathType.java NeedBraces cleanup in path normalization and glob normalization loop.
src/main/java/de/tum/cit/ase/ares/api/PathActionLevel.java NeedBraces cleanup in action-level parsing.
src/main/java/de/tum/cit/ase/ares/api/Main.java Utility-class pattern applied (final + throwing private ctor).
src/main/java/de/tum/cit/ase/ares/api/localization/Messages.java Constant naming alignment + NeedBraces cleanup.
src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java Utility-class finalization.
src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java NeedBraces cleanup in exception aggregation.
src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterLocaleExtension.java NeedBraces cleanup in locale lifecycle.
src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterIOExtension.java NeedBraces cleanup in teardown guard.
src/main/java/de/tum/cit/ase/ares/api/jupiter/BenchmarkExtension.java Logger constant naming alignment (LOG) + updated reference.
src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikTestGuard.java NeedBraces cleanup in throwable post-processing.
src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikSecurityExtension.java NeedBraces cleanup in suppressed-exception handling.
src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikLocaleExtension.java NeedBraces cleanup in locale lifecycle.
src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikIOExtension.java NeedBraces cleanup + utility nested class finalization.
src/main/java/de/tum/cit/ase/ares/api/io/TestOutStream.java Constant naming alignment + NeedBraces cleanup around mirror/closed guards.
src/main/java/de/tum/cit/ase/ares/api/io/TestInStream.java NeedBraces cleanup around lazy input loading.
src/main/java/de/tum/cit/ase/ares/api/io/StaticLine.java NeedBraces cleanup in constructor validation.
src/main/java/de/tum/cit/ase/ares/api/io/OutputTestOptions.java NeedBraces cleanup in option membership check.
src/main/java/de/tum/cit/ase/ares/api/io/OutputTester.java NeedBraces cleanup in output processing and assertion formatting.
src/main/java/de/tum/cit/ase/ares/api/io/IOTester.java NeedBraces cleanup in install/uninstall guards.
src/main/java/de/tum/cit/ase/ares/api/io/InputTester.java NeedBraces cleanup in next-line selection and error paths.
src/main/java/de/tum/cit/ase/ares/api/io/DynamicLine.java NeedBraces cleanup in completion/append validations.
src/main/java/de/tum/cit/ase/ares/api/io/AbstractLine.java NeedBraces cleanup in equals and setter validations.
src/main/java/de/tum/cit/ase/ares/api/internal/TimeoutUtils.java NeedBraces cleanup in timeout selection, formatting, and thread factory.
src/main/java/de/tum/cit/ase/ares/api/internal/TestGuardUtils.java NeedBraces cleanup in hidden-test gating and parsing helpers.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableUtils.java NeedBraces cleanup in property sanitization and constructor argument selection.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSets.java NeedBraces cleanup in conditional safe-type registration.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSanitizer.java NeedBraces cleanup in null/type short-circuiting.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableInfo.java NeedBraces cleanup in sanitize, map filtering, and primitive casting.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationUtils.java NeedBraces cleanup in sanitization preconditions and suppressed propagation.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationException.java Narrow constructor visibility for internal exception type.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SafeTypeThrowableSanitizer.java NeedBraces cleanup + nested wrapper finalization.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleFailuresErrorSanitizer.java NeedBraces cleanup in failure suppression and instance creation.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleAssertionsErrorSanitizer.java NeedBraces cleanup in description extraction.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ExceptionInInitializerErrorSanitizer.java NeedBraces cleanup in message/exception selection.
src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/AssertionFailedErrorSanitizer.java NeedBraces cleanup in expected/actual branching and value sanitization.
src/main/java/de/tum/cit/ase/ares/api/internal/ReportingUtils.java NeedBraces cleanup in error classification and message transformation.
src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java Constant naming alignment for IO manager cache.
src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicMethod.java NeedBraces cleanup in reflection checks and modifier validation.
src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicField.java NeedBraces cleanup in case handling, final checks, and loops.
src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicConstructor.java NeedBraces cleanup in modifier checks loop.
src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicClass.java Constant naming alignment + NeedBraces cleanup in type checks and member validation.
src/main/java/de/tum/cit/ase/ares/api/dynamic/Check.java NeedBraces cleanup in modifier-check enum logic.
src/main/java/de/tum/cit/ase/ares/api/ast/model/RecursionCheck.java Utility-class finalization + logger constant naming alignment.
src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedRecursionAssert.java Class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedNodesAssert.java Class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/AresConfiguration.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/WalaPathClassification.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/ReachabilityChecker.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/JavaWalaTestCaseCollection.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomDFSPathFinder.java Rename field/parameter for naming compliance (G → graph).
src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomCallgraphBuilder.java NeedBraces cleanup in package-prefix derivation.
src/main/java/de/tum/cit/ase/ares/api/architecture/java/FileHandlerConstants.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/architecture/java/archunit/JavaArchunitTestCaseCollection.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/aop/resourceLimits/java/JavaResourceLimitsExtractor.java NeedBraces cleanup in reflection loop.
src/main/java/de/tum/cit/ase/ares/api/aop/java/javaAOPTestCaseToolbox/JavaAOPTestCaseToolbox.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCaseSettings.java Utility-class finalization (FinalClass checkstyle).
src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCase.java Add switch default case that fails loudly for new/unsupported test-case types.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationPointcutDefinitions.java Utility-class finalization + constant renames for pointcut maps.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationBindingDefinitions.java Utility-class finalization + update to renamed pointcut constants.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/JavaInstrumentationAgent.java Utility-class finalization + update to renamed pointcut constants.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkMethodAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkConstructorAdvice.java Hide utility ctor for advice class (constructor throws).
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceThreadSystemToolbox.java EqualsAvoidNull adjustment for string comparisons.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceNetworkSystemToolbox.java EqualsAvoidNull adjustment for string comparisons.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolbox.java EqualsAvoidNull adjustment for string comparisons.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceCommandSystemToolbox.java EqualsAvoidNull adjustment for string comparisons.
src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceAbstractToolbox.java EqualsAvoidNull adjustment for class-name comparisons.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/de/tum/cit/ase/ares/api/internal/ReportingUtils.java

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java`:
- Line 30: Replace the shared IO_MANAGER_CACHE implementation with
ConcurrentHashMap while preserving its existing key and supplier types, so
concurrent computeIfAbsent calls safely initialize cached IOManager instances.

In `@src/main/java/de/tum/cit/ase/ares/api/internal/ReportingUtils.java`:
- Around line 105-107: Update the condition in the surrounding reporting logic
to use ThrowableInfo.getType() rather than info.getClass() when checking for
AssertionError, so the wrapped throwable type controls whether
addStackframeInfoToMessage(info) is called.

In `@src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikLocaleExtension.java`:
- Around line 32-37: Remove the global Locale.setDefault mutation from
JqwikLocaleExtension and avoid relying on the instance field oldLocale for
lifecycle state, so concurrent test containers remain isolated. Rework the
extension to apply the requested locale through the framework or sandbox-level
mechanism available to the test execution path, preserving duplicate-extension
validation without mutating JVM-wide state.

In `@src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java`:
- Around line 135-139: Update the exception handling in the finally-block path
around invocation.proceed() so a teardown exception is explicitly thrown when no
prior failure exists, preventing a pending successful return from swallowing it;
retain the existing suppressed-exception behavior when failure is already set.

In
`@src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfigurationBuilder.java`:
- Around line 196-198: Synchronize lazy initialization of the static
buildConfigurationFileContent in the surrounding builder method: add a
synchronized double-check or synchronized block so only one thread reads
expectedProjectBuildFilePath and all threads safely observe the initialized
value. Preserve the existing cached-content behavior after initialization.

In `@src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java`:
- Around line 33-38: In the SecurityConstants initialization, rename
additionalTurstedPackages to additionalTrustedPackages and trim each
comma-separated value before filtering and collecting it into
USER_DEFINED_STACK_WHITELIST. Preserve the null-handling behavior and immutable
empty-set fallback.

In `@src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java`:
- Around line 148-150: Correct the localization key used in MethodTestProvider’s
annotation validation from structural.method.annoations to
structural.method.annotations, and verify that the corrected key exists
consistently in the corresponding resource bundles.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9a3842fc-f360-4fa9-8ddd-493661faf913

📥 Commits

Reviewing files that changed from the base of the PR and between a754181 and b4036a4.

📒 Files selected for processing (108)
  • src/main/java/de/tum/cit/ase/ares/api/AresConfiguration.java
  • src/main/java/de/tum/cit/ase/ares/api/Main.java
  • src/main/java/de/tum/cit/ase/ares/api/PathActionLevel.java
  • src/main/java/de/tum/cit/ase/ares/api/PathType.java
  • src/main/java/de/tum/cit/ase/ares/api/TestUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCase.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCaseSettings.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/JavaInstrumentationAgent.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceAbstractToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceCommandSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceNetworkSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceThreadSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationBindingDefinitions.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationPointcutDefinitions.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/javaAOPTestCaseToolbox/JavaAOPTestCaseToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/resourceLimits/java/JavaResourceLimitsExtractor.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/FileHandlerConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/archunit/JavaArchunitTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomCallgraphBuilder.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomDFSPathFinder.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/JavaWalaTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/ReachabilityChecker.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/WalaPathClassification.java
  • src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedNodesAssert.java
  • src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedRecursionAssert.java
  • src/main/java/de/tum/cit/ase/ares/api/ast/model/RecursionCheck.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/Check.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicClass.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicConstructor.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicField.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicMethod.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/ReportingUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/TestGuardUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/TimeoutUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/AssertionFailedErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ExceptionInInitializerErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleAssertionsErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleFailuresErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SafeTypeThrowableSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationException.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableInfo.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSets.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/io/AbstractLine.java
  • src/main/java/de/tum/cit/ase/ares/api/io/DynamicLine.java
  • src/main/java/de/tum/cit/ase/ares/api/io/IOTester.java
  • src/main/java/de/tum/cit/ase/ares/api/io/InputTester.java
  • src/main/java/de/tum/cit/ase/ares/api/io/OutputTestOptions.java
  • src/main/java/de/tum/cit/ase/ares/api/io/OutputTester.java
  • src/main/java/de/tum/cit/ase/ares/api/io/StaticLine.java
  • src/main/java/de/tum/cit/ase/ares/api/io/TestInStream.java
  • src/main/java/de/tum/cit/ase/ares/api/io/TestOutStream.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikIOExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikLocaleExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikTestGuard.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/BenchmarkExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterIOExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterLocaleExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java
  • src/main/java/de/tum/cit/ase/ares/api/localization/Messages.java
  • src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java
  • src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfiguration.java
  • src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfigurationBuilder.java
  • src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/AttributeTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/ClassTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/ConstructorTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/StructuralTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/testutils/ClassNameScanner.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ClassMemberAccessor.java
  • src/main/java/de/tum/cit/ase/ares/api/util/DelayedFilter.java
  • src/main/java/de/tum/cit/ase/ares/api/util/DependencyManager.java
  • src/main/java/de/tum/cit/ase/ares/api/util/FileTools.java
  • src/main/java/de/tum/cit/ase/ares/api/util/IgnorantUnmodifiableList.java
  • src/main/java/de/tum/cit/ase/ares/api/util/PackageRule.java
  • src/main/java/de/tum/cit/ase/ares/api/util/PathRule.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ProjectSourcesFinder.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ReflectionTestUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/util/UnexpectedExceptionError.java
  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolboxTest.java
  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationDesktopClassificationTest.java
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: Architecture Tests
  • GitHub Check: Tests
  • GitHub Check: Static Code Analysis
  • GitHub Check: copilot-pull-request-reviewer
  • GitHub Check: Analyse Java
🧰 Additional context used
📓 Path-based instructions (6)
**/*

⚙️ CodeRabbit configuration file

Dogmatically check all reviewed files for current British English in prose, comments, JavaDoc, documentation, workflow names, step names, issue/PR text, labels, user-facing messages, and review suggestions. Flag American spellings and grammar such as behavior, color, initialize, authorization, canceled, and program when they are natural-language text. Do not flag programming-language syntax, dependency coordinates, API names, class names, method names, package names, paths, URLs, quoted external identifiers, or other literals where American English is required by the technology.

Files:

  • src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedNodesAssert.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/resourceLimits/java/JavaResourceLimitsExtractor.java
  • src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfiguration.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleAssertionsErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicConstructor.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/FileHandlerConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/BenchmarkExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/io/OutputTestOptions.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/archunit/JavaArchunitTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikTestGuard.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ClassMemberAccessor.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/AresConfiguration.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCaseSettings.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ExceptionInInitializerErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/ReachabilityChecker.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterLocaleExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/io/TestInStream.java
  • src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedRecursionAssert.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterIOExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/util/DelayedFilter.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/JavaWalaTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/TestUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/util/PackageRule.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCase.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/WalaPathClassification.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/javaAOPTestCaseToolbox/JavaAOPTestCaseToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/io/InputTester.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomCallgraphBuilder.java
  • src/main/java/de/tum/cit/ase/ares/api/util/FileTools.java
  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolboxTest.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/util/UnexpectedExceptionError.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceCommandSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/Check.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikLocaleExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/io/StaticLine.java
  • src/main/java/de/tum/cit/ase/ares/api/util/PathRule.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSets.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikIOExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/localization/Messages.java
  • src/main/java/de/tum/cit/ase/ares/api/PathActionLevel.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceThreadSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicMethod.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicField.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/ConstructorTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableInfo.java
  • src/main/java/de/tum/cit/ase/ares/api/util/DependencyManager.java
  • src/main/java/de/tum/cit/ase/ares/api/io/AbstractLine.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleFailuresErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationException.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceNetworkSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/Main.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceAbstractToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadConstructorAdvice.java
  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationDesktopClassificationTest.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ReflectionTestUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/AssertionFailedErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SafeTypeThrowableSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/PathType.java
  • src/main/java/de/tum/cit/ase/ares/api/io/IOTester.java
  • src/main/java/de/tum/cit/ase/ares/api/ast/model/RecursionCheck.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/ClassTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/AttributeTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomDFSPathFinder.java
  • src/main/java/de/tum/cit/ase/ares/api/io/TestOutStream.java
  • src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfigurationBuilder.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/JavaInstrumentationAgent.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/TestGuardUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/testutils/ClassNameScanner.java
  • src/main/java/de/tum/cit/ase/ares/api/util/IgnorantUnmodifiableList.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ProjectSourcesFinder.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/TimeoutUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/io/DynamicLine.java
  • src/main/java/de/tum/cit/ase/ares/api/io/OutputTester.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/ReportingUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/StructuralTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicClass.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationBindingDefinitions.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationPointcutDefinitions.java
src/main/java/**/*.java

⚙️ CodeRabbit configuration file

Review as a Java 17 Maven security framework used to test untrusted student code in Artemis programming exercises. Prioritise sandbox escapes, fail-open behaviour, unsafe reflection, classloader/bootstrap boundary mistakes, global mutable state, concurrency races, insufficient canonicalisation, and changes that weaken file, command, thread, network, package, or class access restrictions. Treat unrecognised security-sensitive inputs as a potential fail-closed requirement. Prefer simple Java code and one field or method declaration per line.

Files:

  • src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedNodesAssert.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/resourceLimits/java/JavaResourceLimitsExtractor.java
  • src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfiguration.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleAssertionsErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicConstructor.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/FileHandlerConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/BenchmarkExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/io/OutputTestOptions.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/archunit/JavaArchunitTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikTestGuard.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ClassMemberAccessor.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/AresConfiguration.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCaseSettings.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ExceptionInInitializerErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/ReachabilityChecker.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterLocaleExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/io/TestInStream.java
  • src/main/java/de/tum/cit/ase/ares/api/ast/asserting/UnwantedRecursionAssert.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterIOExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/util/DelayedFilter.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/JavaWalaTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/TestUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/util/PackageRule.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCase.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/WalaPathClassification.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/javaAOPTestCaseToolbox/JavaAOPTestCaseToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/io/InputTester.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomCallgraphBuilder.java
  • src/main/java/de/tum/cit/ase/ares/api/util/FileTools.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/util/UnexpectedExceptionError.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceCommandSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/Check.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikLocaleExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/io/StaticLine.java
  • src/main/java/de/tum/cit/ase/ares/api/util/PathRule.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableSets.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/jqwik/JqwikIOExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/localization/Messages.java
  • src/main/java/de/tum/cit/ase/ares/api/PathActionLevel.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceThreadSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicMethod.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicField.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/ConstructorTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableInfo.java
  • src/main/java/de/tum/cit/ase/ares/api/util/DependencyManager.java
  • src/main/java/de/tum/cit/ase/ares/api/io/AbstractLine.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/MultipleFailuresErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SanitizationException.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceNetworkSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/Main.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceAbstractToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ReflectionTestUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/AssertionFailedErrorSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/SafeTypeThrowableSanitizer.java
  • src/main/java/de/tum/cit/ase/ares/api/PathType.java
  • src/main/java/de/tum/cit/ase/ares/api/io/IOTester.java
  • src/main/java/de/tum/cit/ase/ares/api/ast/model/RecursionCheck.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/ClassTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/AttributeTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomDFSPathFinder.java
  • src/main/java/de/tum/cit/ase/ares/api/io/TestOutStream.java
  • src/main/java/de/tum/cit/ase/ares/api/security/AresSecurityConfigurationBuilder.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/JavaInstrumentationAgent.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/TestGuardUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/sanitization/ThrowableUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/testutils/ClassNameScanner.java
  • src/main/java/de/tum/cit/ase/ares/api/util/IgnorantUnmodifiableList.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/util/ProjectSourcesFinder.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/TimeoutUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/io/DynamicLine.java
  • src/main/java/de/tum/cit/ase/ares/api/io/OutputTester.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/ReportingUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/StructuralTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/dynamic/DynamicClass.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationBindingDefinitions.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationPointcutDefinitions.java
src/main/java/de/tum/cit/ase/ares/api/aop/**/*.java

⚙️ CodeRabbit configuration file

Focus on runtime enforcement integrity: intercepted methods, argument extraction, null handling, recursive advice guards, bootstrap classloader interaction, and whether denied operations can reach the JVM or operating system before checks run.

Files:

  • src/main/java/de/tum/cit/ase/ares/api/aop/resourceLimits/java/JavaResourceLimitsExtractor.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReadPathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCaseSettings.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecutePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationOverwritePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/JavaAOPTestCase.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/javaAOPTestCaseToolbox/JavaAOPTestCaseToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationReceiveNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationDeletePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceCommandSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationSendNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceThreadSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreatePathMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceNetworkSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationConnectNetworkConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceAbstractToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationCreateThreadConstructorAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolbox.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/JavaInstrumentationAgent.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationExecuteCommandMethodAdvice.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationBindingDefinitions.java
  • src/main/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationPointcutDefinitions.java
src/main/java/de/tum/cit/ase/ares/api/architecture/**/*.java

⚙️ CodeRabbit configuration file

Focus on static-analysis soundness: missing deny-listed APIs, library-mediated access, reflection, classloader tricks, call graph incompleteness, and mismatches between architecture-mode and runtime AOP/instrumentation behaviour.

Files:

  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/FileHandlerConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/archunit/JavaArchunitTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/ReachabilityChecker.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/JavaWalaTestCaseCollection.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/WalaPathClassification.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomCallgraphBuilder.java
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/CustomDFSPathFinder.java
**/*Test.java

📄 CodeRabbit inference engine (AGENTS.md)

**/*Test.java: A sandboxed test JVM must never spin up its own server (echo server, socket listener, etc.) to test incoming or outgoing connections
Outgoing-connection tests must connect to an external echo server at a configurable endpoint running as a separate process or CI service on the loopback at port 25565, exercising only the student's client behaviour
If the external echo server is not reachable, the test must skip (using JUnit Assumptions.abort) rather than fail
An Ares SecurityException on an explicitly allowed connection is always a real failure and must propagate (never skipped)
Do not hard-code a self-hosted listener as the connection counterpart; use an external echo service to avoid in-JVM BindException/thread/lifecycle flakiness

Files:

  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolboxTest.java
  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationDesktopClassificationTest.java
src/test/java/**/*.java

⚙️ CodeRabbit configuration file

Require tests to distinguish fixture failures from sandbox failures. Network tests must not start in-process listeners inside the sandbox; external fixtures may be skipped when absent, but explicit Ares SecurityException failures must propagate.

Files:

  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/advice/JavaInstrumentationAdviceFileSystemToolboxTest.java
  • src/test/java/de/tum/cit/ase/ares/api/aop/java/instrumentation/pointcut/JavaInstrumentationDesktopClassificationTest.java
🪛 ast-grep (0.44.1)
src/main/java/de/tum/cit/ase/ares/api/util/PackageRule.java

[warning] 66-66: Regular expression is compiled from a non-literal, possibly user-controlled value. A crafted regex (or input matched against one) can trigger catastrophic backtracking and hang the thread (ReDoS). Use a hardcoded literal pattern, wrap untrusted text with Pattern.quote(...), or validate/length-limit the input and enforce a matching timeout before passing it to Pattern.compile / String.matches / String.replaceAll / String.replaceFirst.
Context: Pattern.compile(String.join("\E.*\Q", parts), Pattern.DOTALL)
Note: [CWE-1333] Inefficient Regular Expression Complexity.

(redos-non-literal-regex-java)

src/main/java/de/tum/cit/ase/ares/api/util/PathRule.java

[warning] 49-49: Regular expression is compiled from a non-literal, possibly user-controlled value. A crafted regex (or input matched against one) can trigger catastrophic backtracking and hang the thread (ReDoS). Use a hardcoded literal pattern, wrap untrusted text with Pattern.quote(...), or validate/length-limit the input and enforce a matching timeout before passing it to Pattern.compile / String.matches / String.replaceAll / String.replaceFirst.
Context: pathMatcher.matches(path)
Note: [CWE-1333] Inefficient Regular Expression Complexity.

(redos-non-literal-regex-java)


[warning] 51-51: Regular expression is compiled from a non-literal, possibly user-controlled value. A crafted regex (or input matched against one) can trigger catastrophic backtracking and hang the thread (ReDoS). Use a hardcoded literal pattern, wrap untrusted text with Pattern.quote(...), or validate/length-limit the input and enforce a matching timeout before passing it to Pattern.compile / String.matches / String.replaceAll / String.replaceFirst.
Context: pathMatcher.matches(path)
Note: [CWE-1333] Inefficient Regular Expression Complexity.

(redos-non-literal-regex-java)

src/main/java/de/tum/cit/ase/ares/api/internal/TestGuardUtils.java

[warning] 168-168: Regular expression is compiled from a non-literal, possibly user-controlled value. A crafted regex (or input matched against one) can trigger catastrophic backtracking and hang the thread (ReDoS). Use a hardcoded literal pattern, wrap untrusted text with Pattern.quote(...), or validate/length-limit the input and enforce a matching timeout before passing it to Pattern.compile / String.matches / String.replaceAll / String.replaceFirst.
Context: potentialZoneIdString.matches(ZONE_ID_START_PATTERN)
Note: [CWE-1333] Inefficient Regular Expression Complexity.

(redos-non-literal-regex-java)

src/main/java/de/tum/cit/ase/ares/api/structural/testutils/ClassNameScanner.java

[warning] 237-237: Prevent path traversal
Context: new File(node, currentSubNode)
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Security best practice.

(path-traversal-java)

Comment thread src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java Outdated
Comment thread src/main/java/de/tum/cit/ase/ares/api/internal/ReportingUtils.java
Comment thread src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java Outdated
The review of the checkstyle PR surfaced a few pre-existing issues in files the
diff touched. This fixes the ones worth acting on.

- JupiterSecurityExtension swallowed a security-teardown failure after a passing
  test: on success the interceptor has a pending return, so assigning the reset
  exception to a field let that return run and skip the throw, leaving the next
  test with un-reset settings (fail-open). It now throws the teardown failure
  from the finally, which overrides the pending return. A failing test still
  propagates its own error with the teardown error suppressed.
- IOExtensionUtils resolved IO managers through computeIfAbsent on a static
  HashMap. JUnit can run test containers in parallel, so a concurrent insert
  could corrupt the map; it is now a ConcurrentHashMap.
- SecurityConstants read the trusted-packages system property into a misspelled
  variable and did not trim the split values, so a leading space could slip a
  package past the blank filter; the values are now trimmed.
- corrected the localisation key structural.method.annoations to annotations in
  the lookup and in both message bundles, so the key still resolves

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java`:
- Around line 135-143: Update resetSettingsInBootstrapClassLoader() to propagate
NoSuchMethodException, IllegalAccessException, and InvocationTargetException as
a SecurityException when the bootstrap-loaded settings class exists but reset
fails. Continue ignoring only ClassNotFoundException, and preserve the existing
teardown failure propagation and suppressed-exception handling around failure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 35ebd674-80cd-4953-a1dc-622bfc2a08b2

📥 Commits

Reviewing files that changed from the base of the PR and between b4036a4 and d2dd92e.

📒 Files selected for processing (6)
  • src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java
  • src/main/resources/de/tum/cit/ase/ares/api/localization/messages.properties
  • src/main/resources/de/tum/cit/ase/ares/api/localization/messages_de.properties
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: Tests
  • GitHub Check: Static Code Analysis
  • GitHub Check: Architecture Tests
  • GitHub Check: Analyse Java
🧰 Additional context used
📓 Path-based instructions (2)
**/*

⚙️ CodeRabbit configuration file

Dogmatically check all reviewed files for current British English in prose, comments, JavaDoc, documentation, workflow names, step names, issue/PR text, labels, user-facing messages, and review suggestions. Flag American spellings and grammar such as behavior, color, initialize, authorization, canceled, and program when they are natural-language text. Do not flag programming-language syntax, dependency coordinates, API names, class names, method names, package names, paths, URLs, quoted external identifiers, or other literals where American English is required by the technology.

Files:

  • src/main/resources/de/tum/cit/ase/ares/api/localization/messages.properties
  • src/main/resources/de/tum/cit/ase/ares/api/localization/messages_de.properties
  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java
src/main/java/**/*.java

⚙️ CodeRabbit configuration file

Review as a Java 17 Maven security framework used to test untrusted student code in Artemis programming exercises. Prioritise sandbox escapes, fail-open behaviour, unsafe reflection, classloader/bootstrap boundary mistakes, global mutable state, concurrency races, insufficient canonicalisation, and changes that weaken file, command, thread, network, package, or class access restrictions. Treat unrecognised security-sensitive inputs as a potential fail-closed requirement. Prefer simple Java code and one field or method declaration per line.

Files:

  • src/main/java/de/tum/cit/ase/ares/api/jupiter/JupiterSecurityExtension.java
  • src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java
  • src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java
  • src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java
🔇 Additional comments (5)
src/main/java/de/tum/cit/ase/ares/api/internal/IOExtensionUtils.java (1)

8-8: LGTM!

Also applies to: 31-36, 71-71

src/main/java/de/tum/cit/ase/ares/api/security/SecurityConstants.java (1)

32-38: LGTM!

src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java (1)

41-44: LGTM!

Also applies to: 58-65, 123-125, 139-153

src/main/resources/de/tum/cit/ase/ares/api/localization/messages.properties (1)

255-255: LGTM!

src/main/resources/de/tum/cit/ase/ares/api/localization/messages_de.properties (1)

256-256: LGTM!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 110 out of 110 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (3)

src/main/java/de/tum/cit/ase/ares/api/Main.java:17

  • main currently hard-codes absolute, developer-specific file system paths (and commented alternatives). This makes the entry point non-portable and effectively unusable outside one workstation. Prefer taking paths from args (or environment/system properties) and fail fast with a usage message when they are missing.
	public static void main(String[] args) {
		SecurityPolicyReaderAndDirector securityPolicyReaderAndDirector = new SecurityPolicyReaderAndDirector(
				Path.of("/Users", "markuspaulsen", "Documents", "Ares2", "src", "main", "resources",
						"ExampleConfiguration.yaml"),
				Path.of("/Users", "markuspaulsen", "Documents", "Ares2UI")

src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java:39

  • This utility class constructor still throws a generic IllegalStateException with a hard-coded message. Elsewhere the codebase standardizes utility-class constructors to throw SecurityException with Messages.localized("security.general.utility.initialization", <ClassSimpleName>) (and this pattern is asserted in tests like FileHandlerConstantsTest and JavaWalaTestCaseCollectionTest). Align this class to that convention for consistency and localization.
    src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java:18
  • This utility class constructor still throws a generic IllegalStateException with a hard-coded message. Elsewhere the codebase standardizes utility-class constructors to throw SecurityException with Messages.localized("security.general.utility.initialization", <ClassSimpleName>) (and this pattern is asserted in tests like FileHandlerConstantsTest and JavaWalaTestCaseCollectionTest). Align this class to that convention for consistency and localization.

Comment thread src/main/java/de/tum/cit/ase/ares/api/structural/MethodTestProvider.java Outdated
Comment thread src/main/java/de/tum/cit/ase/ares/api/structural/ConstructorTestProvider.java Outdated
Comment thread src/main/java/de/tum/cit/ase/ares/api/structural/ClassTestProvider.java Outdated
Comment thread src/main/java/de/tum/cit/ase/ares/api/structural/AttributeTestProvider.java Outdated
Markus Paulsen added 2 commits July 15, 2026 04:27
AresSecurityConfigurationBuilder cached the build file content in a plain static
field with an unguarded lazy init. A consumer that runs test containers in
parallel could then read the field while another thread was still writing it.
The field is now volatile and the initialisation uses double-checked locking, so
the use-site read always sees a fully written string. Ares itself runs tests
sequentially, so this is defensive hardening for parallel consumers rather than
a fix for its own suite.
- resetSettingsInBootstrapClassLoader swallowed NoSuchMethodException,
  IllegalAccessException and InvocationTargetException, so a bootstrap-loaded
  settings class whose reset failed left the next test with stale security
  settings (fail-open). It now throws a SecurityException for those, matching
  resetSettings for the standard class loader, and still ignores only
  ClassNotFoundException, which just means there is nothing to reset yet. This
  closes the fail-open one level below the interceptor fix.
- the earlier brace addition pulled the custom-URI comment inside the
  tests.isEmpty() branch, after an unconditional throw, where it was dead and no
  longer described the dynamicContainer return. Moved it back in front of the
  return in the four structural providers.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 110 out of 110 changed files in this pull request and generated 1 comment.

@MarkusPaulsen

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
The checkstyle rename of the public pointcut maps to upper snake case broke
tools/pointcut_comparison.R, which extracts each map from the instrumentation
source with a regex built from the field name. Its five hard-coded names still
used the old camel case, so after the rename the patterns matched nothing and
the tool silently produced empty results. Updated the names to match the source;
the tool runs again and extracts the maps as before.
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
@MarkusPaulsen
MarkusPaulsen requested a review from Copilot July 15, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 111 out of 111 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java:39

  • This utility class constructor throws a generic IllegalStateException with a hard-coded message. Elsewhere in the codebase, utility classes are expected to throw a SecurityException with a localized message (e.g., JavaWalaTestCaseCollectionTest asserts this behavior). Align this constructor to the established utility-initialization convention so reflective instantiation fails consistently and with localized output.
    src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java:18
  • This utility class constructor throws a generic IllegalStateException with a hard-coded message. The codebase convention (and tests) expect utility classes to throw a SecurityException with Messages.localized("security.general.utility.initialization", ) so the failure is localized and consistent. Please align this constructor to that convention.

Comment thread src/main/java/de/tum/cit/ase/ares/api/util/ClassMemberAccessor.java Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 111 out of 111 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

src/main/java/de/tum/cit/ase/ares/api/phobos/Phobos.java:39

  • Phobos is a utility class (private ctor + only static APIs), but its private constructor still throws a generic IllegalStateException with a hard-coded message. The codebase convention for utility classes is to throw a SecurityException with the localized security.general.utility.initialization message (see e.g. JavaWalaTestCaseCollectionTest). Aligning this avoids inconsistent exception types/messages and keeps utility-instantiation failures locale-independent.
    src/main/java/de/tum/cit/ase/ares/api/localization/Localisation.java:18
  • Localisation is a utility class, but its private constructor currently throws a generic IllegalStateException with a hard-coded message. Other utility classes in this codebase throw a SecurityException with Messages.localized("security.general.utility.initialization", <ClassSimpleName>) (as asserted in tests like JavaWalaTestCaseCollectionTest). Using the localized message keeps behavior consistent and avoids hard-coded English text.

The Copilot Autofix commit gave ClassMemberAccessor a throwing constructor but
left it unformatted, so spotless:check (the first Build step) failed and every
downstream job skipped. It also used a fully qualified Messages reference rather
than the imported short form the rest of the code base uses.

This reformats ClassMemberAccessor to the convention (import Messages, literal
class name) and applies the same convention to the two utility classes Copilot
flagged, Phobos and Localisation, which still threw a generic IllegalStateException
with a hard-coded English message. All three now throw a SecurityException with
Messages.localized("security.general.utility.initialization", <ClassName>),
matching FileHandlerConstants and the other utility classes, so the failure type
and message are consistent and locale-independent.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 111 out of 111 changed files in this pull request and generated no new comments.

@MarkusPaulsen

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@MarkusPaulsen
MarkusPaulsen merged commit ebb4ac3 into main Jul 15, 2026
6 of 9 checks passed
@MarkusPaulsen
MarkusPaulsen deleted the chore/fix-checkstyle-violations branch July 15, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aop Automated area label: aop architecture Automated area label: architecture ast Automated area label: ast tests Automated area label: tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants