-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathconfig.go
More file actions
39 lines (34 loc) · 1.4 KB
/
config.go
File metadata and controls
39 lines (34 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright Mondoo, Inc. 2024, 2026
// SPDX-License-Identifier: BUSL-1.1
package config
import (
"go.mondoo.com/mql/v13/providers-sdk/v1/plugin"
"go.mondoo.com/mql/v13/providers/ipinfo/provider"
)
var Config = plugin.Provider{
Name: "ipinfo",
ID: "go.mondoo.com/cnquery/providers/ipinfo",
Version: "13.0.4",
ConnectionTypes: []string{provider.DefaultConnectionType},
Connectors: []plugin.Connector{
{
Name: "ipinfo",
Use: "ipinfo",
Short: "Query ipinfo.io for IP address information",
Long: `Use the ipinfo provider to query IP address information from ipinfo.io, including the IP address, hostname, and whether the IP address is a bogon.
Examples:
cnspec shell ipinfo
cnspec run ipinfo -c "ipinfo(ip('8.8.8.8')){*}"
cnspec run ipinfo -c "ipinfo(){*}" # Query your public IP"
cnspec run -c "network.interfaces.map(ips.map(_.ip)).flat.map(ipinfo(_){*})"
Notes:
- Pass an IP address to query information about that specific IP: ipinfo(ip("1.1.1.1"))
- Pass no arguments (empty IP) to query your machine's public IP: ipinfo()
- The bogon field indicates whether the returned IP is a private, link-local, or otherwise non-routable address. When bogon is true, the returned IP is the same as the requested IP.
- Set IPINFO_TOKEN environment variable to use the authenticated ipinfo.io API.
`,
Discovery: []string{},
Flags: []plugin.Flag{},
},
},
}