Vault Radar
Use Vault Radar CLI in offline mode
Use the Vault Radar CLI in offline mode to scan supported data sources without connecting the scan to HashiCorp Cloud Platform (HCP). Offline mode still requires a valid Vault Radar license. Scans that access source APIs, repositories, or registries also require network access to those services.
This guide covers standalone CLI workflows. It does not change the setup for HCP cloud scans, HCP-connected agents, or the Vault Radar IDE plugin. For CLI installation, refer to the Vault Radar CLI overview.
Prerequisites
- Install a supported Vault Radar CLI binary. Refer to Download and install CLI.
- Obtain a valid Vault Radar license for the commands you run.
- Provide credentials and network access required by each data source.
- Use a supported operating system for the command.
Configure a license
The CLI checks for a license in this order:
VAULT_RADAR_LICENSEenvironment variable which contains the license key.VAULT_RADAR_LICENSE_PATHenvironment variable which contains the path to a license file.- The default file at
$HOME/.hashicorp/vault-radar/vault-radar.hclic.
Set one of the environment variables before you run an offline scan. Keep license files and environment values private, and follow your organization's credential-handling requirements.
$ export VAULT_RADAR_LICENSE_PATH="/secure/path/vault-radar.hclic"
The CLI validates the license and the feature required by the command. Contact your Vault Radar representative for license renewal or entitlement questions.
Run a scan
For commands that support the --offline flag, include it and write the results to a file with --outfile or -o.
$ vault-radar scan confluence \
--url "https://CONFLUENCE.example.com" \
--space-key "SPACE_KEY" \
--offline \
--outfile "confluence-results.csv"
The command writes scan findings to the output file. CSV is the default output format for most scan commands; check the command's reference for supported formats and required options. For example, scan confluence documents its options and output formats.
Supported commands
The following commands support standalone scans with --offline. This is the supported command list for the workflows in this guide. Use vault-radar scan COMMAND --help to confirm options in your installed CLI version.
| Data source | CLI command | Details |
|---|---|---|
| GitHub, GitHub Enterprise, GitLab, Bitbucket, Azure DevOps, Gerrit repositories | scan repo | Scans a repository clone or clones a repository over the network. Refer to scan repo. |
| Confluence Cloud and Server | scan confluence | Requires network access to the Confluence instance. Refer to scan confluence. |
| Jira Cloud and Server | scan jira | Requires network access to Jira. Refer to scan jira. |
| Slack Cloud | scan slack | Requires network access to Slack. Refer to scan slack. |
| Microsoft OneDrive | scan onedrive | Uses Microsoft Graph application credentials and requires network access to Microsoft services. See Configure OneDrive credentials. |
| Microsoft SharePoint | scan sharepoint | Uses Microsoft Graph application credentials and requires network access to Microsoft services. See Configure SharePoint credentials. |
| Microsoft Teams channels | scan teams | Scans messages and replies in a selected channel using Microsoft Graph application credentials. See Configure Teams credentials. |
| AWS S3 | scan aws-s3 (Beta) | Requires AWS credentials and access to the S3 API. Refer to scan aws-s3 and AWS authentication. |
| AWS Systems Manager Parameter Store | scan aws-parameter-store (Beta) | Requires AWS credentials and access to the SSM API. Refer to scan AWS Parameter Store and AWS authentication. |
| Docker images | scan docker-image (Beta) | Pulling an image requires access to its registry unless the image is available locally. Refer to scan docker-image. |
| Local folders | scan folder (Beta) | Scans files available on the local filesystem. Refer to scan folder. |
| Individual files | scan file (Beta) | Scans a local file. Refer to scan file. |
| Local Git branch tips and pull request diffs | scan ci tip, scan ci pr | Operates on a local Git working copy. Refer to scan ci. |
| Git pre-commit and pre-receive hooks | scan git pre-commit, scan git pre-receive | Hook workflows use their documented local configuration and license behavior. Refer to install Git hooks and scan git pre-receive. |
The scan tfe-variables command requires an HCP connection and is not included in this Offline CLI list. Refer to scan TFE variables for its HCP-connected workflow.
Microsoft Teams
The standalone scan teams command scans messages and replies in a channel you select. It does not scan tenant-wide, direct, or group chats, or attachment content. For HCP cloud or agent onboarding, refer to Microsoft Teams data source setup.
Configure Microsoft credentials
The standalone OneDrive, SharePoint, and Teams commands use Microsoft Entra application credentials with Microsoft Graph. They do not use the interactive sign-in flow for HCP cloud onboarding. Register an application in your tenant and add the Microsoft Graph Application permissions listed for the data source. Do not add delegated permissions for these client-credentials workflows.
| Data source | Microsoft Graph application permissions | API permission reference |
|---|---|---|
| OneDrive | Files.Read.All, User.Read.All | Get driveItem, driveItem delta, and Get user. |
| SharePoint | Sites.Read.All, Files.Read.All, User.Read.All | Get site, Get driveItem, driveItem delta, and Get user. |
| Teams | ChannelMessage.Read.All, Channel.ReadBasic.All, Team.ReadBasic.All, User.Read.All | List channel messages, list channel message replies, Get channel, Get team, and Get user. |
To grant consent, open the app registration in the Microsoft Entra admin center, select API permissions, add the listed Microsoft Graph Application permissions, and select Grant admin consent for the tenant. For more information, refer to Microsoft's application permissions and admin consent guidance.
The Graph permissions are tenant-wide application permissions. Have your administrator review whether your tenant supports a narrower resource-scoped configuration for the required endpoints before granting them. Confirm the permissions and network behavior in your tenant before production use. HCP cloud and agent app definitions do not define standalone CLI permissions.
Configure Microsoft OneDrive credentials
Set the client ID and secret for the Entra application that has approved OneDrive Graph access:
$ export MICROSOFT_ONEDRIVE_CLIENT_ID="APPLICATION_CLIENT_ID"
$ export MICROSOFT_ONEDRIVE_CLIENT_SECRET="APPLICATION_CLIENT_SECRET"
Find the tenant ID, drive ID, and drive display name using your approved Microsoft Graph tooling or an administrator-assisted process. Microsoft Graph does not support application permissions for its Get drive endpoint. Pass --drive-name so the CLI does not need to look up the drive name through that endpoint.
$ vault-radar scan onedrive \
--tenant-id "TENANT_ID" \
--drive-id "DRIVE_ID" \
--drive-name "DRIVE_NAME" \
--offline \
--outfile "onedrive-results.csv"
Use --item-ids to select specific items. Review the installed command's help for additional options, including file-version scanning.
For HCP cloud or agent onboarding, refer to Microsoft OneDrive data source setup.
Configure Microsoft SharePoint credentials
Set the client ID and secret for the Entra application that has approved SharePoint Graph access:
$ export MICROSOFT_SHAREPOINT_APP_CLIENT_ID="APPLICATION_CLIENT_ID"
$ export MICROSOFT_SHAREPOINT_APP_CLIENT_SECRET="APPLICATION_CLIENT_SECRET"
Find the tenant, site, and drive IDs using your approved Microsoft Graph tooling or an administrator-assisted process. Run a scan against the selected document library:
$ vault-radar scan sharepoint \
--tenant-id "TENANT_ID" \
--site-id "SITE_ID" \
--drive-id "DRIVE_ID" \
--offline \
--outfile "sharepoint-results.csv"
Use --item-ids to select specific items. Review the installed command's help for additional options, including file limits and file-version scanning.
For HCP cloud or agent onboarding, refer to Microsoft SharePoint data source setup.
Configure Microsoft Teams credentials
Set the client ID and secret for the Entra application that has approved Teams Graph access:
$ export MICROSOFT_TEAMS_CLIENT_ID="APPLICATION_CLIENT_ID"
$ export MICROSOFT_TEAMS_CLIENT_SECRET="APPLICATION_CLIENT_SECRET"
Select a team and channel by name. The CLI looks up the team in the tenant and the channel within that team, then uses their Microsoft Graph IDs for the scan. Name matching is case-insensitive. The lookup fails when no matching resource exists or when a name matches more than one resource. You can use --team-id and --channel-id instead when you already have the IDs.
$ vault-radar scan teams \
--tenant-id "TENANT_ID" \
--team-name "TEAM_NAME" \
--channel-name "CHANNEL_NAME" \
--offline \
--outfile "teams-results.csv"
For HCP cloud or agent onboarding, refer to Microsoft Teams data source setup.
Network requirements
Offline mode does not make every scan air-gapped. The CLI does not connect a scan to HCP when it runs in offline mode, but it still needs network access to remote source APIs, Git hosts, and image registries used by the scan. Configure your proxy, TLS trust, and egress rules for the services your selected commands access. Validate file-download and redirect hosts for your environment with your network administrator.
Local file and folder scans do not need source-service connectivity. Git hook and CI scans operate on local Git content, but any configured activeness checks can make network requests. Use --skip-activeness when you need to disable those checks and the command supports that option.
Protect scan output and logs
Scan output can contain sensitive locations and findings. Restrict access to result files, set an appropriate retention period, and securely share or delete them according to your organization's policies.
The CLI also writes diagnostic logs. Review logs for sensitive information and redact them before sharing with support. Diagnostic logs and scan result files are separate from any local audit records. A local audit-record feature is not available unless the CLI release documentation explicitly describes it.
Report active users
Offline CLI does not submit scan-consumption metering to HCP. Commercial pricing uses the active-user reporting process agreed with your account team. Follow that process for the applicable reporting period. Do not use datasource meter CSV files as the commercial active-user count unless your account team explicitly approves that method.
Related CLI workflows
- To install a Git pre-commit hook that runs a Vault Radar scan, refer to install a Git pre-commit hook.
- To exclude known findings from scan results, refer to configure custom ignore rules.
govern vault(Beta) is a separate HCP-connected workflow. It is not part of the standalone Offline CLI scan matrix in this guide.- The Beta
metercommands, including Git, Jira, and Slack, estimate contributors for those data sources. They do not measure Offline CLI active users or replace the commercial reporting process described in Report active users.
Next steps
- Review the Vault Radar CLI command overview.
- Configure AWS authentication for AWS scans.
- Review CSV output definitions before processing results.
- For HCP-connected deployments, review the Vault Radar agent deployment documentation.