Tidal Analyze Source Code
Not sure how ready you are to move to the cloud? With Tidal you have the option to analyze your specified source code associated with the applications. The analysis will identify the difficulty to migrate your applications to the cloud.
If you are interested in a deeper dive source code assessment, let us know at email@example.com.
Try it out!
- Install, configure and authenticate via Tidal Tools. Make sure you follow these guides.
- How to install Tidal Tools.
- Install Tidal Tools dependencies.
- Make sure you can connect with your workspace using Tidal Tools.
- As the last step, You should run the tidal doctor command to verify that your environment has been configured properly.
You will need the ID of the application for which you are going to perform the source code analysis. You can find it in the URL bar when looking at an application. ex. If you are viewing an application in Tidal, the URL will show
https://[your workspace].tidal.cloud/apps/111/overviewin this case 111 is the application ID.
Lastly, you will need a local copy of the source code for the application.
Perform the Source Code Analysis. There are 2 options to do so. You can find more details in this section.
That is all. You should be able to see the results in your workspace within seconds.
Perform the analysis
When analyzing a source code (or multiple), you have two options.
Perform the source code analysis and upload the result immediately to your workspace. This is Tidal Tools’ default behaviour. To do so, all you need to do is run the following command.
cd /path/to/source-code tidal analyze code --app-id 111
Alternatively, you can pass the location to the source code.
tidal analyze code ~/location/to-source-code/ --app-id 111
Perform the source code analysis and upload the results at a later time. The following section will explain how to run database analysis in offline mode
There are circumstances in which you need to perform a source code analysis on an environment without or with restricted internet access. In such case, you can perform the analysis, capture its results and at a later stage upload those results to your Tidal workspace.
These are the steps you need to follow in order to bypass internet access limitations:
On a Machine with internet access, you need to install, and configure Tidal Tools.
Package Tidal Tools and its required docker container images into a tar file. This will allow you to move the archive file into your restricted environment. To do so, run the following command.
Once it has finished, you will find (in your current location) a tar file called
tidal-snapshot_DATE.tar. This is the file you need to transport into your internet restricted environment.
On the machine that has no internet access, you will now restore Tidal Tools using the following command.
tidal restore tidal-snapshot_DATE.tar
This will load a docker image and all the existing Tidal Tools configurations from the original machine. You can now run the source code analysis without any external network connectivity.
tidal analyze code [path/to-directory] --offline --output-dir [directory]
--offlineflag indicates to Tidal Tools that the output needs to be stored in a file instead of being uploaded.
--output-dirflag determines where the output will be located.
After the analysis is completed, you will find a zip file called,
result-<DATE>.zipthat can then be transferred into a machine with internet connectivity.
Back to the machine with internet access, you can now upload your results to your workspace with this command.
tidal analyze code --app-id [app_id_for_your_application] --upload [file_name]
You should receive confirmation that the upload has been completed and can navigate to Tidal to see the results.
You need to install Docker in order to complete the source code analysis. This is because the analysis uses several system dependent software libraries so by using Docker the analysis can use those libraries without you requiring to install the correct versions and dependencies.
What about security?
The entire analysis takes place locally on your machine. The only data that is captured and sent from the analysis are the results of the analysis and metadata. No source code, files or the contents of any files on your machine are ever copied or sent anywhere.