### Installing Python Dependencies from requirements.txt Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorldGlobalized/README.md Installs the necessary Python libraries listed in the requirements.txt file for local development. ```bash pip install -r requirements.txt ``` -------------------------------- ### Build the Sample App Source: https://github.com/ibm/qradar-sample-apps/blob/master/QJSLibNPM/README.md Provides the commands to install project dependencies and transpile/bundle the application code using npm. ```bash npm install && npm run build ``` -------------------------------- ### Resource Bundle Entry Example Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorldGlobalized/README.md Shows an example of a key-value pair within a resource bundle file, specifically for the Spanish translation of the app name. ```properties hellog11n.app.name=Hola Mundo ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/ibm/qradar-sample-apps/blob/master/CONTRIBUTING.md Installs the necessary Python dependencies for developing the sample apps using pip. ```bash pip install -r requirements.txt ``` -------------------------------- ### Gunicorn Configuration with Supervisord Source: https://github.com/ibm/qradar-sample-apps/blob/master/Gunicorn/app/templates/index.html This snippet shows a typical supervisord configuration for running Gunicorn, a Python WSGI HTTP Server. It specifies the command to start Gunicorn, the working directory, and user. This setup is common for deploying Python web applications in a production-like environment. ```bash [program:app] command=/usr/local/bin/gunicorn --bind 0.0.0.0:5000 app:app directory=/opt/app-root/src user=root autostart=true autorestart=true redirect_stderr=true ``` -------------------------------- ### Run a Command as Root During App Startup Source: https://github.com/ibm/qradar-sample-apps/blob/master/README.md This sample demonstrates how to execute a command with root privileges when an application starts. This is useful for setup tasks that require elevated permissions. ```Shell # Example snippet for running a command as root during startup # This would typically be part of a Dockerfile or an entrypoint script. # Example using a Dockerfile CMD or ENTRYPOINT # CMD ["/usr/bin/sudo", "/path/to/your/startup_script.sh"] # Example within a startup script (startup_script.sh): # #!/bin/bash # /usr/bin/sudo apt-get update -y # /usr/bin/sudo systemctl start some_service ``` -------------------------------- ### Install Carbon Dependencies Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/tutorial/tutorial.md Installs essential Carbon Design System packages for the React application, including core components, IBM Security extensions, and color palettes. Also installs Dart Sass for SCSS processing. ```bash yarn add carbon-components-react @carbon/ibm-security @carbon/colors yarn add sass ``` -------------------------------- ### Start React Application Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/tutorial/tutorial.md Launches the React development server to run the application locally. This command is typically executed from within the React application's directory. ```bash yarn start ``` -------------------------------- ### Running the QRadar App Locally Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorldGlobalized/README.md Command to run the QRadar application locally after dependencies are installed and locale files are compiled. ```bash qapp run ``` -------------------------------- ### Install NPM Dependencies Source: https://github.com/ibm/qradar-sample-apps/blob/master/NodeJS/README.md This command installs the necessary Node Package Manager (NPM) dependencies for the application. It uses 'npm ci' which is recommended for continuous integration environments as it installs dependencies exactly as specified in the 'package-lock.json' file. ```bash npm ci ``` -------------------------------- ### Run QRadar Application Locally Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/tutorial/tutorial.md Builds a Docker image for the QRadar application and starts a container to run it locally. This allows for testing the application before deployment. ```bash qapp run ``` -------------------------------- ### Manifest Globalization Example Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorldGlobalized/README.md Demonstrates how to use keys in the manifest.json to reference globalized values from resource bundles. This allows UI elements like the app name to be translated. ```json "name": "hellog11n.app.name", ``` ```json "resource_bundles": [ { "locale": "en_US", "bundle": "resources/hello_en_US.properties" }, { "locale": "es", "bundle": "resources/hello_es.properties" }, { "locale": "fr", "bundle": "resources/hello_fr.properties" }, { "locale": "en", "bundle": "resources/hello_en.properties" }, { "locale": "ja", "bundle": "resources/hello_ja.properties" } ] ``` -------------------------------- ### Install QJSLib NPM Package Source: https://github.com/ibm/qradar-sample-apps/blob/master/QJSLibNPM/README.md Demonstrates how to add the QJSLib JavaScript library as a dependency to an NPM project. ```bash npm install qjslib ``` -------------------------------- ### Running the QRadar Sample App Source: https://github.com/ibm/qradar-sample-apps/blob/master/CacheControl/README.md These commands demonstrate how to run and deploy the QRadar sample app locally. The `qapp run` command starts the app for local testing, while `qapp package` and `qapp deploy` are used for packaging and deploying the app to a QRadar console. ```bash qapp run ``` ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Simple 'Hello World' App Source: https://github.com/ibm/qradar-sample-apps/blob/master/README.md A basic 'Hello World' application to demonstrate the fundamental structure of a QRadar app. This is a starting point for developing new applications. ```Python # Example snippet for a simple Hello World app from flask import Flask, render_template app = Flask(__name__) @app.route('/') def hello_world(): return render_template('hello.html') # Example hello.html: # # # # Hello World # # #

Hello, QRadar World!

# # ``` -------------------------------- ### Create React Application Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/tutorial/tutorial.md Generates a new React application using Create React App. This command sets up a standard React project structure and installs necessary build tools and dependencies. ```bash npx create-react-app react-ui ``` -------------------------------- ### Download and Install QJSLib Source: https://github.com/ibm/qradar-sample-apps/blob/master/ReadOnlyLogSources/README.md Downloads the QJSLib v1.1.1 from GitHub releases and saves it to the app's static directory for use in the QRadar app framework. ```bash curl -LJ https://github.com/IBM/qjslib/releases/download/1.1.1/qjslib-1.1.1.tgz \ | tar -xvzO package/lib/qappfw.min.js > ./app/static/qjslib/qappfw.min.js ``` -------------------------------- ### Create RPM Ordering File Source: https://github.com/ibm/qradar-sample-apps/blob/master/NGINX/README.md Generates the 'ordering.txt' file in the 'container/rpm' directory. This file lists the RPMs to be installed, excluding the 'ordering.txt' file itself. ```bash ls container/rpm/ | grep -v "ordering.txt" > container/rpm/ordering.txt ``` -------------------------------- ### Build and Run Application Locally Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/README.md Builds and starts the QRadar application locally. This script assumes the necessary environment variables are set in 'qenv.ini'. ```shell . store/scripts/clean-and-run.sh ``` -------------------------------- ### Download NGINX RPMs Source: https://github.com/ibm/qradar-sample-apps/blob/master/NGINX/README.md Downloads the necessary NGINX RPM packages using a Docker container. The RPMs are saved to the 'container/rpm' directory, which also contains an 'ordering.txt' file specifying the installation order. ```bash docker run \ -v $(pwd)/container/rpm:/rpm \ registry.access.redhat.com/ubi8/ubi \ yum download --resolve nginx --downloaddir=/rpm ``` -------------------------------- ### Python Application Entrypoint Source: https://github.com/ibm/qradar-sample-apps/blob/master/Gunicorn/app/templates/index.html This is a basic Python Flask application that Gunicorn would serve. It defines a simple route '/'. The `app:app` in the Gunicorn command refers to the Flask application instance named 'app' within the 'app.py' file. ```python from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' if __name__ == '__main__': app.run(host='0.0.0.0', port=5000) ``` -------------------------------- ### Packaging and Deploying the App Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorld/README.md Packages the QRadar application into a zip file and deploys it to a QRadar console. Requires specifying the QRadar console IP address and user credentials. ```bash qapp package -p app.zip qapp deploy -p app.zip -q -u ``` -------------------------------- ### Proxy Configuration and HTTP GET Request Example Source: https://github.com/ibm/qradar-sample-apps/blob/master/CustomProxy/app/templates/proxy.html Demonstrates how to configure proxy settings (protocol, server, port, username, password) and make an HTTP GET request. It includes conditional rendering based on proxy settings and displays the results of the HTTP request, including status code and response. ```jinja Custom proxy ============ Enter your proxy details ------------------------ Proxy Protocol: {% if proxy_settings['protocol'] and proxy_settings['protocol'] == 'http' %} HTTP {% else %} HTTP {% endif %} {% if proxy_settings['protocol'] and proxy_settings['protocol'] == 'https' %} HTTPS {% else %} HTTPS {% endif %} Proxy Server: Proxy Port: Proxy Username: Proxy Password: {% if save_status %} **{{ save_status }}** {% endif %} Make a HTTP GET request from app backend ---------------------------------------- ### Test proxy settings #### Enter a url that requires a proxy to connect to it Address to send a HTTP GET request to {% if url %} HTTP request result ------------------- Address: {{ url }} {% if status_code==200 %} Test Successful {% else %} There was a problem with the test {% endif %} Status: {{ status_code }} Result: {{ result }} {% else %} {% endif %} ``` -------------------------------- ### Build and Package Application Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/tutorial/tutorial.md Commands to build the React UI for production and then package the application for deployment to QRadar. It involves navigating to the UI directory, building, and then creating a zip archive of essential files. ```bash cd react-ui && yarn build cd .. qapp clean -i qapp run ``` ```bash cd react-ui && yarn build cd .. zip app.zip -r app container manifest.json ``` -------------------------------- ### Packaging and Deploying the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/IPHoverOverMetaData/README.md Commands to package the QRadar app into a zip file and deploy it to a QRadar console. Requires the 'qapp' utility. ```bash qapp package -p app.zip qapp deploy -p app.zip -q -u ``` -------------------------------- ### Packaging the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorldGlobalized/README.md Command to package the QRadar application into a zip file for deployment. ```bash qapp package -p app.zip ``` -------------------------------- ### Packaging and Deploying the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/QJSLibBrowser/README.md This snippet provides the bash commands required to package the QRadar sample application into a zip file and then deploy it to a QRadar console. ```bash qapp package -p app.zip qapp deploy -p app.zip -q -u ``` -------------------------------- ### Install React Dependencies Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/README.md Installs all necessary dependencies for the React application using Yarn. This command should be executed from within the 'react-ui' directory. ```bash yarn install ``` -------------------------------- ### Package and Deploy QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/QuickScan/README.md These commands demonstrate the process of packaging the QRadar application into a zip file and then deploying it to a QRadar console. The `qapp` utility is used for both operations, requiring the path to the app package and QRadar console credentials. ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Package and Deploy the App Source: https://github.com/ibm/qradar-sample-apps/blob/master/QJSLibNPM/README.md Illustrates the bash commands required to package the QRadar application into a zip file and deploy it to a QRadar console. ```bash qapp package -p app.zip qapp deploy -p app.zip -q -u ``` -------------------------------- ### Install PostgreSQL RPMs Source: https://github.com/ibm/qradar-sample-apps/blob/master/PostgreSQL/README.md Downloads and installs PostgreSQL RPM packages for EL-8 systems. It also downloads OpenSSL, which can be removed afterward. The RPMs are placed in the container/rpm directory. ```bash docker run \ -v $(pwd)/container/rpm:/rpm \ registry.access.redhat.com/ubi8/ubi \ /bin/bash -c 'yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm && yum download -y postgresql10 postgresql10-libs postgresql10-contrib postgresql10-server --downloaddir=/rpm --resolve' ``` ```bash rm container/rpm/openssl*-1.*.rpm ``` -------------------------------- ### Package and Deploy QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/GUIActions/README.md Commands to package the QRadar application into a zip file and deploy it to a QRadar console. Requires the 'qapp' tool. ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Packaging and Deploying the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/OAuth/README.md Commands to package the QRadar app into a zip file and deploy it to a QRadar console. Requires the QRadar App SDK (qapp). ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### QRadar App Deployment Commands Source: https://github.com/ibm/qradar-sample-apps/blob/master/AlternativeHTTPServer/README.md These bash commands demonstrate how to run the QRadar app locally or package and deploy it to a QRadar console. The first command runs the app locally, while the subsequent commands package the app into a zip file and then deploy it to a specified QRadar console. ```bash qapp run ``` ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Start Development Server Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/react-ui/README.md Runs the React application in development mode, providing live reloading and console error reporting. ```bash yarn start # Opens http://localhost:3000 ``` -------------------------------- ### QRadar App SDK Deployment Source: https://github.com/ibm/qradar-sample-apps/blob/master/Proxy/README.md Commands to package and deploy the QRadar sample app using the QRadar App SDK. This involves creating a zip archive of the app and then deploying it to a specified QRadar console with user credentials. ```bash qapp package -p proxy.zip && qapp deploy -p proxy.zip -q -u ``` -------------------------------- ### Downloading Python Dependencies Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorldGlobalized/README.md Command to download required Python dependencies using Docker. It specifies the Python version and downloads packages like pytz, Babel, and Flask-Babel. ```bash docker run \ -v $(pwd)/container/pip:/pip \ registry.access.redhat.com/ubi8/python-36 \ pip download --no-deps --dest /pip pytz==2022.1 Babel==2.10.1 Flask-Babel==1.0.0 speaklater==1.3 ``` -------------------------------- ### Deploying the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorldGlobalized/README.md Command to deploy the packaged QRadar application to a QRadar console, requiring the console IP and user credentials. ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Packaging and Deploying the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/MultiComponents/README.md Commands to package the QRadar application into a zip file and deploy it to a QRadar console. ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Exporting the App as an Extension Source: https://github.com/ibm/qradar-sample-apps/blob/master/UninstallHooks/README.md Uses the QRadar content management tool to export the installed application as an extension zip. This is done via SSH on the QRadar console. ```bash /opt/qradar/bin/contentManagement.pl -a export -c installed_application -i ``` -------------------------------- ### Create QRadar Application Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/tutorial/tutorial.md Initializes a new QRadar application using the QRadar App SDK. This command generates the basic structure for a Flask webserver compatible with QRadar deployment. ```bash qapp create ``` -------------------------------- ### Download and Install QJSLib Source: https://github.com/ibm/qradar-sample-apps/blob/master/Ariel/README.md This snippet shows how to download a specific version of QJSLib and extract it into the application's static directory. It's a prerequisite for running the Ariel app. ```bash curl -LJ https://github.com/IBM/qjslib/releases/download/1.1.1/qjslib-1.1.1.tgz \ | tar -xvzO package/lib/qappfw.min.js > ./app/static/qjslib/qappfw.min.js ``` -------------------------------- ### Package and Deploy QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/Multitenancy/README.md Commands to package the QRadar application into a zip file and deploy it to a QRadar console. Requires the QRadar SDK. ```bash qapp package -p multitenancy.zip ``` ```bash qapp deploy -p multitenancy.zip -q -u ``` -------------------------------- ### Spanish Resource Bundle Entry Source: https://github.com/ibm/qradar-sample-apps/blob/master/CustomColumnsOffensesGlobalized/README.md An example entry from a resource bundle file, showing how a manifest key is translated into Spanish for the custom column label. ```properties customcolumn.label=Gravedad ``` -------------------------------- ### Package and Deploy QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/ReadOnlyLogSources/README.md Packages the QRadar sample app into a zip file and deploys it to a QRadar console. Requires the 'qapp' command-line tool. ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Running the App Locally Source: https://github.com/ibm/qradar-sample-apps/blob/master/HelloWorld/README.md Executes the QRadar application locally for development and testing purposes. ```bash qapp run ``` -------------------------------- ### Download Pip Dependencies Source: https://github.com/ibm/qradar-sample-apps/blob/master/Certificates/README.md Downloads required Python libraries (Flask-WTF and WTForms) for the QRadar app, specifying binary-only installation for a specific platform and saving them to the 'container/pip' directory without their dependencies. ```bash pip download \ --only-binary=:all: \ --platform manylinux1_x86_64 \ --dest container/pip \ --no-deps \ Flask-WTF==0.14.3 WTForms==2.3.3 ``` -------------------------------- ### QRadar App Environment Configuration Source: https://github.com/ibm/qradar-sample-apps/blob/master/PostgreSQL/README.md Example of a qenv.ini file used to inject environment variables into a local QRadar app container. It specifies the QRADAR_APP_UUID required by the encdec Encryption module. ```ini [app] QRADAR_APP_UUID=60f9f209-f6aa-4d87-b869-c102dcf3752c ``` -------------------------------- ### Packaging and Deploying the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/UninstallHooks/README.md Commands to package the QRadar app into a zip file and deploy it to a QRadar console. Requires the `qapp` tool and QRadar console IP and user credentials. ```bash qapp package -p app.zip qapp deploy -p app.zip -q -u ``` -------------------------------- ### Running the QRadar App Locally Source: https://github.com/ibm/qradar-sample-apps/blob/master/APIVersion/README.md Instructions for running the sample application locally using the QRadar App SDK v2. ```bash qapp run ``` -------------------------------- ### Using QJSLib in JavaScript Source: https://github.com/ibm/qradar-sample-apps/blob/master/QJSLibBrowser/README.md This snippet illustrates how to access and use the QJSLib library within JavaScript code after it has been imported into the HTML. It shows how to instantiate the QRadar object and call a method to get the current user. ```javascript const QRadar = window.qappfw.QRadar; // Example of calling a QJSLib function QRadar.getCurrentUser() ``` -------------------------------- ### App Manifest: REST Method Configuration Source: https://github.com/ibm/qradar-sample-apps/blob/master/IPHoverOverMetaData/README.md Defines the 'getIPMetadata' REST method. It specifies the URL endpoint ('/ip_metadata_provider'), HTTP method ('GET'), and the argument name ('context') used to pass the IP address. ```json { "rest_methods": [ { "name": "getIPMetadata", "url": "/ip_metadata_provider", "method": "GET", "argument_names": [ "context" ] } ] } ``` -------------------------------- ### QRadar App SDK Local Configuration Source: https://github.com/ibm/qradar-sample-apps/blob/master/CustomProxy/README.md Example `qenv.ini` file for local QRadar app development. It injects essential environment variables like QRADAR_APP_UUID and QRADAR_FLASK_SECRET_KEY required by the app's modules. ```ini [app] QRADAR_APP_UUID=e7b57727-75e0-42f0-9e28-c4100a8e456c QRADAR_FLASK_SECRET_KEY=f3dcaacc-8548-411b-aa99-83c7a52f0392 ``` -------------------------------- ### Packaging and Deploying the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/APIVersion/README.md Commands to package the application into a zip file and deploy it to a QRadar console. ```bash qapp package -p app.zip ``` ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### PostgreSQL Container Startup Script Source: https://github.com/ibm/qradar-sample-apps/blob/master/PostgreSQL/README.md Shell script executed at container startup to prepare and initialize the PostgreSQL database environment. ```bash # At container startup the `container/run/startup.sh` script is run, this script is responsible for preparing the # container to run PostgreSQL, setting up a directory in `store/db` to store the database data and configuration, # alongside cleaning up default PostgreSQL files and initializing the PostgreSQL database. ``` -------------------------------- ### Bypass Browser Cache with Query Parameter Source: https://github.com/ibm/qradar-sample-apps/blob/master/CacheControl/README.md This example shows how to bypass the browser's cache by appending a query parameter with a timestamp to a Javascript file URL. This ensures that the latest version of the file is always loaded. ```javascript cachecontrol.js?nocache=1597076610305 ``` -------------------------------- ### HTTP Request Result Source: https://github.com/ibm/qradar-sample-apps/blob/master/Certificates/app/templates/index.html Displays the result of an HTTP GET request made to a specified URL, including the address, status code, and result. This is used to test the uploaded certificate's validity. ```html {% if url %} HTTP request result ------------------- Address: {{ url }} {% if status_code==200 %} Test Successful {% else %} There was a problem with the test {% endif %} Status: {{ status_code }} Result: {{ result }} {% endif %} ``` -------------------------------- ### Deploy Application to QRadar Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/tutorial/tutorial.md Command to deploy the packaged QRadar application. Requires the QRadar console IP address and user credentials. May prompt for CA certificate download on first deployment. ```bash qapp deploy -p app.zip -q -u ``` -------------------------------- ### Run QRadar App Locally Source: https://github.com/ibm/qradar-sample-apps/blob/master/Encryption/README.md Command to run the QRadar application locally using the QRadar App SDK. This command starts the application within a local container environment for testing and development. ```bash qapp run ``` -------------------------------- ### Packaging the QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/DashboardWithImage/README.md Command to package the QRadar sample app into a zip file for deployment. ```bash qapp package -p app.zip ``` -------------------------------- ### Right Click GUI Action JavaScript Source: https://github.com/ibm/qradar-sample-apps/blob/master/MultiComponents/README.md The JavaScript code executed when a 'right click GUI action' is triggered. This example opens a new browser window to Google, searching for the context's inner text (e.g., an IP address). ```javascript window.open('http://www.google.com?q='+context.innerText) ``` -------------------------------- ### JavaScript Status Update Functions Source: https://github.com/ibm/qradar-sample-apps/blob/master/CustomProxy/app/templates/proxy.html Provides functions to clear and set status messages in the UI, specifically targeting elements with IDs 'save-status' and 'search-status'. These functions are useful for providing user feedback during application operations. ```javascript function clearSaveStatus() { var save_status = document.getElementById("save-status"); if(save_status) { save_status.innerHTML = ""; } } function setSaveStatus(status) { var save_status = document.getElementById("save-status"); if(save_status) { save_status.innerHTML = "" + status + ""; } return true; } function setSearchStatus(status) { var search_status = document.getElementById("search-status"); if(search_status) { search_status.innerHTML = "" + status + ""; } return true; } ``` -------------------------------- ### Deploy Application to QRadar Source: https://github.com/ibm/qradar-sample-apps/blob/master/CarbonComponents/README.md Deploys the packaged QRadar application to a QRadar console. Requires the application zip file, QRadar console IP, and user credentials. ```bash qapp deploy qapp deploy -p app.zip -q -u ``` -------------------------------- ### Packaging the QRadar Sample App Source: https://github.com/ibm/qradar-sample-apps/blob/master/ConfigPageLocations/README.md This command packages the QRadar sample application into a zip file for deployment to a QRadar console. ```bash qapp package -p app.zip ``` -------------------------------- ### Download and Install QJSLib Source: https://github.com/ibm/qradar-sample-apps/blob/master/QuickScan/README.md This snippet shows how to download a specific version of the QJSLib library from GitHub and save it into the app's static directory for use. It uses curl to fetch the compressed archive and tar to extract the necessary JavaScript file. ```bash curl -LJ https://github.com/IBM/qjslib/releases/download/1.1.1/qjslib-1.1.1.tgz \ | tar -xvzO package/lib/qappfw.min.js > ./app/static/qjslib/qappfw.min.js ``` -------------------------------- ### Package and Deploy QRadar App Source: https://github.com/ibm/qradar-sample-apps/blob/master/AsRoot/README.md Packages the QRadar app into a zip file for deployment and then deploys it to a QRadar console. Requires specifying the QRadar console IP and user credentials. ```bash qapp package -p app.zip qapp deploy -p app.zip -q -u ```