regscale/regscale-cli-ubi

By regscale

Updated about 1 month ago

Image
0

8.1K

regscale/regscale-cli-ubi repository overview

RegScale Command Line Interface (CLI)

This CLI application is for supporting advanced automation and bulk data processing related to the RegScale Compliance Automation Platform. This application is intended to run as a "side car" that be scheduled via CRON job or serverless function to perform sophisticated data processing. The CLI includes multiple libraries for processing data, connecting to RegScale Application Programming Interfaces (APIs), and commercial integrations. This software may be packaged and included in other commercial software to lower the level of effort associated with building RegScale integrations to other commercial tools.

See full documentation on regscale.readme.io.

Installation

Pull the latest container from Docker Hub:

# pull the latest container
docker pull regscale/regscale-cli:latest

# run a command via container
docker run regscale/regscale-cli:latest about

# create long living container in detached mode and name it 'regscale-cli' (this will preserve your init.yaml configuration)
docker run -itd --name regscale-cli regscale/regscale-cli:latest

### or ###

# enter the container
docker run -it --entrypoint /bin/bash regscale/regscale-cli:latest

# execute the CLI
regscale --help

# exit the container (this will not preserve your init.yaml configuration)
exit

Initialization

Initialize your CLI environment with the init command:

# enter the long running container and execute any CLI command
docker exec -it regscale-cli bash

# initialize RegScale CLI environment
regscale init

### or ###

# enter the container
docker run -it --entrypoint bash regscale/regscale-cli:latest

# initialize RegScale CLI environment
regscale init

The CLI will generate a default init.yaml file and prompt you for RegScale domain and to log in:

Initializing your RegScale CLI environment...
Would you like to change your RegScale domain from https://regscale.yourcompany.com/? (Y/n): y

Please enter your RegScale domain.
Example: https://mydomain.regscale.com/
Domain: https://regscale.mycomapny.com
[2023/01/20 04:32;41] INFO     [2023/01/20 04:32;41] [INFO ]  Valid URL provided, regscale.py:349
                               init.yaml has been updated.                                       
Would you like to log in to your RegScale instance? (Y/n): y
Please enter your username: gson
Please enter your password:

Using different entrypoints

The CLI has a few different entry points that can be used to run different commands. The default entrypoint is regscale which is used to run CLI commands. The bash entrypoint can be used to enter the container. The regscale-rest entry point will create a REST API server that can be used to run the CLI via REST API calls.

# run the container as a REST API server and expose port 5000
docker run -itd --name cli-rest -p 5555:5555 --entrypoint regscale-cli-rest regscale/regscale-cli:latest

# curl the REST API and output the result
curl --silent localhost:5555/about | jq -r .output

# view the RegScale CLI REST API documentation by using browser and going to http://localhost:5555/swagger
# or you can use CLI web page uploading tools by going to http://localhost:5555/

Logs

The CLI will log to stdout and stderr. You can also enable debug logging by setting the LOGLEVEL environment variable to DEBUG:

# enter the container and set the LOGLEVEL environment variable to DEBUG
docker run -it --entrypoint bash -e LOGLEVEL=DEBUG regscale/regscale-cli:latest

# view the logs by container name
docker logs regscale-cli

### or ###

# View the container id with docker ps
docker ps

# view docker logs
docker logs <container-id>

Use Cases

  • Sidecar for bulk processing compliance data such as vulnerability scans or continuous monitoring logs
  • Processing and ingest of data such as National Institute of Standards and Technology (NIST) Open Security Control Assessment Language (OSCAL)
  • Running CRON jobs to bulk-process data
  • Managing users and identities from external sources
  • Threat intelligence feeds

Specific Integrations

Tag summary

Content type

Image

Digest

sha256:b4f6ca469

Size

713 MB

Last updated

about 1 month ago

docker pull regscale/regscale-cli-ubi:6.24.0.0