Documentation
¶
Index ¶
- type ApplyResult
- type DuplicateCollapser
- type Finding
- type FindingKind
- type ObjectReport
- type Options
- type PreparedRecordQuery
- type PreparedRecordReader
- type ReferenceWriter
- type Report
- type ScopeReader
- type Service
- type Severity
- type StorageInspectRequest
- type StorageInspectResult
- type StorageProbe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyResult ¶
type DuplicateCollapser ¶
type Finding ¶
type Finding struct {
Kind FindingKind `json:"kind"`
Severity Severity `json:"severity"`
ObjectID string `json:"object_id"`
SHA256 string `json:"sha256,omitempty"`
Organization string `json:"organization,omitempty"`
Project string `json:"project,omitempty"`
CurrentAccessURLs []string `json:"current_access_urls,omitempty"`
ProposedCanonicalURL string `json:"proposed_canonical_url,omitempty"`
AutoFixable bool `json:"auto_fixable"`
Message string `json:"message,omitempty"`
}
type FindingKind ¶
type FindingKind string
const ( FindingLegacyAccessURLRemovable FindingKind = "legacy_access_url_removable" FindingLegacyAccessURLRewritable FindingKind = "legacy_access_url_rewritable" FindingNonCanonicalAccessURL FindingKind = "non_canonical_access_url" FindingMissingControlledAccess FindingKind = "missing_controlled_access" FindingDuplicateSHA256Sibling FindingKind = "duplicate_sha256_sibling" FindingStorageObjectMissing FindingKind = "storage_object_missing" FindingStorageProbeError FindingKind = "storage_probe_error" )
type ObjectReport ¶
type ObjectReport struct {
ObjectID string `json:"object_id"`
SHA256 string `json:"sha256,omitempty"`
Organization string `json:"organization,omitempty"`
Project string `json:"project,omitempty"`
CurrentAccessURLs []string `json:"current_access_urls,omitempty"`
ProposedCanonicalURL string `json:"proposed_canonical_url,omitempty"`
AutoFixable bool `json:"auto_fixable"`
Findings []Finding `json:"findings,omitempty"`
}
type PreparedRecordQuery ¶
type PreparedRecordReader ¶
type ReferenceWriter ¶
type Report ¶
type Report struct {
Organization string `json:"organization,omitempty"`
Project string `json:"project,omitempty"`
Scanned int `json:"scanned"`
Objects []ObjectReport `json:"objects,omitempty"`
}
func (Report) FindingCount ¶
type ScopeReader ¶
type ScopeReader interface {
ListCredentials(context.Context) ([]buckets.Credential, error)
ListScopes(context.Context, string) ([]buckets.Scope, error)
}
ScopeReader returns only S3 credentials and the scopes attached to each credential. The adapter performs any credential-id/bucket alias resolution.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(records PreparedRecordReader, writer ReferenceWriter, scopes ScopeReader, probe StorageProbe, collapser DuplicateCollapser) *Service
type StorageInspectRequest ¶
type StorageInspectResult ¶
type StorageInspectResult struct {
ObjectURL string
}
type StorageProbe ¶
type StorageProbe interface {
Inspect(context.Context, StorageInspectRequest) (StorageInspectResult, error)
}
Click to show internal directories.
Click to hide internal directories.