Class: Infrawrench::PostureNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.posture

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ PostureNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of PostureNamespace.

Parameters:



4648
4649
4650
4651
# File 'lib/infrawrench/client.rb', line 4648

def initialize(transport)
  @transport = transport
  @settings = PostureSettingsNamespace.new(@transport)
end

Instance Attribute Details

#settingsPostureSettingsNamespace (readonly)

Returns client.posture.settings.

Returns:



4644
4645
4646
# File 'lib/infrawrench/client.rb', line 4644

def settings
  @settings
end

Instance Method Details

#get(org_id: nil, request_options: nil) ⇒ Hash

List security posture findings on synced resources

Plugin-declared security checks evaluated over already-synced resource state: public buckets, 0.0.0.0/0 ingress rules, unencrypted disks, publicly reachable database endpoints, stale credentials, missing deletion/backup protection. No provider API calls are made and results reflect the last sync. Findings are sorted worst severity first, with per-severity counts.

Requires permission: resources:read.

GET /api/org/orgId/posture

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as PostureListResponse — see sig/infrawrench/sdk.rbs.

Raises:



4672
4673
4674
4675
4676
4677
4678
4679
# File 'lib/infrawrench/client.rb', line 4672

def get(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/posture",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end