Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mysql and postgresql dependency in pom and gradle detect #255

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions rules/rules-overridden-azure/technology-usage/database.windup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
<rules>
<rule id="database-01500">
<when>
<file filename="{*}mysql-connector{*}.jar"/>
<or>
<file filename="{*}mysql-connector{*}.jar"/>
<project>
<artifact groupId="{*}mysql{*}" artifactId="{*}"/>
</project>
<filecontent filename="build.gradle" pattern="mysql"/>
</or>
</when>
<perform>
<hint title="MySQL database found" category-id="potential" effort="3">
Expand Down Expand Up @@ -46,7 +52,13 @@
</rule>
<rule id="database-01700">
<when>
<file filename="{*}postgresql{*}.jar"/>
<or>
<file filename="{*}postgresql{*}.jar"/>
<project>
<artifact groupId="{*}postgresql{*}" artifactId="{*}"/>
</project>
<filecontent filename="build.gradle" pattern="postgresql"/>
</or>
</when>
<perform>
<hint title="PostgreSQL database found" category-id="potential" effort="3">
Expand Down
117 changes: 101 additions & 16 deletions rules/rules-reviewed/azure/azure-aws-config.windup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,112 @@
<rule id="azure-aws-config-s3-03000">
<when>
<or>
<project>
<artifact groupId="software.amazon.awssdk" artifactId="s3"/>
</project>
<javaclass references="software.amazon.awssdk.services.s3.{*}">
<location>IMPORT</location>
</javaclass>
<filecontent filename="{*}.properties" pattern="aws.s3"/>
<filecontent filename="{*}.properties" pattern="aws.s3"/>
<project>
<artifact groupId="com.amazonaws" artifactId="aws-java-sdk-s3"/>
</project>
<javaclass references="com.amazonaws.services.s3.{*}">
<location>IMPORT</location>
</javaclass>
<javaclass references="com.amazonaws.services.s3.{*}"/>
<project>
<artifact groupId="io.awspring.cloud" artifactId="spring-cloud-aws-starter-s3"/>
</project>
<javaclass references="io.awspring.cloud.s3.{*}"/>
</or>
</when>
<perform>
<hint title="AWS S3 usage found" category-id="mandatory" effort="3">
<message>
The application contains AWS S3 usage. Consider using Azure Blob Storage instead.

* Provision **Azure Blob Storage**: Create an Azure Blob Storage account in the Azure portal. Choose the appropriate storage tier (Hot, Cool, or Archive) based on your application's data access patterns and cost considerations.

* **Update application code**: Modify the Java application's code to replace AWS SDK calls with the equivalent Azure Storage SDK calls for Azure Blob Storage. Update the code to authenticate and interact with Azure Blob Storage using the Azure SDK for Java.

* **Map S3 functionality** to Azure Blob Storage: Understand the differences between AWS S3 and Azure Blob Storage, and adjust your application logic accordingly. Map S3 concepts (buckets, objects, permissions, etc.) to their Azure Blob Storage equivalents (containers, blobs, shared access signatures, etc.).

* **Migrate data** from S3 to Azure Blob Storage: Plan and execute the migration of your data from AWS S3 to Azure Blob Storage. You can use Azure Storage Data Transfer Tool, AzCopy, or other migration tools to copy the data from S3 buckets to Azure Blob Storage containers.

* Update **access permissions**: Adjust the access permissions and policies in Azure Blob Storage to match your application's requirements. Azure provides various options for controlling access, including shared access signatures (SAS), Azure AD authentication, and role-based access control (RBAC).

* Validate functionality and **performance**: Thoroughly test the updated application to ensure that it can read from and write to Azure Blob Storage correctly. Validate the performance of data transfer and any other operations to ensure they meet your application's requirements.
</message>
<link title="Azure Blob Storage documentation" href="https://learn.microsoft.com/azure/storage/blobs"/>
<link title="Quickstart: Azure Blob Storage client library for Java" href="https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-java"/>
<link title="Move your data from AWS S3 to Azure Storage using AzCopy" href="https://azure.microsoft.com/blog/move-your-data-from-aws-s3-to-azure-storage-using-azcopy"/>
<tag>storage</tag>
</hint>
</perform>
</rule>
<rule id="azure-aws-config-s3-03002">
<when>
<javaclass references="software.amazon.awssdk.services.s3.{*}"/>
</when>
<perform>
<hint title="AWS S3 usage found" category-id="mandatory" effort="3">
<message>
The application contains AWS S3 usage. Consider using Azure Blob Storage instead.

* Provision **Azure Blob Storage**: Create an Azure Blob Storage account in the Azure portal. Choose the appropriate storage tier (Hot, Cool, or Archive) based on your application's data access patterns and cost considerations.

* **Update application code**: Modify the Java application's code to replace AWS SDK calls with the equivalent Azure Storage SDK calls for Azure Blob Storage. Update the code to authenticate and interact with Azure Blob Storage using the Azure SDK for Java.

* **Map S3 functionality** to Azure Blob Storage: Understand the differences between AWS S3 and Azure Blob Storage, and adjust your application logic accordingly. Map S3 concepts (buckets, objects, permissions, etc.) to their Azure Blob Storage equivalents (containers, blobs, shared access signatures, etc.).

* **Migrate data** from S3 to Azure Blob Storage: Plan and execute the migration of your data from AWS S3 to Azure Blob Storage. You can use Azure Storage Data Transfer Tool, AzCopy, or other migration tools to copy the data from S3 buckets to Azure Blob Storage containers.

* Update **access permissions**: Adjust the access permissions and policies in Azure Blob Storage to match your application's requirements. Azure provides various options for controlling access, including shared access signatures (SAS), Azure AD authentication, and role-based access control (RBAC).

* Validate functionality and **performance**: Thoroughly test the updated application to ensure that it can read from and write to Azure Blob Storage correctly. Validate the performance of data transfer and any other operations to ensure they meet your application's requirements.
</message>
<link title="Azure Blob Storage documentation" href="https://learn.microsoft.com/azure/storage/blobs"/>
<link title="Quickstart: Azure Blob Storage client library for Java" href="https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-java"/>
<link title="Move your data from AWS S3 to Azure Storage using AzCopy" href="https://azure.microsoft.com/blog/move-your-data-from-aws-s3-to-azure-storage-using-azcopy"/>
<tag>storage</tag>
</hint>
</perform>
</rule>
<rule id="azure-aws-config-s3-03003">
<when>
<project>
<artifact groupId="software.amazon.awssdk" artifactId="s3"/>
</project>
</when>
<perform>
<hint title="AWS S3 usage found" category-id="mandatory" effort="3">
<message>
The application contains AWS S3 dependency usage. Consider using Azure Blob Storage instead.

* Provision **Azure Blob Storage**: Create an Azure Blob Storage account in the Azure portal. Choose the appropriate storage tier (Hot, Cool, or Archive) based on your application's data access patterns and cost considerations.

* **Update application code**: Modify the Java application's code to replace AWS SDK calls with the equivalent Azure Storage SDK calls for Azure Blob Storage. Update the code to authenticate and interact with Azure Blob Storage using the Azure SDK for Java.

* **Map S3 functionality** to Azure Blob Storage: Understand the differences between AWS S3 and Azure Blob Storage, and adjust your application logic accordingly. Map S3 concepts (buckets, objects, permissions, etc.) to their Azure Blob Storage equivalents (containers, blobs, shared access signatures, etc.).

* **Migrate data** from S3 to Azure Blob Storage: Plan and execute the migration of your data from AWS S3 to Azure Blob Storage. You can use Azure Storage Data Transfer Tool, AzCopy, or other migration tools to copy the data from S3 buckets to Azure Blob Storage containers.

* Update **access permissions**: Adjust the access permissions and policies in Azure Blob Storage to match your application's requirements. Azure provides various options for controlling access, including shared access signatures (SAS), Azure AD authentication, and role-based access control (RBAC).

* Validate functionality and **performance**: Thoroughly test the updated application to ensure that it can read from and write to Azure Blob Storage correctly. Validate the performance of data transfer and any other operations to ensure they meet your application's requirements.
</message>
<link title="Azure Blob Storage documentation" href="https://learn.microsoft.com/azure/storage/blobs"/>
<link title="Quickstart: Azure Blob Storage client library for Java" href="https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-java"/>
<link title="Move your data from AWS S3 to Azure Storage using AzCopy" href="https://azure.microsoft.com/blog/move-your-data-from-aws-s3-to-azure-storage-using-azcopy"/>
<tag>storage</tag>
</hint>
</perform>
</rule>
<rule id="azure-aws-config-s3-03001">
<when>
<or>
<javaclass references="software.amazon.awssdk.services.s3.presigner.{*}" />
<javaclass references="com.amazonaws.services.s3.model.GeneratePresignedUrlRequest" />
<javaclass references="com.amazonaws.services.s3.transfer.{*}" />
<javaclass references="software.amazon.awssdk.transfer.s3.S3TransferManager" />
</or>
</when>
<perform>
<hint title="AWS S3 configuration" category-id="mandatory" effort="3">
<hint title="AWS S3 operations found" category-id="mandatory" effort="3">
<message>
The application contains AWS S3 configuration. Consider using Azure Blob Storage instead.
The application contains AWS S3 storage operations. Consider using Azure Blob Storage instead.

* Provision **Azure Blob Storage**: Create an Azure Blob Storage account in the Azure portal. Choose the appropriate storage tier (Hot, Cool, or Archive) based on your application's data access patterns and cost considerations.

Expand All @@ -104,16 +191,14 @@
<tag>storage</tag>
</hint>
</perform>
</rule>
</rule>
<rule id="azure-aws-config-sqs-04000">
<when>
<or>
<project>
<artifact groupId="com.amazonaws" artifactId="aws-java-sdk-sqs"/>
</project>
<javaclass references="com.amazonaws.services.sqs.{*}">
<location>IMPORT</location>
</javaclass>
<javaclass references="com.amazonaws.services.sqs.{*}"/>
<filecontent pattern="aws.sqs"/>
</or>
</when>
Expand Down
Loading