steampipe plugin install urlscan

urlscan.io + Steampipe

urlscan.io is a website scanner to gather request, cookie, link, headers and other information from a URL.

Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

Search website scans:

select
id,
page_url,
task_time
from
urlscan_search
where
query = 'steampipe.io'
+--------------------------------------+---------------------------+---------------------+
| id | page_url | task_time |
+--------------------------------------+---------------------------+---------------------+
| a20397de-1f23-4821-ae2a-87ca612ebcff | https://steampipe.io/ | 2021-05-06 01:39:14 |
| 698e6270-cd8f-4090-a3ae-23bb5d3ee0a8 | https://steampipe.io/ | 2020-12-15 19:44:10 |
| d01fa12c-f30f-48b8-af7e-5539f0d1bc3c | https://hub.steampipe.io/ | 2020-12-04 11:44:02 |
+--------------------------------------+---------------------------+---------------------+

Query URL information from a scan:

select
subject_name,
issuer,
valid_to
from
urlscan_certificate
where
-- vercel.com
scan = '54c78f69-5294-4a17-8ae0-a71943954e09'
+-------------------------------+--------------------------------------------+---------------------+
| subject_name | issuer | valid_to |
+-------------------------------+--------------------------------------------+---------------------+
| *.vercel.com | R3 | 2021-06-15 03:05:04 |
| vercel-insights.com | Amazon | 2021-12-22 23:59:59 |
| *.google.com | GTS CA 1O1 | 2021-07-06 10:11:14 |
| ... | ... | ... |
+-------------------------------+--------------------------------------------+---------------------+

Documentation

Get started

Install

Download and install the latest urlscan.io plugin:

steampipe plugin install urlscan

Credentials

ItemDescription
Credentialsurlscan.io requires a free API key for all requests.
RadiusEach connection represents a single urlscan.io account.

Configuration

Installing the latest urlscan plugin will create a config file (~/.steampipe/config/urlscan.spc) with a single connection named urlscan:

connection "urlscan" {
plugin = "urlscan"
api_key = "e89d13c7-43a0-4f48-a829-590b4091bac6"
}
  • api_key - Your urlscan.io API key.

Postgres FDW

This plugin is available as a native Postgres FDW. Unlike Steampipe CLI, which ships with an embedded Postgres server instance, the Postgres FDW can be installed in any supported Postgres database version.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_postgres_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/postgres.sh)" -- urlscan

The installer will prompt you for the plugin name and version, download and install the appropriate files for your OS, system architecture, and Postgres version.

To configure the Postgres FDW, you will create an extension, foreign server, and schema and import the foreign schema.

CREATE EXTENSION IF NOT EXISTS steampipe_postgres_urlscan;
CREATE SERVER steampipe_urlscan FOREIGN DATA WRAPPER steampipe_postgres_urlscan OPTIONS (config '<your_config>');
CREATE SCHEMA urlscan;
IMPORT FOREIGN SCHEMA urlscan FROM SERVER steampipe_urlscan INTO urlscan;

SQLite Extension

This plugin is available as a SQLite Extension, making the tables available as SQLite virtual tables.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_sqlite_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/sqlite.sh)" -- urlscan

The installer will prompt you for the plugin name, version, and destination directory. It will then determine the OS and system architecture, and it will download and install the appropriate package.

To configure the SQLite extension, load the extension module and then run the steampipe_configure_urlscan function to configure it with plugin-specific options.

$ sqlite3
sqlite> .load ./steampipe_sqlite_extension_urlscan.so
sqlite> select steampipe_configure_urlscan('<your_config>');

Export

This plugin is available as a standalone Export CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- urlscan

You can pass the configuration to the command with the --config argument:

steampipe_export_urlscan --config '<your_config>' <table_name>