Skip to main content

Find Security class modifications

io.moderne.cryptography.FindSecurityModifications

Finds invocations of java.security.Security methods that modify security configuration such as removeProvider, addProvider, insertProviderAt, setProperty, and removeProperty.

Recipe source

GitHub, Issue Tracker, Maven Central

This recipe is available under the Apache License Version 2.0.

Usage

This recipe has no required configuration options. It can be activated by adding a dependency on io.moderne.recipe:rewrite-cryptography in your build file or by running a shell command (in which case no build changes are needed):

  1. Add the following to your build.gradle file:
build.gradle
plugins {
id("org.openrewrite.rewrite") version("latest.release")
}

rewrite {
activeRecipe("io.moderne.cryptography.FindSecurityModifications")
setExportDatatables(true)
}

repositories {
mavenCentral()
}

dependencies {
rewrite("io.moderne.recipe:rewrite-cryptography:0.8.1")
}
  1. Run gradle rewriteRun to run the recipe.

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

Security modifications

io.moderne.cryptography.table.SecurityModificationTable

Security class method invocations that modify the Java security configuration including provider management and property settings.

Column NameDescription
Source fileThe source file containing the Security modification
Line numberThe line number where the Security method is called
Method nameThe Security method being called (e.g., removeProvider, addProvider, insertProviderAt)
ArgumentsThe arguments passed to the Security method
ContextThe context in which the Security modification occurs (e.g., method name, class name)