The plugin configuration supports the following optional settings:

Optional Field: Scan Paths

  • scanPaths (string): Comma-separated paths to scan (optional)
    • If provided: Scans only the specified paths
    • If empty/omitted: Auto-discovers common certificate locations on the target system

Auto-Discovery Behavior:

When scanPaths is not provided, the plugin automatically detects and scans common certificate storage locations:

/etc/ssl              # Debian/Ubuntu SSL certificates
/etc/pki              # RedHat/CentOS PKI infrastructure  
/opt                  # Optional software packages
/var/lib              # Variable state information
/home                 # User home directories
/srv                  # Service data
/usr/share/ca-certificates       # CA certificates (Debian/Ubuntu)
/usr/local/share/ca-certificates # Local CA certificates

The plugin checks each location for existence and accessibility before scanning. If no paths are accessible, it falls back to the user's home directory (/home/{username}).

Usage

Plugin Commands

The plugin supports these CLI commands: info, schema, uischema, test, and scan.

1. Get Plugin Information

./filesystem-scanner-plugin info

Returns plugin name, version, and contact information.

2. Get Configuration Schema

./filesystem-scanner-plugin schema

Returns JSON schema for configuration - use this to validate your configuration format.

3. Get UI Schema

./filesystem-scanner-plugin uischema

Returns UI layout schema for web form rendering.

4. Test SSH Connectivity

cat config.json | ./filesystem-scanner-plugin test

Verifies SSH connectivity using a two-step flow: first call captures and presents the host key fingerprint for user confirmation; second call (with confirmation) validates credentials and scan paths.

Step 1 — Capture host key:

cat <<'EOF' | ./filesystem-scanner-plugin test
{
  "config": {
    "hostAddress": "10.1.127.33",
    "port": "22",
    "username": "admin",
    "password": "your-password",
    "maxDepth": "8"
  }
}
EOF

Returns a confirmation request with the server's host key fingerprint:

{
  "result_type": "test",
  "plugin_id": "filesystem-scanner-plugin",
  "plugin_version": "1.1.0",
  "data": {
    "test_status": "REQUIRES_CONFIRMATION",
    "confirmation_id": "warnHostKey",
    "template_data": {
      "key": "SHA256:abc123...",
      "host_key": "AAAAB3NzaC1yc2E..."
    }
  }
}

Step 2 — Confirm host key (trust and continue):

cat <<'EOF' | ./filesystem-scanner-plugin test
{
  "config": {
    "hostAddress": "10.1.127.33",
    "port": "22",
    "username": "admin",
    "password": "your-password",
    "maxDepth": "8",
    "_testConfirmation": {
      "confirmation_id": "warnHostKey",
      "choice": "yes",
      "template_data": {
        "host_key": "AAAAB3NzaC1yc2E..."
      }
    }
  }
}
EOF

On success, returns:

{
  "result_type": "test",
  "plugin_id": "filesystem-scanner-plugin",
  "plugin_version": "1.1.0",
  "data": { "test_status": "COMPLETE" }
}

To cancel, set "choice": "no" — the plugin returns "test_status": "FAILED".

5. Run Full Scan

cat config.json | ./filesystem-scanner-plugin scan

Discovers all cryptographic assets on the remote host.

Example:

cat <<'EOF' | ./filesystem-scanner-plugin scan
{
  "config": {
    "hostAddress": "10.1.127.33",
    "port": "22",
    "username": "admin",
    "password": "your-password",
    "scanPaths": "/etc/ssl,/opt",
    "maxDepth": "8"
  }
}
EOF

Outputs results in JSONL format (one JSON object per line):

{"result_type":"scan","plugin_id":"filesystem-scanner-plugin","plugin_version":"1.1.0","data":{"type":"cert","timestamp":"2026-03-05T14:30:45+05:30","urn":"urn:cert:sha256:abcd1234...","url":"ssh://admin@10.1.127.33:22/etc/ssl/certs/server.crt","extra":{...},"cert_pem":"-----BEGIN CERTIFICATE-----\nMIID..."}}
{"result_type":"scan","plugin_id":"filesystem-scanner-plugin","plugin_version":"1.1.0","data":{"type":"privkey","timestamp":"2026-03-05T14:30:46+05:30","urn":"urn:privkey:name:id_rsa:a1b2c3d4e5f6g7h8","url":"ssh://admin@10.1.127.33:22/root/.ssh/id_rsa","extra":{...}}}