Moderne Recipes
This doc includes every recipe that is exclusive to users of Moderne. For a full list of all recipes, check out our recipe catalog. For more information about how to use Moderne for automating code refactoring and analysis at scale, contact us.
rewrite-ai-search
- Find comments' language distribution - Finds all comments and uses AI to predict which language the comment is in.
- Find method invocations that resemble a pattern - This recipe uses two phase AI approach to find a method invocation that resembles a search string.
- Fix mis-encoded French comments, javadocs and pom.xml comments - Fixes mis-encoded French comments in your code, javadocs and in your pom.xml files. Mis-encoded comments contain a ? or � character.
- Fix mis-encoded comments in French - Use spellchecker to fix mis-encoded French comments in comments, JavaDocs, properties or XML files. Mis-encoded comments will contain either '?' or '�'.
- Get embeddings for code snippets in code - This recipe calls an AI model to get an embedding for either classes or methods which can then be used for downstream tasks.
- Get recommendations - This recipe calls an AI model to get recommendations for modernizing the code base by looking at a sample of method declarations.
- List all methods used - List all methods used in any Java source file.
rewrite-android
- Change Android SDK version - Change
compileSdk
,compileSdkVersion
,targetSdk
andtargetSdkVersion
in an Android Gradle build file to the argument version. - Migrate to Android Gradle Plugin 7.2 - Recipes to migrate to Android Gradle Plugin version 7.2.
- Migrate to Android Gradle Plugin 7.3 - Recipes to migrate to Android Gradle Plugin version 7.3.
- Migrate to Android Gradle Plugin 7.4 - Recipes to migrate to Android Gradle Plugin version 7.4.
- Migrate to Android Gradle Plugin 8.0 - Recipes to migrate to Android Gradle Plugin version 8.0.
- Migrate to Android Gradle Plugin 8.1 - Recipes to migrate to Android Gradle Plugin version 8.1.
- Migrate to Android Gradle Plugin 8.2 - Recipes to migrate to Android Gradle Plugin version 8.2.
- Migrate to Android Gradle Plugin 8.3 - Recipes to migrate to Android Gradle Plugin version 8.3.
- Migrate to Android Gradle Plugin 8.4 - Recipes to migrate to Android Gradle Plugin version 8.4.
- Migrate to Android Gradle Plugin 8.5 - Recipes to migrate to Android Gradle Plugin version 8.5.
- Migrate to Android Gradle Plugin 8.6 - Recipes to migrate to Android Gradle Plugin version 8.6.
- Migrate to Android Gradle Plugin 8.7 - Recipes to migrate to Android Gradle Plugin version 8.7.
- Upgrade Android Gradle Plugin (AGP) version - Upgrade Android Gradle Plugin (AGP) version and update the Gradle Wrapper version. Compatible versions are published in the AGP release notes.
- Upgrade to Android SDK 33 - Recipes to upgrade to Android SDK version 33.
- Upgrade to Android SDK 34 - Recipes to upgrade to Android SDK version 34.
- Upgrade to Android SDK 35 - Recipes to upgrade to Android SDK version 35.
rewrite-azul
- Eliminate unused classes - Deprecate and later delete classes that are unused, as detected by Azul Intelligence Cloud.
- Find reachable methods - Find all methods defined in the repository's source code that are reachable.
rewrite-circleci
- Install an orb - Install a CircleCI orb if it is not already installed.
- Update CircleCI image - See the list of pre-built CircleCI images.
rewrite-codemods-ng
- Update to Angular v15 - Upgrade to Angular v15
- Update to Angular v16 - Upgrade to Angular v16
- Update to Angular v17 - Upgrade to Angular v17
- Update to Angular v18 - Upgrade to Angular v18
- Update to Angular v19 - Upgrade to Angular v19
- Upgrade Angular versions - Run
ng update
to upgrade Angular CLI and Angular Core to the specified version.
rewrite-compiled-analysis
- Change
List#add
toList#plus
and verify. - We know this won't compile. - Verify compilation - This is a task that runs after another recipe to verify that the changes made by that recipe would result in a successful compilation.
rewrite-comprehension
- Code comprehension with unit test examples - First runs a scanning recipe to grab all unit tests, then supplements the unit tests examples for the AI-generate descriptions.
- Comprehend code - Use LLMs to add inferred knowledge to the code.
- Improve recipe descriptors - Improving recipe display names and descriptions in turn improves Moddy.
- Search for a class that uses the given design technique - Search for a class that uses the given design technique.
- Update README - Generate a README file for the project, containing information about the project inferred from its knowledge graph.
- Update the README for an OpenRewrite recipe repository - Updates the README periodically to reflect the latest contents of recipe projects.
rewrite-concourse
- Change Concourse value - Change every value matching the key pattern.
- Change resource version - Pin or unpin a resource to a particular version.
- Find pinned resources by type - Find resources of a particular type that have pinned versions.
- Find privileged
resource_type
definitions. - By default,resource_type
definitions are unprivileged. - Find resource - Find a Concourse resource by name.
- Update git resource
source.uri
references - Update git resourcesource.uri
URI values to point to a new URI value.
rewrite-cryptography
- Find
Security.setProperty(..)
calls for certain properties - There is a defined set of properties that should not be set usingSecurity.setProperty(..)
as they can lead to security vulnerabilities. - Post quantum cryptography - This recipe searches for instances in code that may be impacted by post quantum cryptography. Applications may need to support larger key sizes, different algorithms, or use crypto agility to handle the migration. The recipe includes detection of hardcoded values that affect behavior in a post-quantum world, programmatic configuration that may prevent algorithm changes, and general cryptographic usage patterns that should be reviewed.
rewrite-dotnet
- Analyze a .NET project using upgrade-assistant - Run upgrade-assistant analyze across a repository to analyze changes required to upgrade projects to a newer version of .NET. This recipe will generate an
org.openrewrite.dotnet.UpgradeAssistantAnalysis
data table containing the report details. - Upgrade a .NET project using upgrade-assistant - Run upgrade-assistant upgrade across a repository to upgrade projects to a newer version of .NET.
- Upgrade to .NET 6.0 using upgrade-assistant - Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 6.0.
- Upgrade to .NET 7.0 using upgrade-assistant - Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 7.0.
- Upgrade to .NET 8.0 using upgrade-assistant - Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 8.0.
- Upgrade to .NET 9.0 using upgrade-assistant - Run upgrade-assistant upgrade across a repository to upgrade projects to .NET 9.0.
rewrite-hibernate
- Find JPQL definitions - Find Java Persistence Query Language definitions in the codebase.
- Fix conflicting class type annotation Hibernate 6.6 - Since Hibernate 6.6 a mapped class can have either
@MappedSuperclass
or@Embeddable
, or@Entity
. This recipe removes@Entity
from classes annotated with@MappedSuperclass
or@Embeddable
. For the moment die combination of@MappedSuperclass
or@Embeddable
is advised to migrate to Single Table Inheritance but still accepted and therefore stays. - Migrate Session interface method calls - Migrates code using deprecated Session interface methods to their Hibernate 7.0 replacements.
- Migrate Session save/update/delete method calls - Migrates code using deprecated Session save/update/delete methods to their Hibernate 7.0 replacements. Session#save -> Session#persist, Session#update -> Session#merge, Session#saveOrUpdate -> Session#persist or Session#merge, Session#delete -> Session#remove.
- Migrate implicit cascade=PERSIST for @Id and @MapsId associations - Hibernate used to automatically enable cascade=PERSIST for association fields annotated @Id or @MapsId. This was undocumented and unexpected behavior, and no longer supported in Hibernate 7. Existing code which relies on this behavior will be modified by addition of explicit cascade=PERSIST to the association fields.
- Migrate to @TargetEmbeddable - Migrates code using removed @Target to to Hibernate 7.0's @TargetEmbeddable equivalent. Removes misused @Target annotations.
- Migrate to Hibernate 6.6.x - This recipe will apply changes commonly needed when migrating to Hibernate 6.6.x.
- Migrate to Hibernate 7.0.x - This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x.
- Remove table from single table inherited entity - For Single Table Inherited Entities Hibernate ignores the
@Table
annotation on child entities. From Version 6.6 it is considered an error.
rewrite-java-security
- Dependency insight for C# - Finds dependencies in
*.csproj
andpackages.config
. - Enable CSRF attack prevention - Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a malicious web site, email, blog, instant message, or program causes a user's web browser to perform an unwanted action on a trusted site when the user is authenticated. See the full OWASP cheatsheet.
- Find AWS secrets - Locates AWS secrets stored in plain text in code.
- Find Artifactory secrets - Locates Artifactory secrets stored in plain text in code.
- Find Azure secrets - Locates Azure secrets stored in plain text in code.
- Find Discord secrets - Locates Discord secrets stored in plain text in code.
- Find Facebook secrets - Locates Facebook secrets stored in plain text in code.
- Find GitHub secrets - Locates GitHub secrets stored in plain text in code.
- Find Google secrets - Locates Google secrets stored in plain text in code.
- Find Heroku secrets - Locates Heroku secrets stored in plain text in code.
- Find JWT secrets - Locates JWTs stored in plain text in code.
- Find Jackson default type mapping enablement -
ObjectMapper#enableTypeMapping(..)
can lead to vulnerable deserialization. - Find MailChimp secrets - Locates MailChimp secrets stored in plain text in code.
- Find Mailgun secrets - Locates Mailgun secrets stored in plain text in code.
- Find NPM secrets - Locates NPM secrets stored in plain text in code.
- Find PGP secrets - Locates PGP secrets stored in plain text in code.
- Find PayPal secrets - Locates PayPal secrets stored in plain text in code.
- Find Picatic secrets - Locates Picatic secrets stored in plain text in code.
- Find RSA private keys - Locates RSA private keys stored in plain text in code.
- Find SSH secrets - Locates SSH secrets stored in plain text in code.
- Find SendGrid secrets - Locates SendGrid secrets stored in plain text in code.
- Find Slack secrets - Locates Slack secrets stored in plain text in code.
- Find Square secrets - Locates Square secrets stored in plain text in code.
- Find Stripe secrets - Locates Stripe secrets stored in plain text in code.
- Find Telegram secrets - Locates Telegram secrets stored in plain text in code.
- Find Twilio secrets - Locates Twilio secrets stored in plain text in code.
- Find Twitter secrets - Locates Twitter secrets stored in plain text in code.
- Find and fix vulnerable Nuget dependencies - This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this recipe will not make any changes. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable.
- Find and fix vulnerable dependencies - This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe by default only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this can be controlled using the
maximumUpgradeDelta
option. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Upgrades dependencies versioned according to Semantic Versioning. Last updated: 2025-08-11T1102. - Find generic secrets - Locates generic secrets stored in plain text in code.
- Find hard-coded loopback IPv4 addresses - Locates mentions of hard-coded IPv4 addresses from the loopback IP range. The loopback IP range includes
127.0.0.0
to127.255.255.255
. This detects the entire localhost/loopback subnet range, not just the commonly used127.0.0.1
. - Find hard-coded private IPv4 addresses - Locates mentions of hard-coded IPv4 addresses from private IP ranges. Private IP ranges include: *
192.168.0.0
to192.168.255.255
*10.0.0.0
to10.255.255.255
*172.16.0.0
to172.31.255.255
It is not detecting the localhost subnet127.0.0.0
to127.255.255.255
. - Find licenses in use in third-party dependencies - Locates and reports on all licenses in use.
- Find passwords used in URLs - Locates URLs that contain passwords in plain text.
- Find secrets - Locates secrets stored in plain text in code.
- Find secrets with regular expressions - A secret is a literal that matches any one of the provided patterns.
- Find sensitive API endpoints - Find data models exposed by REST APIs that contain sensitive information like PII and secrets.
- Find text-direction changes - Finds unicode control characters which can change the direction text is displayed in. These control characters can alter how source code is presented to a human reader without affecting its interpretation by tools like compilers. So a malicious patch could pass code review while introducing vulnerabilities. Note that text direction-changing unicode control characters aren't inherently malicious. These characters can appear for legitimate reasons in code written in or dealing with right-to-left languages. See: https://trojansource.codes/ for more information.
- Find vulnerable uses of Jackson
@JsonTypeInfo
- Identify where attackers can deserialize gadgets into a target field. - Fix CWE-338 with
SecureRandom
- Use a cryptographically strong pseudo-random number generator (PRNG). - Improper privilege management - Marking code as privileged enables a piece of trusted code to temporarily enable access to more resources than are available directly to the code that called it.
- Insecure JMS deserialization - JMS
Object
messages depend on Java Serialization for marshalling/unmarshalling of the message payload whenObjectMessage#getObject
is called. Deserialization of untrusted data can lead to security flaws. - Insecure cookies - Check for use of insecure cookies. Cookies should be marked as secure. This ensures that the cookie is sent only over HTTPS to prevent cross-site scripting attacks.
- Java security best practices - Applies security best practices to Java code.
- Partial path traversal vulnerability - Replaces
dir.getCanonicalPath().startsWith(parent.getCanonicalPath()
, which is vulnerable to partial path traversal attacks, with the more securedir.getCanonicalFile().toPath().startsWith(parent.getCanonicalFile().toPath())
. To demonstrate this vulnerability, consider"/usr/outnot".startsWith("/usr/out")
. The check is bypassed although/outnot
is not under the/out
directory. It's important to understand that the terminating slash may be removed when using variousString
representations of theFile
object. For example, on Linux,println(new File("/var"))
will print/var
, butprintln(new File("/var", "/")
will print/var/
; however,println(new File("/var", "/").getCanonicalPath())
will print/var
. - Prevent clickjacking - The
frame-ancestors
directive can be used in a Content-Security-Policy HTTP response header to indicate whether or not a browser should be allowed to render a page in a<frame>
or<iframe>
. Sites can use this to avoid Clickjacking attacks by ensuring that their content is not embedded into other sites. - Regular Expression Denial of Service (ReDOS) - ReDoS is a Denial of Service attack that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). See the OWASP description of this attack here for more details.
- Remediate OWASP A01:2021 Broken access control - OWASP A01:2021 describes failures related to broken access control.
- Remediate OWASP A02:2021 Cryptographic failures - OWASP A02:2021 describes failures related to cryptography (or lack thereof), which often lead to exposure of sensitive data. This recipe seeks to remediate these vulnerabilities.
- Remediate OWASP A03:2021 Injection - OWASP A03:2021 describes failures related to user-supplied data being used to influence program state to operate outside of its intended bounds. This recipe seeks to remediate these vulnerabilities.
- Remediate OWASP A05:2021 Security misconfiguration - OWASP A05:2021 describes failures related to security misconfiguration.
- Remediate OWASP A06:2021 Vulnerable and outdated components - OWASP A06:2021 describes failures related to vulnerable and outdated components.
- Remediate OWASP A08:2021 Software and data integrity failures - OWASP A08:2021 software and data integrity failures.
- Remediate vulnerabilities from the OWASP Top Ten - OWASP publishes a list of the most impactful common security vulnerabilities. These recipes identify and remediate vulnerabilities from the OWASP Top Ten.
- Remove unused dependencies - Scans through source code collecting references to types and methods, removing any dependencies that are not used from Maven or Gradle build files. This recipe takes reflective access into account: When reflective access to a class is made unambiguously via a string literal, such as:
Class.forName("java.util.List")
that is counted correctly. When reflective access to a class is made ambiguously via anything other than a string literal no dependencies will be removed. This recipe takes transitive dependencies into account: When a direct dependency is not used but a transitive dependency it brings in is in use the direct dependency is not removed. - Secure Spring service exporters - The default Java deserialization mechanism is available via
ObjectInputStream
class. This mechanism is known to be vulnerable. If an attacker can make an application deserialize malicious data, it may result in arbitrary code execution. Spring’sRemoteInvocationSerializingExporter
uses the default Java deserialization mechanism to parse data. As a result, all classes that extend it are vulnerable to deserialization attacks. The Spring Framework contains at leastHttpInvokerServiceExporter
andSimpleHttpInvokerServiceExporter
that extendRemoteInvocationSerializingExporter
. These exporters parse data from the HTTP body using the unsafe Java deserialization mechanism. See the full blog post by Artem Smotrakov on CVE-2016-1000027 from which the above description is excerpted. - Secure random - Use cryptographically secure Pseudo Random Number Generation in the "main" source set. Replaces instantiation of
java.util.Random
withjava.security.SecureRandom
. - Secure the use of Jackson default typing - See the blog post on this subject.
- Secure the use of SnakeYAML's constructor - See the paper on this subject.
- SecureRandom seeds are not constant or predictable - Remove
SecureRandom#setSeed(*)
method invocations having constant or predictable arguments. - Software bill of materials - Produces a software bill of materials (SBOM) for a project. An SBOM is a complete list of all dependencies used in a project, including transitive dependencies. The produced SBOM is in the CycloneDX XML format. Supports Gradle and Maven. Places a file named sbom.xml adjacent to the Gradle or Maven build file.
- Upgrade C# dependency versions - Upgrades dependencies in
*.csproj
andpackages.config
. - Use
Files#createTempDirectory
- UseFiles#createTempDirectory
when the sequenceFile#createTempFile(..)
->File#delete()
->File#mkdir()
is used for creating a temp directory. - Use secure temporary file creation -
java.io.File.createTempFile()
has exploitable default file permissions. This recipe migrates to the more securejava.nio.file.Files.createTempFile()
. - XML parser XXE vulnerability - Avoid exposing dangerous features of the XML parser by updating certain factory settings.
- Zip slip - Zip slip is an arbitrary file overwrite critical vulnerability, which typically results in remote command execution. A fuller description of this vulnerability is available in the Snyk documentation on it.
rewrite-kubernetes
- Add Kubernetes configuration - Add default required configuration when it is missing.
- Add RBAC rules - Add RBAC rules to ClusterRoles or namespaced Roles.
- Cap exceeds resource value - Cap resource values that exceed a specific maximum.
- Change Kubernetes API version - Change the Kubernetes API version in a resource.
- Ensure CPU limits are set - A system without managed quotas could eventually collapse due to inadequate resources for the tasks it bares.
- Ensure CPU request is set - If a container is created in a namespace that has a default CPU limit, and the container does not specify its own CPU limit, then the container is assigned the default CPU limit.
- Ensure image pull policy is
Always
- Ensures the latest version of a tag is deployed each time. - Ensure lifecycle rule on
StorageBucket
- When defining a rule, you can specify any set of conditions for any action. The following configuration defines a rule to delete all objects older than 7 days in a bucket. - Ensure liveness probe is configured - The kubelet uses liveness probes to know when to schedule restarts for containers. Restarting a container in a deadlock state can help to make the application more available, despite bugs.
- Ensure memory limits are set - With no limit set, kubectl allocates more and more memory to the container until it runs out.
- Ensure memory request is set - A container is guaranteed to have as much memory as it requests, but is not allowed to use more memory than the limit set. This configuration may save resources and prevent an attack on an exploited container.
- Ensure readiness probe is configured - Using the Readiness Probe ensures teams define what actions need to be taken to prevent failure and ensure recovery in case of unexpected errors.
- Find annotation - Find annotations that optionally match a given regex.
- Find annotation - Find annotations that optionally match a given value.
- Find disallowed image tags - The set of image tags to find which are considered disallowed.
- Find exceeds resource limit - Find resource manifests that have limits set beyond a specific maximum.
- Find exceeds resource ratio - Find resource manifests that have requests to limits ratios beyond a specific maximum.
- Find hardcoded IP addresses - Find hardcoded IP address anywhere in text-based files.
- Find image by name - The image name to search for in containers and initContainers.
- Find label - Find labels that optionally match a given regex.
- Find missing configuration - Find Kubernetes resources with missing configuration.
- Find missing image digest - Find instances of a container name that fails to specify a digest.
- Find non-TLS Ingresses - Find Ingress resources that don't disallow HTTP or don't have TLS configured.
- Find uses of
externalIP
- Find anyService
whoseexternalIP
list contains, or does not contain, one of a list of IPs. - Kubernetes best practices - Applies best practices to Kubernetes manifests.
- Limit root capabilities in a container - Limiting the admission of containers with capabilities ensures that only a small number of containers have extended capabilities outside the default range.
- Migrate to Kubernetes API v1.16 - This recipe will apply changes commonly needed when migrating to Kubernetes API v1.16.
- Migrate to Kubernetes API v1.22 - This recipe will apply changes commonly needed when migrating to Kubernetes API v1.22.
- Migrate to Kubernetes API v1.25 - This recipe will apply changes commonly needed when migrating to Kubernetes API v1.25.
- Migrate to Kubernetes API v1.26 - This recipe will apply changes commonly needed when migrating to Kubernetes API v1.26.
- Migrate to Kubernetes API v1.27 - This recipe will apply changes commonly needed when migrating to Kubernetes API v1.27.
- Migrate to Kubernetes API v1.29 - This recipe will apply changes commonly needed when migrating to Kubernetes API v1.29.
- Migrate to Kubernetes API v1.32 - This recipe will apply changes commonly needed when migrating to Kubernetes API v1.32.
- No host IPC sharing - Preventing sharing of host PID/IPC namespace, networking, and ports ensures proper isolation between Docker containers and the underlying host.
- No host network sharing - When using the host network mode for a container, that container’s network stack is not isolated from the Docker host, so the container shares the host’s networking namespace and does not get its own IP-address allocation.
- No host process ID sharing - Sharing the host process ID namespace breaks the isolation between container images and can make processes visible to other containers in the pod. This includes all information in the /proc directory, which can sometimes include passwords or keys, passed as environment variables.
- No privilege escalation - Does not allow a process to gain more privileges than its parent process.
- No privileged containers - Privileged containers are containers that have all of the root capabilities of a host machine, allowing access to resources that are not accessible in ordinary containers.
- No root containers - Containers that run as root frequently have more permissions than their workload requires which, in case of compromise, could help an attacker further their exploits.
- Read-only root filesystem - Using an immutable root filesystem and a verified boot mechanism prevents against attackers from "owning" the machine through permanent local changes.
- Service type - Type of Kubernetes
Service
to find. - Update
Service
externalIP
- Swap out an IP address with another one inService
externalIP
settings. - Update image name - Search for image names that match patterns and replace the components of the name with new values.
rewrite-nodejs
- Find Node.js projects - Find Node.js projects and summarize data about them.
- Find and fix vulnerable npm dependencies - This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this recipe will not make any changes. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable.
- Javascript UI library insights - Discover which popular javascript UI libraries (React, Vue.js, Angular, etc.) are being used in your projects.
- Javascript database interaction library insights - Discover which popular javascript database interaction libraries (Sequelize, TypeORM, Mongoose, etc.) are being used in your projects.
- Javascript form handling library insights - Discover which popular javascript form handling libraries (Formik, React Hook Form, Yup, etc.) are being used in your projects.
- Javascript linting & formatting library insights - Discover which popular javascript linting and formatting libraries (ESLint, Prettier, Stylelint, etc.) are being used in your projects.
- Javascript real-time communication library insights - Discover which popular javascript real-time communication libraries (Socket.io, Ws, SockJS, etc.) are being used in your projects.
- Javascript security library insights - Discover which popular javascript security libraries (Helmet, Cors, Bcrypt, etc.) are being used in your projects.
- Javascript server-side frameworks insights - Discover which popular javascript server-side frameworks (Express, Koa, Hapi, etc.) are being used in your projects.
- Javascript state management library insights - Discover which popular javascript state management libraries (Redux, MobX, Vuex, etc.) are being used in your projects.
- Javascript task runners & build tools insights - Discover which popular javascript task runners and build tools (Webpack, Parcel, Gulp, etc.) are being used in your projects.
- Javascript testing library insights - Discover which popular javascript testing libraries (Jest, Mocha, Chai, etc.) are being used in your projects.
- Javascript utility library insights - Discover which popular javascript utility libraries (Lodash, Moment.js, Date-fns, etc.) are being used in your projects.
- Node.js dependency insight - Identify the direct and transitive Node.js dependencies used in a project.
- Upgrade Node.js dependencies - Upgrade matching Node.js direct dependencies.
rewrite-program-analysis
- Find LDAP injection vulnerabilities - Finds LDAP injection vulnerabilities by tracking tainted data flow from user input to LDAP queries.
- Find PII exposure in logs and external APIs - Detects when Personally Identifiable Information (PII) is exposed through logging statements or sent to external APIs without proper sanitization. This helps prevent data leaks and ensures compliance with privacy regulations like GDPR and CCPA.
- Find SQL injection vulnerabilities - Detects potential SQL injection vulnerabilities where user input flows to SQL execution methods without proper sanitization.
- Find XSS vulnerabilities - Detects potential cross-site scripting vulnerabilities where user input flows to output methods without proper sanitization.
- Find XXE vulnerabilities - Locates XML parsers that are not configured to prevent XML External Entity (XXE) attacks.
- Find command injection vulnerabilities - Detects when user-controlled input flows into system command execution methods like Runtime.exec() or ProcessBuilder, which could allow attackers to execute arbitrary commands.
- Find cyclomatic complexity - Calculates the cyclomatic complexity of methods and produces a data table containing the class name, method name, argument types, complexity value, and complexity threshold.
- Find dead stores - Identifies variable assignments whose values are never used before being overwritten or going out of scope.
- Find null pointer issues - Detects potential null pointer dereferences using path-sensitive analysis to distinguish between definite NPEs, possible NPEs, and safe dereferences.
- Find path traversal vulnerabilities - Detects potential path traversal vulnerabilities where user input flows to file system operations without proper validation.
- Find security vulnerabilities using taint analysis - Identifies potential security vulnerabilities where untrusted data from sources flows to sensitive sinks without proper sanitization.
- Find unencrypted PII storage - Identifies when personally identifiable information (PII) is stored in databases, files, or other persistent storage without encryption.
- Find unreachable code - Uses control flow analysis to identify statements that can never be executed.
- Find unused variable definitions - Identifies variable assignments whose values are never used before being overwritten.
- Track data lineage - Tracks the flow of data from database sources (JDBC queries, JPA entities) to API sinks (REST endpoints, GraphQL mutations) to understand data dependencies and support compliance requirements.
rewrite-reactive-streams
- Migrate to Reactor 3.5 - Adopt to breaking changes in Reactor 3.5.
- Reactor Best Practices - This recipe applies best practices for using Reactor.
- Replace
DirectProcessor.create()
withSinks.many().multicast().directBestEffort()
- As of 3.5 DirectProcessor is deprecated and Sinks are preferred - Replace
EmitterProcessor.create()
withSinks.many().multicast().onBackpressureBuffer()
- As of 3.5 EmitterProcessor is deprecated and Sinks are preferred - Replace
EmitterProcessor.create(Boolean)
withSinks.many().multicast().onBackpressureBuffer(Queues.SMALL_BUFFER_SIZE, Boolean)
- As of 3.5 EmitterProcessor is deprecated and Sinks are preferred - Replace
EmitterProcessor.create(int)
withSinks.many().multicast().onBackpressureBuffer(int)
- As of 3.5 EmitterProcessor is deprecated and Sinks are preferred - Replace
EmitterProcessor.create(int, Boolean)
withSinks.many().multicast().onBackpressureBuffer(int, Boolean)
- As of 3.5 EmitterProcessor is deprecated and Sinks are preferred - Replace
MonoProcessor.create()
withSinks.one()
- As of 3.5 MonoProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.cacheLast()
withSinks.many().replay().latest()
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.cacheLast()
withSinks.many().replay().latest()
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.create()
withSinks.many().replay().all()
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.create(int)
withSinks.many().replay().limit(int)
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.create(int, false)
withSinks.many().replay().limit(int)
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.create(int, true)
withSinks.many().replay().all(int)
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.createSizeAndTimeout(int, Duration)
withSinks.many().replay().limit(int, duration)
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.createSizeAndTimeout(int, Duration, Scheduler)
withSinks.many().replay().limit(int, Duration, Scheduler)
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.createTimeout(Duration)
withSinks.many().replay().limit(duration)
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
ReplayProcessor.createTimeout(Duration, Scheduler)
withSinks.many().replay().limit(Duration, Scheduler)
- As of 3.5 ReplayProcessor is deprecated and Sinks are preferred - Replace
UnicastProcessor.create()
withSinks.many().unicast().onBackpressureBuffer()
- As of 3.5 UnicastProcessor is deprecated and Sinks are preferred - Replace
UnicastProcessor.create(Queue)
withSinks.many().unicast().onBackpressureBuffer(Queue)
- As of 3.5 UnicastProcessor is deprecated and Sinks are preferred - Replace
UnicastProcessor.create(Queue, Consumer, Disposable)
withSinks.many().unicast().onBackpressureBuffer(Queue, Disposable)
- As of 3.5 UnicastProcessor is deprecated and Sinks are preferred - Replace
UnicastProcessor.create(Queue, Disposable)
withSinks.many().unicast().onBackpressureBuffer(Queue, Disposable)
- As of 3.5 UnicastProcessor is deprecated and Sinks are preferred - Replace
doAfterSuccessOrError
calls withtap
operator - As of reactor-core 3.5 thedoAfterSuccessOrError
method is removed, this recipe replaces it with thetap
operator. - Replace various
Processor.cache
calls with theirSinks
equivalent - As of 3.5 Processors are deprecated and Sinks are preferred. - Replace various
Processor.create
calls with theirSinks
equivalent - As of 3.5 Processors are deprecated and Sinks are preferred.
rewrite-spring
- Add
@Valid
annotation to fields - In Spring Boot 3.4, validation of@ConfigurationProperties
classes annotated with@Validated
now follows the Bean Validation specification, only cascading to nested properties if the corresponding field is annotated with@Valid
. The recipe will add a@Valid
annotation to each field which has a type that has a field which is annotated with ajakarta.validation.constraints.*
annotation. - Change Deprecated Spring Cloud Gateway Artifacts - __
- Comment deprecated methods in Spring 3.4 - Spring Boot 3.4 deprecates methods that are not commonly used or need manual interaction.
- Comment on
@MockitoSpyBean
and@MockitoBean
in@Configuration
- As stated in Spring Docs@MockitoSpyBean
and@MockitoBean
will only work in tests, explicitly not in@Configuration
annotated classes. - Delete empty
web.xml
files - Deletesweb.xml
files that contain only an empty<web-app>
root element with no child elements. - Is likely a Spring Boot project - Marks the project if it's likely a Spring Boot project.
- Is likely a Spring Framework project - Marks the project if it's likely a Spring Framework project.
- Is likely not a Spring Boot project - Marks the project if it's likely not a Spring Boot project.
- Migrate Spring Boot Management Endpoint Security properties to 3.4 - Migrate the settings for Management Endpoint Security from
true
|false
toread-only
|none
. - Migrate Spring Boot properties to 3.4 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Boot properties to 3.5 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Cloud properties to 2020 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Cloud properties to 2021 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Cloud properties to 2022 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Cloud properties to 2023 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Cloud properties to 2024 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Cloud properties to 2025 - Migrate properties found in
application.properties
andapplication.yml
. - Migrate Spring Framework Dependencies to Spring Boot - Migrate Spring Framework Dependencies to Spring Boot.
- Migrate Spring to Spring Boot - Migrate non Spring Boot applications to the latest compatible Spring Boot release. This recipe will modify an application's build files introducing Maven dependency management for Spring Boot, or adding the Gradle Spring Boot build plugin.
- Migrate
@Endpoint
sdefaultAccess
value - Since Spring Boot 3.4 the@Endpoint
access configuration values are no longertrue|false
butnone|read-only|unrestricted
- Migrate
ConditionalOnAvailableEndpoint
for Spring Boot 3.4 - Migrate@ConditionalOnAvailableEndpoint(EndpointExposure.CLOUD_FOUNDRY)
to@ConditionalOnAvailableEndpoint(EndpointExposure.WEB)
for Spring Boot 3.4. - Migrate
web.xml
to Java Configuration - Migratesweb.xml
content to Spring Boot Configuration classes with respect to Java EE or Jakarta EE usage. - Migrate
web.xml
toWebApplicationInitializer
- Migrateweb.xml
toWebApplicationInitializer
for Spring applications. This allows for programmatic configuration of the web application context, replacing the need for XML-based configuration. This recipe only picks upweb.xml
files located in thesrc/main/webapp/WEB-INF
directory to avoid inference with tests. - Migrate
web.xml
using Jakarta EE - Migratesweb.xml
content to Spring Boot Configuration classes using Jakarta EE namespace. - Migrate
web.xml
using Java EE - Migratesweb.xml
content to Spring Boot Configuration classes using Java EE javax namespace. - Migrate management endpoint access value - Migrate manage endpoint access value from
false
tonone
andtrue
toread-only
. - Migrate to Spring Boot 3.4 - Migrate applications to the latest Spring Boot 3.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.4.
- Migrate to Spring Boot 3.5 - Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.5.
- Migrate to Spring Cloud 2025 - Migrate applications to the latest Spring Cloud 2025 (Northfields) release.
- Migrate to Spring Kafka 3.3 - Migrate applications to the latest Spring Kafka 3.3 release.
- Migrate to Spring Security 6.4 - Migrate applications to the latest Spring Security 6.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- Remove
Replace.NONE
from@AutoConfigureTestDatabase
-Replace.NONE
is the default value for@AutoConfigureTestDatabase
since Spring Boot 3.4. - Remove
TestRestTemplate.HttpClientOption.ENABLE_REDIRECTS
option - TheTestRestTemplate
now uses the same follow redirects settings as the regular RestTemplate. TheHttpOption.ENABLE_REDIRECTS
option has also been deprecated. This recipe removes the option from theTestRestTemplate
constructor arguments. - Replace
taskExecutor
withapplicationTaskExecutor
- Use bean nameapplicationTaskExecutor
instead oftaskExecutor
when resolvingTaskExecutor
Bean from application context - Spring Boot 3.5 best practices - Applies best practices to Spring Boot 3.5+ applications.
- Upgrade Gradle 8 to 8.4+ for Spring Boot 3.4 - Spring Boot 3.4 requires Gradle 8.4+.
- Upgrade Gradle to 7.6.4+ for Spring Boot 3.4 - Spring Boot 3.4 requires Gradle 7.6.4.
- Upgrade MyBatis to Spring Boot 3.4 - Upgrade MyBatis Spring modules to a version corresponding to Spring Boot 3.4.
- Upgrade Spring Cloud AWS to Spring Boot 3.4 compatible version - Upgrade the Spring Cloud AWS dependency to a version compatible with Spring Boot 3.4.
- Upgrade dependencies to Spring Cloud 2025 - Upgrade dependencies to Spring Cloud 2025 from prior 2024.x version.
- Use
kafkaAwareTransactionManager
setter - Replace deprecatedContainerProperties#setTransactionManager(org.springframework.transaction.PlatformTransactionManager)
method withContainerProperties#setKafkaAwareTransactionManager(org.springframework.kafka.transaction.KafkaAwareTransactionManager)
. The method will be replaced only if its argument has the typeKafkaAwareTransactionManager
. - Use bean name
applicationTaskExecutor
instead oftaskExecutor
- Spring Boot 3.5 removed the bean nametaskExecutor
. Where this bean name is used, the recipe replaces the bean name toapplicationTaskExecutor
. This also includes instances where the developer provided their own bean namedtaskExecutor
. This also includes scenarios where JSR-250's@Resource
annotation is used.
rewrite-sql
- Change a SQL function name - When migrating between dialects, often one name can be substituted for another. For example, Oracle's NVL function can be replaced with Postgres COALESCE.
- Find SQL function - Find SQL functions by name.
- Find SQL in code and resource files - Find SQL in code (e.g. in string literals) and in resources like those ending with
.sql
. - Format SQL in string text blocks - Checks whether a text block may contain SQL, and if so, formats the text accordingly.
rewrite-terraform
- Add Terraform configuration - If the configuration has a different value, leave it alone. If it is missing, add it.
- Best practices for AWS - Securely operate on Amazon Web Services.
- Best practices for Azure - Securely operate on Microsoft Azure.
- Best practices for GCP - Securely operate on Google Cloud Platform.
- Disable Instance Metadata Service version 1 - As a request/response method IMDSv1 is prone to local misconfigurations.
- Disable Kubernetes dashboard - Disabling the dashboard eliminates it as an attack vector. The dashboard add-on is disabled by default for all new clusters created on Kubernetes 1.18 or greater.
- Enable API gateway caching - Enable caching for all methods of API Gateway.
- Enable Azure Storage Account Trusted Microsoft Services access - Certain Microsoft services that interact with storage accounts operate from networks that cannot be granted access through network rules. Using this configuration, you can allow the set of trusted Microsoft services to bypass those network rules.
- Enable Azure Storage secure transfer required - Microsoft recommends requiring secure transfer for all storage accounts.
- Enable VPC Flow Logs for subnetworks - Ensure GCP VPC flow logs for subnets are enabled. Flow Logs capture information on IP traffic moving through network interfaces. This information can be used to monitor anomalous traffic and provide security insights.
- Enable VPC flow logs and intranode visibility - Enable VPC flow logs and intranode visibility.
- Enable
PodSecurityPolicy
controller on Google Kubernetes Engine (GKE) clusters - EnsurePodSecurityPolicy
controller is enabled on Google Kubernetes Engine (GKE) clusters. - Enable geo-redundant backups on PostgreSQL server - Ensure PostgreSQL server enables geo-redundant backups.
- Enable point-in-time recovery for DynamoDB - DynamoDB Point-In-Time Recovery (PITR) is an automatic backup service for DynamoDB table data that helps protect your DynamoDB tables from accidental write or delete operations.
- Encrypt Aurora clusters - Native Aurora encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- Encrypt Azure VM data disk with ADE/CMK - Ensure Azure VM data disk is encrypted with ADE/CMK.
- Encrypt CodeBuild projects - Build artifacts, such as a cache, logs, exported raw test report data files, and build results, are encrypted by default using CMKs for Amazon S3 that are managed by the AWS Key Management Service.
- Encrypt DAX storage at rest - DAX encryption at rest automatically integrates with AWS KMS for managing the single service default key used to encrypt clusters.
- Encrypt DocumentDB storage - The encryption feature available for Amazon DocumentDB clusters provides an additional layer of data protection by helping secure your data against unauthorized access to the underlying storage.
- Encrypt EBS snapshots - EBS snapshots should be encrypted, as they often include sensitive information, customer PII or CPNI.
- Encrypt EBS volume launch configurations - EBS volumes allow you to create encrypted launch configurations when creating EC2 instances and auto scaling. When the entire EBS volume is encrypted, data stored at rest on the volume, disk I/O, snapshots created from the volume, and data in-transit between EBS and EC2 are all encrypted.
- Encrypt EBS volumes - Encrypting EBS volumes ensures that replicated copies of your images are secure even if they are accidentally exposed. AWS EBS encryption uses AWS KMS customer master keys (CMK) when creating encrypted volumes and snapshots. Storing EBS volumes in their encrypted state reduces the risk of data exposure or data loss.
- Encrypt EFS Volumes in ECS Task Definitions in transit - Enable attached EFS definitions in ECS tasks to use encryption in transit.
- Encrypt ElastiCache Redis at rest - ElastiCache for Redis offers default encryption at rest as a service.
- Encrypt ElastiCache Redis in transit - ElastiCache for Redis offers optional encryption in transit. In-transit encryption provides an additional layer of data protection when transferring data over standard HTTPS protocol.
- Encrypt Neptune storage - Encryption of Neptune storage protects data and metadata against unauthorized access.
- Encrypt RDS clusters - Native RDS encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- Encrypt Redshift storage at rest - Redshift clusters should be securely encrypted at rest.
- Ensure AKS policies add-on - Azure Policy Add-on for Kubernetes service (AKS) extends Gatekeeper v3, an admission controller webhook for Open Policy Agent (OPA), to apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner.
- Ensure AKV secrets have an expiration date set - Ensure AKV secrets have an expiration date set.
- Ensure AWS CMK rotation is enabled - Ensure AWS CMK rotation is enabled.
- Ensure AWS EFS with encryption for data at rest is enabled - Ensure AWS EFS with encryption for data at rest is enabled.
- Ensure AWS EKS cluster endpoint access is publicly disabled - Ensure AWS EKS cluster endpoint access is publicly disabled.
- Ensure AWS Elasticsearch domain encryption for data at rest is enabled - Ensure AWS Elasticsearch domain encryption for data at rest is enabled.
- Ensure AWS Elasticsearch domains have
EnforceHTTPS
enabled - Ensure AWS Elasticsearch domains haveEnforceHTTPS
enabled. - Ensure AWS Elasticsearch has node-to-node encryption enabled - Ensure AWS Elasticsearch has node-to-node encryption enabled.
- Ensure AWS IAM password policy has a minimum of 14 characters - Ensure AWS IAM password policy has a minimum of 14 characters.
- Ensure AWS Lambda function is configured for function-level concurrent execution limit - Ensure AWS Lambda function is configured for function-level concurrent execution limit.
- Ensure AWS Lambda functions have tracing enabled - Ensure AWS Lambda functions have tracing enabled.
- Ensure AWS RDS database instance is not publicly accessible - Ensure AWS RDS database instance is not publicly accessible.
- Ensure AWS S3 object versioning is enabled - Ensure AWS S3 object versioning is enabled.
- Ensure Amazon EKS control plane logging enabled for all log types - Ensure Amazon EKS control plane logging enabled for all log types.
- Ensure Azure App Service Web app redirects HTTP to HTTPS - Ensure Azure App Service Web app redirects HTTP to HTTPS.
- Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days - Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days.
- Ensure Azure PostgreSQL database server with SSL connection is enabled - Ensure Azure PostgreSQL database server with SSL connection is enabled.
- Ensure Azure SQL Server threat detection alerts are enabled for all threat types - Ensure Azure SQL Server threat detection alerts are enabled for all threat types.
- Ensure Azure SQL server audit log retention is greater than 90 days - Ensure Azure SQL server audit log retention is greater than 90 days.
- Ensure Azure SQL server send alerts to field value is set - Ensure Azure SQL server send alerts to field value is set.
- Ensure Azure application gateway has WAF enabled - Ensure Azure application gateway has WAF enabled.
- Ensure Azure key vault is recoverable - Ensure Azure key vault is recoverable.
- Ensure CloudTrail log file validation is enabled - Ensure CloudTrail log file validation is enabled.
- Ensure EC2 is EBS optimized - Ensure EC2 is EBS optimized.
- Ensure ECR repositories are encrypted - Ensure ECR repositories are encrypted.
- Ensure FTP Deployments are disabled - Ensure FTP Deployments are disabled.
- Ensure GCP Kubernetes cluster node auto-repair configuration is enabled - Ensure GCP Kubernetes cluster node auto-repair configuration is enabled.
- Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled - Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled.
- Ensure GCP VM instances have block project-wide SSH keys feature enabled - Ensure GCP VM instances have block project-wide SSH keys feature enabled.
- Ensure GCP cloud storage bucket with uniform bucket-level access are enabled - Ensure GCP cloud storage bucket with uniform bucket-level access are enabled.
- Ensure IAM password policy expires passwords within 90 days or less - Ensure IAM password policy expires passwords within 90 days or less.
- Ensure IAM password policy prevents password reuse - Ensure IAM password policy prevents password reuse.
- Ensure IAM password policy requires at least one lowercase letter - Ensure IAM password policy requires at least one lowercase letter.
- Ensure IAM password policy requires at least one number - Ensure IAM password policy requires at least one number.
- Ensure IAM password policy requires at least one symbol - Ensure IAM password policy requires at least one symbol.
- Ensure IAM password policy requires at least one uppercase letter - Ensure IAM password policy requires at least one uppercase letter.
- Ensure IP forwarding on instances is disabled - Ensure IP forwarding on instances is disabled.
- Ensure Kinesis Stream is securely encrypted - Ensure Kinesis Stream is securely encrypted.
- Ensure MSSQL servers have email service and co-administrators enabled - Ensure MSSQL servers have email service and co-administrators enabled.
- Ensure MySQL is using the latest version of TLS encryption - Ensure MySQL is using the latest version of TLS encryption.
- Ensure MySQL server databases have Enforce SSL connection enabled - Ensure MySQL server databases have Enforce SSL connection enabled.
- Ensure MySQL server disables public network access - Ensure MySQL server disables public network access.
- Ensure MySQL server enables Threat Detection policy - Ensure MySQL server enables Threat Detection policy.
- Ensure MySQL server enables geo-redundant backups - Ensure MySQL server enables geo-redundant backups.
- Ensure PostgreSQL server disables public network access - Ensure PostgreSQL server disables public network access.
- Ensure PostgreSQL server enables Threat Detection policy - Ensure PostgreSQL server enables Threat Detection policy.
- Ensure PostgreSQL server enables infrastructure encryption - Ensure PostgreSQL server enables infrastructure encryption.
- Ensure RDS database has IAM authentication enabled - Ensure RDS database has IAM authentication enabled.
- Ensure RDS instances have Multi-AZ enabled - Ensure RDS instances have Multi-AZ enabled.
- Ensure Send email notification for high severity alerts is enabled - Ensure Send email notification for high severity alerts is enabled.
- Ensure Send email notification for high severity alerts to admins is enabled - Ensure Send email notification for high severity alerts to admins is enabled.
- Ensure VPC subnets do not assign public IP by default - Ensure VPC subnets do not assign public IP by default.
- Ensure Web App has incoming client certificates enabled - Ensure Web App has incoming client certificates enabled.
- Ensure Web App uses the latest version of HTTP - Ensure Web App uses the latest version of HTTP.
- Ensure Web App uses the latest version of TLS encryption - Ensure Web App uses the latest version of TLS encryption.
- Ensure a security contact phone number is present - Ensure a security contact phone number is present.
- Ensure activity log retention is set to 365 days or greater - Ensure activity log retention is set to 365 days or greater.
- Ensure all keys have an expiration date - Ensure all keys have an expiration date.
- Ensure app service enables HTTP logging - Ensure app service enables HTTP logging.
- Ensure app service enables detailed error messages - Ensure app service enables detailed error messages.
- Ensure app service enables failed request tracing - Ensure app service enables failed request tracing.
- Ensure app services use Azure files - Ensure app services use Azure files.
- Ensure binary authorization is used - Ensure binary authorization is used.
- Ensure compute instances launch with shielded VM enabled - Ensure compute instances launch with shielded VM enabled.
- Ensure data stored in an S3 bucket is securely encrypted at rest - Ensure data stored in an S3 bucket is securely encrypted at rest.
- Ensure detailed monitoring for EC2 instances is enabled - Ensure detailed monitoring for EC2 instances is enabled.
- Ensure enhanced monitoring for Amazon RDS instances is enabled - Ensure enhanced monitoring for Amazon RDS instances is enabled.
- Ensure key vault allows firewall rules settings - Ensure key vault allows firewall rules settings.
- Ensure key vault enables purge protection - Ensure key vault enables purge protection.
- Ensure key vault key is backed by HSM - Ensure key vault key is backed by HSM.
- Ensure key vault secrets have
content_type
set - Ensure key vault secrets havecontent_type
set. - Ensure log profile is configured to capture all activities - Ensure log profile is configured to capture all activities.
- Ensure managed identity provider is enabled for app services - Ensure managed identity provider is enabled for app services.
- Ensure private cluster is enabled when creating Kubernetes clusters - Ensure private cluster is enabled when creating Kubernetes clusters.
- Ensure public network access enabled is set to False for mySQL servers - Ensure public network access enabled is set to False for mySQL servers.
- Ensure respective logs of Amazon RDS are enabled - Ensure respective logs of Amazon RDS are enabled.
- Ensure secure boot for shielded GKE nodes is enabled - Ensure secure boot for shielded GKE nodes is enabled.
- Ensure shielded GKE nodes are enabled - Ensure shielded GKE nodes are enabled.
- Ensure standard pricing tier is selected - Ensure standard pricing tier is selected.
- Ensure storage account uses latest TLS version - Communication between an Azure Storage account and a client application is encrypted using Transport Layer Security (TLS). Microsoft recommends using the latest version of TLS for all your Microsoft Azure App Service web applications.
- Ensure the GKE metadata server is enabled - Ensure the GKE metadata server is enabled.
- Ensure the S3 bucket has access logging enabled - Ensure the S3 bucket has access logging enabled.
- Ensure the storage container storing activity logs is not publicly accessible - Ensure the storage container storing activity logs is not publicly accessible.
- Find Terraform resource - Find a Terraform resource by resource type.
- Make ECR tags immutable - Amazon ECR supports immutable tags, preventing image tags from being overwritten. In the past, ECR tags could have been overwritten, this could be overcome by requiring users to uniquely identify an image using a naming convention.
- Scan images pushed to ECR - ECR Image Scanning assesses and identifies operating system vulnerabilities. Using automated image scans you can ensure container image vulnerabilities are found before getting pushed to production.
- Set Azure Storage Account default network access to deny - Ensure Azure Storage Account default network access is set to Deny.
- Use HTTPS for Cloudfront distribution - Secure communication by default.
- Use a long enough byte length for
random
resources - Use a long enough byte length forrandom
resources.
rewrite-vulncheck
- Use VulnCheck Exploit Intelligence to fix vulnerabilities - This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe by default only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this can be controlled using the
maximumUpgradeDelta
option. Vulnerability information comes from VulnCheck Vulnerability Intelligence. The recipe has an option to limit fixes to only those vulnerabilities that have evidence of exploitation at various levels of severity.