A Software Developer's Kit and Command Line Interpreter interface for Bitsight Security Ratings.
Bitsight, a leading cyber risk intelligence company, provides objective, data-driven security ratings and analytics to help organizations manage digital risks, particularly with third parties. Their platform continuously analyzes external data to score companies' security postures, identify vulnerabilities, and benchmark performance, helping businesses make informed decisions about vendors, cyber insurance, and overall security strategy.
Security Ratings: Assigns objective, data-backed scores (from 250-900) to organizations, reflecting their cybersecurity health.
Third-Party Risk Management (TPRM): Assesses the risk introduced by vendors, clients, and partners, helping companies manage supply chain vulnerabilities.
Attack Surface Management: Maps and monitors an organization's entire digital footprint to find exposures.
Benchmarking: Allows companies to compare their security performance against peers and industry standards.
Risk Quantification: Provides data to help understand the financial impact of cyber risk.
This application is built to export data via the extensive BitSight API for writing it into Microsoft SQL Server (MSSQL) using a 1:1 physical table representation of BitSight endpoints.
This tool is not an official BitSight product.
Use of this software is not covered by any license, warranty, or support agreement you may have with BitSight. All functionality is implemented independently using publicly available Bitsight API Documentation: https://help.bitsighttech.com/hc/en-us/articles/231872628-API-Documentation-Overview
Running any of the following prints the full command tree (all commands + subcommands):
bitsight-cli --helpbitsight-cli -hbitsight-cli help
The CLI supports explicit exit commands:
bitsight-cli exitbitsight-cli quitxq
On exit/quit it prints:
Thank you for using the BitSight CLI
These options apply to all commands (when present on the CLI):
| Option | Description |
|---|---|
--verbose |
Enable debug logging |
--no-progress |
Disable progress bars |
--api-key |
BitSight API token (HTTP Basic Auth username) |
--base-url |
BitSight API base URL (e.g., https://api.bitsighttech.com) |
--proxy-url |
Proxy URL (e.g., http://proxy:8080) |
--timeout |
HTTP timeout (seconds) |
The BitSight CLI is organized into two planes:
configβ configuration managementdbβ database initialization / maintenanceingestβ API β database ingestion
showβ query data already in the database (planned/next)statsβ summarize database contents (planned/next)healthβ connection + schema + ingestion status checks (planned/next)
show/stats/healthare part of the agreed taxonomy and are wired after the control plane is complete.
| Command | Purpose |
|---|---|
bitsight-cli config init |
Create initial config state |
bitsight-cli config show |
Display current config |
bitsight-cli config validate |
Validate config + connectivity |
bitsight-cli config reset |
Reset config to defaults |
bitsight-cli config clear-keys |
Clear stored secrets/keys |
bitsight-cli config set ... |
Set config fields |
config set flags:
--api-key--base-url--proxy-url--proxy-username--proxy-password--timeout
bitsight-cli db init --mssql --server <server> --database <db> --username <user> --password <pass> --schema-path db/schema/mssql.sql# Flush one table
bitsight-cli db flush --mssql --server <server> --database <db> --username <user> --password <pass> --table bitsight_users
# Flush all BitSight tables
bitsight-cli db flush --mssql --server <server> --database <db> --username <user> --password <pass> --allbitsight-cli db statusEach ingest command maps to a BitSight API endpoint and writes results into its corresponding MSSQL table(s).
bitsight-cli ingest usersbitsight-cli ingest user-details --user-guid <guid>bitsight-cli ingest user-quotabitsight-cli ingest user-company-views
bitsight-cli ingest companiesbitsight-cli ingest company-details --company-guid <guid>
bitsight-cli ingest portfoliobitsight-cli ingest portfolio-details --company-guid <guid>bitsight-cli ingest portfolio-contactsbitsight-cli ingest portfolio-public-disclosures
bitsight-cli ingest current-ratingsbitsight-cli ingest current-ratings-v2bitsight-cli ingest ratings-history --company-guid <guid> --since <date> [--backfill]
bitsight-cli ingest findings --company-guid <guid> --since <date> [--expand <value>]bitsight-cli ingest observations --company-guid <guid> --since <date>
bitsight-cli ingest threats- bitsight-cli ingest threat-exposures`
bitsight-cli ingest alerts --since <date>
bitsight-cli ingest credential-leaksbitsight-cli ingest exposed-credentials
Grouped ingestion runs multiple ingestion commands in sequence:
bitsight-cli ingest-group corebitsight-cli ingest-group securitybitsight-cli ingest-group all
(These groupings are explicitly wired.)
BitSight_SDK_CLI/
βββ cli.py
βββ core/
β βββ ingestion.py
β βββ status_codes.py
β βββ exit_codes.py
β βββ config.py
β βββ db_router.py
β βββ database_interface.py
βββ db/
β βββ init.py
β βββ mssql.py
β βββ schema/
β βββ mssql.sql
βββ ingest/
β βββ alerts.py
β βββ asset_risk_matrix.py
β βββ asset_summaries.py
β βββ assets.py
β βββ base.py
β βββ client_access_links.py
β βββ companies.py
β βββ company_details.py
β βββ company_findings_summary.py
β βββ company_infrastructure.py
β βββ company_overview_report.py
β βββ company_products.py
β βββ company_products_post.py
β βββ company_relationships.py
β βββ company_requests.py
β βββ current_ratings.py
β βββ current_ratings_v2.py
β βββ findings.py
β βββ findings_statistics.py
β βββ observations.py
β βββ portfolio.py
β βββ ratings_history.py
β βββ threats.py
β βββ threat_statistics.py
β βββ threats_impact.py
β βββ threats_evidence.py
β βββ user_company_views.py
β βββ user_details.py
β βββ users.py
β βββ users_quota.py
MSSQL schema file:
db/schema/mssql.sql
Tables store raw_payload as NVARCHAR(MAX) to preserve the full API response alongside typed columns.
- Bitsight API Documentation: https://help.bitsighttech.com/hc/en-us/articles/231872628-API-Documentation-Overview
#MIT License
#Copyright (c) 2025 Mark Teicher
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.