Documentation
¶
Index ¶
- Constants
- Variables
- func AZUREPolicy(permissions []string, policyName string) (string, error)
- func AlmostEqual(a, b float64) bool
- func Apply(target string, region string) error
- func Audit(dir string, output string, minSeverity Severity) error
- func AwsDataLookup(name string) []byte
- func AwsLookup(name string) []byte
- func AzureDataLookup(name string) []byte
- func AzureLookup(name string) []byte
- func Compare(directory string, arn string, init bool, strict bool, targetFile string, ...) (bool, error)
- func Contains(s []string, e string) bool
- func DeprecationMessage(provider, name string, isData bool) (msg string, ok bool)
- func EncryptPlaintext(plaintext string, publicKeyB64 string) ([]byte, error)
- func ExtractPartitionFromARN(arn string) (string, error)
- func FileExists(filename string) bool
- func FormatDeprecated(d []ProviderDeprecations, format string) (string, error)
- func GCPDataLookup(name string) []byte
- func GCPLookup(name string) []byte
- func GCPPolicy(permissions []string, policyName string, dirName string) (string, error)
- func GetAWSDataPermissions(result ResourceV2) ([]string, error)
- func GetAWSPermissions(result ResourceV2) ([]string, error)
- func GetAWSResourcePermissions(result ResourceV2) ([]string, error)
- func GetAZUREDataPermissions(result ResourceV2) ([]string, error)
- func GetAZUREPermissions(result ResourceV2) ([]string, error)
- func GetAZUREResourcePermissions(result ResourceV2) ([]string, error)
- func GetBlockAttributeValues(values map[string][]string, block *hclsyntax.Block) map[string][]string
- func GetBlockAttributes(attributes []string, block *hclsyntax.Block) []string
- func GetCallerPartition(ctx context.Context) (string, error)
- func GetEnv(key string) (*string, error)
- func GetGCPDataPermissions(result ResourceV2) ([]string, error)
- func GetGithubClient() (context.Context, *github.Client)
- func GetHCLType(resourceName string) string
- func GetModulePath(block *hclsyntax.Block) string
- func GetPermissionMap(raw []byte, attributes []string, attributeValues map[string][]string, ...) ([]string, error)
- func GetPublicKeyDetails(owner string, repository string) (string, string, error)
- func GetResourceBlocks(file string) (*hclsyntax.Body, error)
- func GetRuntimePermissions(raw []byte, attributes []string, resource string) ([]string, error)
- func GetTF(dirName string) ([]string, error)
- func GetTFFiles(dirName string) ([]string, error)
- func HasAWSDefaultTags(body *hclsyntax.Body) bool
- func Init(dirName string) (*string, []string, error)
- func InvokeGithubDispatchEvent(repository string, workflowFileName string, branch string) error
- func IsNonCommercialPartition(partition string) bool
- func IsTypeOK(mappings any) (map[string]any, error)
- func LocateTerraform() (string, error)
- func Make(directory string) (*string, error)
- func MakeAzure(directory string) (*string, error)
- func MakeDeletionSensitiveOutput(bag Sorted, dirName string) (string, error)
- func MakeGCP(directory string) (*string, error)
- func Minify(JSONOut string) string
- func RandSeq(n int) string
- func Readme(dirName string, output string, init bool, autoAppend bool, legacy bool) error
- func Remote(target string, repository string, region string) error
- func ReplaceSection(source string, middle string, autoadd bool) error
- func Repository(repository, destination, directory, output string, ...) error
- func ReturnLocalAddrFromSource(source string, listModules ModuleJson) string
- func Runtime(dirName string, outputType string, file *string, init bool, prov string) error
- func Scan(dirName string, outputType string, file *string, init bool, write bool, ...) error
- func SetRepoSecret(repository string, keyText string, keyName string) (*github.Response, error)
- func SplitHub(repository string) (string, string, error)
- func StringInSlice(a string, list []string) bool
- func Unique(s []string) []string
- func WarnDeletionSensitive(bag Sorted)
- func WarnEscalation(bag Sorted)
- func Watch(arn string, wait int) error
- func WriteOutput(outPolicy OutputPolicy, outputType string, scanPath string, outFile string) error
- func WriteTwoRoleOutput(bag Sorted, policyName string, dirName string) (string, error)
- type AwsOutput
- type DeletionRisk
- type DeletionSensitivePolicy
- type EnvVariableNotSetError
- type Finding
- type IAMBinding
- type ModuleJson
- type OutputPolicy
- type ParsedDir
- type Policy
- type PolicyDiff
- type ProviderDeprecations
- type Record
- type ResourceV2
- func DetectBackend(resource ResourceV2, block *hclsyntax.Block, resources []ResourceV2) []ResourceV2
- func GetLocalModules(block *hclsyntax.Block, dirName string, listModulesJson ModuleJson) ([]ResourceV2, error)
- func GetResources(file string, dirName string) ([]ResourceV2, error)
- func GetResourcesFromBody(temp *hclsyntax.Body, dirName string) ([]ResourceV2, error)
- type RuntimePermission
- type Severity
- type Sorted
- type SplitPolicy
- type SplitSet
- type Statement
- type ValidationResult
Constants ¶
const ( PartitionStandard = "aws" PartitionChina = "aws-cn" PartitionGovCloud = "aws-us-gov" )
AWS Partition constants
const (
ManifestSnapshotFilename = "modules.json"
)
Variables ¶
var Version = "999.999.999"
Version is set at build time via -ldflags.
Functions ¶
func AZUREPolicy ¶
AZUREPolicy creates an Azure role definition. permissions: slice of Azure permission strings in format "action:resource" Returns the policy definition as a string or an error if generation fails.
func AlmostEqual ¶ added in v0.2.96
func Audit ¶ added in v1.0.1
Audit walks dir for .tf files, dispatches IAM-relevant blocks to provider auditors, prints findings at or above minSeverity, and returns a non-nil error when any survive (so the CLI exits non-zero).
func AwsDataLookup ¶ added in v0.2.113
func AzureDataLookup ¶ added in v0.2.94
func AzureLookup ¶ added in v0.2.94
func Compare ¶
func Compare(directory string, arn string, init bool, strict bool, targetFile string, writeBaseline string) (bool, error)
Compare IAC codebase to AWS policy. targetFile, when non-empty, reads the baseline ("deployed") policy from that local file instead of calling the live AWS/GCP API — letting CI diff against a committed snapshot with no cloud credentials. writeBaseline, when non-empty, writes the freshly generated IaC policy to that path, to seed or refresh such a snapshot.
func DeprecationMessage ¶ added in v0.3.98
DeprecationMessage reports whether a given terraform resource or datasource is marked deprecated by its provider. ok is true when the provider's latest schema has flagged it; msg is the provider-supplied deprecation description (often "Deprecated: use X instead"), which may be empty even when ok is true if the provider didn't include one.
isData distinguishes a `data "foo" {}` block from a `resource "foo" {}` block: providers sometimes deprecate one without the other, so the caller must pass the correct kind.
func EncryptPlaintext ¶ added in v0.2.76
EncryptPlaintext standard encryption.
func ExtractPartitionFromARN ¶ added in v1.0.10
ExtractPartitionFromARN extracts the AWS partition from an ARN. ARN format: arn:partition:service:region:account-id:resource-type/resource-id Examples:
arn:aws:iam::123456789012:role/MyRole -> "aws" arn:aws-cn:iam::123456789012:role/MyRole -> "aws-cn" arn:aws-us-gov:iam::123456789012:role/MyRole -> "aws-us-gov"
func FileExists ¶ added in v0.2.76
FileExists looks for a file.
func FormatDeprecated ¶ added in v0.3.98
func FormatDeprecated(d []ProviderDeprecations, format string) (string, error)
FormatDeprecated renders the Deprecated() output. format is one of "text" (default, grep-friendly) or "json" (pretty-printed for downstream tooling). Unknown formats fall back to text rather than erroring — the CLI surface is informational, not strict.
Text format:
aws: aws_retired_thing (resource) — Deprecated: use aws_new_thing aws_old_data (data) — ... azurerm: ...
An empty result (nothing deprecated across all requested providers) returns a single-line notice rather than an empty string so users don't mistake success for "the command silently did nothing".
func GCPDataLookup ¶ added in v0.2.94
func GetAWSDataPermissions ¶
func GetAWSDataPermissions(result ResourceV2) ([]string, error)
GetAWSDataPermissions gets permissions required for datasources.
func GetAWSPermissions ¶
func GetAWSPermissions(result ResourceV2) ([]string, error)
GetAWSPermissions for AWS resources.
func GetAWSResourcePermissions ¶
func GetAWSResourcePermissions(result ResourceV2) ([]string, error)
GetAWSResourcePermissions looks up permissions required for resources.
func GetAZUREDataPermissions ¶
func GetAZUREDataPermissions(result ResourceV2) ([]string, error)
GetAZUREDataPermissions gets permissions required for datasources.
func GetAZUREPermissions ¶
func GetAZUREPermissions(result ResourceV2) ([]string, error)
GetAZUREPermissions for AZURE resources.
func GetAZUREResourcePermissions ¶
func GetAZUREResourcePermissions(result ResourceV2) ([]string, error)
GetAZUREResourcePermissions looks up permissions required for resources.
func GetBlockAttributeValues ¶ added in v1.0.14
func GetBlockAttributeValues(values map[string][]string, block *hclsyntax.Block) map[string][]string
GetBlockAttributeValues walks a block, including nested blocks, collecting the literal string-list values of its attributes, keyed by attribute name. This backs permission lookups that depend on an attribute's value rather than just its presence (e.g. azurerm_private_endpoint's subresource_names).
func GetBlockAttributes ¶
GetBlockAttributes walks through a blocks getting all blocks and attributes.
func GetCallerPartition ¶ added in v1.0.10
GetCallerPartition looks up the current caller identity's ARN via STS and extracts its AWS partition, so callers can detect non-commercial partitions (aws-cn, aws-us-gov) without hardcoding a region-to-partition mapping.
func GetGCPDataPermissions ¶
func GetGCPDataPermissions(result ResourceV2) ([]string, error)
GetGCPDataPermissions gets permissions required for datasources.
func GetGithubClient ¶ added in v0.2.76
GetGithubClient instantiate and return a client object for GitHub.
func GetModulePath ¶
GetModulePath extracts the source location from a module.
func GetPermissionMap ¶
func GetPermissionMap(raw []byte, attributes []string, attributeValues map[string][]string, resource string) ([]string, error)
GetPermissionMap Anonymous parsing.
func GetPublicKeyDetails ¶ added in v0.2.76
GetPublicKeyDetails obtains the public key of the owner.
func GetResourceBlocks ¶
GetResourceBlocks breaks down a file into resources.
func GetRuntimePermissions ¶ added in v0.3.86
GetRuntimePermissions extracts runtime permissions needed by service accounts from mapping files.
func GetTFFiles ¶ added in v0.2.76
GetTFFiles get tf files in directory.
func HasAWSDefaultTags ¶ added in v0.4.5
HasAWSDefaultTags reports whether any provider "aws" block in body declares a default_tags block, which causes the provider to tag every taggable resource even when the resource itself has no tags attribute.
func InvokeGithubDispatchEvent ¶
InvokeGithubDispatchEvent uses your GitHub api key (if sufficiently enabled) to invoke a GitHub action workflow.
func IsNonCommercialPartition ¶ added in v1.0.10
IsNonCommercialPartition checks if the partition is non-commercial
func LocateTerraform ¶
LocateTerraform finds the Terraform executable or installs it. The search and install logic lives in internal/tfinstall; this wrapper preserves the locateTerraformError type for callers that inspect it.
func MakeDeletionSensitiveOutput ¶ added in v1.0.14
MakeDeletionSensitiveOutput generates a three-role Terraform policy.
func ReplaceSection ¶
ReplaceSection find a section in a readme and replaces the section.
func Repository ¶ added in v0.2.108
func ReturnLocalAddrFromSource ¶ added in v0.3.59
func ReturnLocalAddrFromSource(source string, listModules ModuleJson) string
func Runtime ¶ added in v0.3.86
Runtime detects runtime IAM permissions needed by service accounts.
Only GCP is supported today. AWS/Azure providers are rejected with unsupportedRuntimeProviderError.
func Scan ¶
func Scan(dirName string, outputType string, file *string, init bool, write bool, enableResources bool, provider string, outFile string, policyName string, suppressDeprecated bool, legacy bool, strict bool, noLint bool, sensitive bool) error
Scan looks for resources in a given directory. noLint suppresses the escalation-class warning (and the strict check) entirely, for callers piping policy output who don't want lint noise on stderr. strict makes Scan return a non-zero-exit-worthy error when escalation-class permissions are present, mirroring Compare's --strict. sensitive outputs a three-role split: safe (no high-risk deletes), delete (break-glass), plan.
func SetRepoSecret ¶
SetRepoSecret sets an encrypted GitHub action secret.
func StringInSlice ¶ added in v0.2.76
StringInSlice looks for item in slice.
func WarnDeletionSensitive ¶ added in v1.0.14
func WarnDeletionSensitive(bag Sorted)
WarnDeletionSensitive prints warnings for high-risk destroy permissions.
func WarnEscalation ¶ added in v1.0.0
func WarnEscalation(bag Sorted)
WarnEscalation prints a warning to stderr when escalation-class permissions, or a dangerous combination of otherwise-unremarkable permissions, are present. It is always called; callers do not need an opt-in flag.
func WriteOutput ¶
func WriteOutput(outPolicy OutputPolicy, outputType string, scanPath string, outFile string) error
WriteOutput writes out the policy as JSON or Terraform.
Types ¶
type DeletionRisk ¶ added in v1.0.14
type DeletionRisk struct {
Level string // high, medium, low
Resource string // Terraform resource type
Reason string // Why this is deletion-sensitive
Protection string // Suggested protection mechanism
}
DeletionRisk describes the risk of destroying a resource.
type DeletionSensitivePolicy ¶ added in v1.0.14
type DeletionSensitivePolicy struct {
// Safe contains permissions that don't involve high-risk destruction.
Safe Sorted
// DeletionSensitive contains only the high-risk destroy permissions.
DeletionSensitive Sorted
// Risks contains metadata about why each permission is sensitive.
Risks deletionSensitiveSet
}
DeletionSensitivePolicy holds permissions split into safe and deletion-sensitive.
func ExtractDeletionSensitive ¶ added in v1.0.14
func ExtractDeletionSensitive(bag Sorted) DeletionSensitivePolicy
ExtractDeletionSensitive splits a permission bag into safe and deletion-sensitive.
type EnvVariableNotSetError ¶ added in v0.3.55
type EnvVariableNotSetError struct {
Key string
}
func (*EnvVariableNotSetError) Error ¶ added in v0.3.55
func (e *EnvVariableNotSetError) Error() string
type Finding ¶ added in v1.0.1
type Finding struct {
RuleID string `json:"rule_id"`
Severity Severity `json:"severity"`
Resource string `json:"resource"`
File string `json:"file"`
Line int `json:"line"`
Message string `json:"message"`
Detail string `json:"detail,omitempty"`
}
Finding is a single audit result tied to a source location.
func CollectAuditFindings ¶ added in v1.0.12
CollectAuditFindings runs the audit rules over the Terraform in dir and returns every finding, unfiltered and unsorted. It is the entry point for callers that embed pike as a library rather than invoking the CLI.
holden consumes this alongside MakePermissionBag: it needs pike's IAM judgements — in particular whether a Condition genuinely scopes an escalation-class action, which its own policy language cannot express — as data it can attach to its graph. Without an exported collector the only way to get at them is to capture Audit's stdout.
Severity filtering, ordering and rendering belong to Audit, so an embedder can apply its own.
type IAMBinding ¶ added in v0.3.86
type IAMBinding struct {
ResourceType string // e.g., "google_project_iam_member"
ResourceName string // e.g., "app_secrets"
Role string // e.g., "roles/secretmanager.secretAccessor"
Member string // e.g., "serviceAccount:app@project.iam" or reference like "${google_service_account.app.email}"
}
IAMBinding represents an IAM binding found in Terraform.
func ExtractIAMBindings ¶ added in v0.3.86
func ExtractIAMBindings(body *hclsyntax.Body) []IAMBinding
ExtractIAMBindings extracts IAM binding resources from parsed HCL blocks.
type ModuleJson ¶ added in v0.3.59
func GetModuleJson ¶ added in v0.3.59
func GetModuleJson(dir string) (ModuleJson, error)
func ReadModuleJson ¶ added in v0.3.59
func ReadModuleJson(r io.Reader) (ModuleJson, error)
func ReadModuleJsonForDir ¶ added in v0.3.59
func ReadModuleJsonForDir(dir string) (ModuleJson, error)
type OutputPolicy ¶
type OutputPolicy struct {
AWS AwsOutput
GCP string
AZURE string
RuntimeGCP string
// Plan-role output (read-only permissions for terraform plan).
PlanAWS AwsOutput
PlanGCP string
PlanAZURE string
// TwoRoleAZURE is the combined apply+plan render for Azure stdout. The
// single-role template carries locals/data boilerplate that cannot be
// concatenated, so Azure two-role output is rendered as one chunk.
TwoRoleAZURE string
}
OutputPolicy is the main output type.
func GetPolicy ¶
func GetPolicy(actions Sorted, resources bool, policyName string, dirName string) (OutputPolicy, error)
GetPolicy creates new iam polices from a list of Permissions.
func MakePolicy ¶
func MakePolicy(dirName string, file *string, init bool, enableResources bool, provider string, policyName string, suppressDeprecated bool) (OutputPolicy, error)
MakePolicy does the guts of determining a policy from code.
func (OutputPolicy) AsString ¶
func (out OutputPolicy) AsString(format string) string
AsString converts an object into string (legacy single-role output).
func (OutputPolicy) AsTwoRoleString ¶ added in v1.0.0
func (out OutputPolicy) AsTwoRoleString(format string) string
AsTwoRoleString renders both the apply role and the plan role. For Terraform: two policy/role resource blocks. For JSON: {"apply": ..., "plan": ...} structure.
type ParsedDir ¶ added in v1.0.14
type ParsedDir struct {
// Dir is the directory the files belong to. It is used to find
// .terraform/modules, resolve local module sources and make audit paths
// relative.
Dir string
// Files lists the file paths in a stable order.
Files []string
// Bodies holds the parsed body of every file that parsed successfully.
Bodies map[string]*hclsyntax.Body
// Errors holds the read or parse error of every file that failed.
Errors map[string]error
}
ParsedDir is a set of Terraform files that have already been read and parsed. Embedders that hold the file contents (or want to run both the permission scan and the audit over one directory) build one of these once and reuse it, so each file is read and parsed a single time.
func ParseDir ¶ added in v1.0.14
ParseDir finds the .tf files in dir (including downloaded modules) and reads and parses each of them once.
func ParseSources ¶ added in v1.0.14
ParseSources parses file contents the caller has already read. sources maps a file path to its bytes; nothing is read from disk. dir is the directory the paths are relative to.
func (*ParsedDir) Analyse ¶ added in v1.0.14
Analyse runs the permission scan and the audit over one parse of the directory, so callers that need both do not walk and parse it twice.
func (*ParsedDir) AuditFindings ¶ added in v1.0.14
AuditFindings runs the audit rules over the parsed Terraform. It is the equivalent of CollectAuditFindings without re-reading the files. Files that failed to parse are skipped.
func (*ParsedDir) PermissionBag ¶ added in v1.0.14
PermissionBag returns the IAM permissions the parsed Terraform needs. It is the equivalent of MakePermissionBag without any file I/O for the parsed files. provider may be empty for all providers.
type PolicyDiff ¶ added in v0.3.18
type ProviderDeprecations ¶ added in v0.3.98
type ProviderDeprecations struct {
Provider string `json:"provider"`
ProviderVersion string `json:"providerVersion,omitempty"`
Resources map[string]string `json:"resources,omitempty"`
DataSources map[string]string `json:"dataSources,omitempty"`
}
ProviderDeprecations is the serialisable shape returned by Deprecated(). Kinds are split because the same name can appear as both a resource and a datasource in the same provider, and conflating them loses detail.
func Deprecated ¶ added in v0.3.98
func Deprecated(provider string) []ProviderDeprecations
Deprecated returns the known-deprecated resources/datasources for one provider (aws/azurerm/google, with gcp/azure aliases accepted) or for all supported providers when called with the empty string. Providers with nothing deprecated are omitted from the result so callers can cleanly skip over them.
This is the data source for the `pike deprecated` CLI. It reads from the same lazily-cached store that scan-time warnings use, so running `pike deprecated` after a scan is free.
type Record ¶ added in v0.3.59
type Record struct {
Key string `json:"Key"`
SourceAddr string `json:"Source"`
Version *version.Version `json:"-"`
VersionStr string `json:"Version,omitempty"`
Dir string `json:"Dir"`
}
Record represents some metadata about an installed module, as part of a module JSON.
type ResourceV2 ¶
type ResourceV2 struct {
TypeName string
Name string
ResourceName string
Provider string
Attributes []string
ServiceAccount string // The service account this resource uses (if any)
// AttributeValues holds the literal string-list values of attributes, keyed
// by attribute name, for permission lookups that depend on a value rather
// than just presence (e.g. azurerm_private_endpoint's subresource_names).
AttributeValues map[string][]string
}
ResourceV2 is what resources get parsed into.
func DetectBackend ¶ added in v0.2.65
func DetectBackend(resource ResourceV2, block *hclsyntax.Block, resources []ResourceV2) []ResourceV2
DetectBackend handles permissions for backend blocks.
func GetLocalModules ¶ added in v0.2.76
func GetLocalModules(block *hclsyntax.Block, dirName string, listModulesJson ModuleJson) ([]ResourceV2, error)
GetLocalModules return resource from a path.
func GetResources ¶
func GetResources(file string, dirName string) ([]ResourceV2, error)
GetResources retrieves all the resources in a tf file.
func GetResourcesFromBody ¶ added in v1.0.14
func GetResourcesFromBody(temp *hclsyntax.Body, dirName string) ([]ResourceV2, error)
GetResourcesFromBody retrieves all the resources from an already parsed tf file body, so callers that hold the parse result avoid re-reading the file.
type RuntimePermission ¶ added in v0.3.86
type RuntimePermission struct {
ResourceType string // e.g., "google_cloud_run_v2_service"
ResourceName string // e.g., "app" (from resource "type" "name")
ServiceAccount string // e.g., "my-sa@project.iam" or "default"
Permissions []string // e.g., ["secretmanager.versions.access"]
}
RuntimePermission tracks which resource needs which runtime permissions.
type Severity ¶ added in v1.0.1
type Severity int
Severity ranks audit findings.
func ParseSeverity ¶ added in v1.0.1
ParseSeverity maps a name (case-insensitive) to a Severity; unknown names default to SevLow so a typo doesn't silently suppress everything.
func (Severity) MarshalJSON ¶ added in v1.0.1
MarshalJSON renders severity as its name.
type Sorted ¶
type Sorted struct {
AWS []string
GCP []string
AZURE []string
// Plan-only (read-side) permissions for the planner SA role.
PlanAWS []string
PlanGCP []string
PlanAZURE []string
// Runtime permissions needed by service accounts
RuntimeGCP []RuntimePermission
RuntimeAWS []RuntimePermission
RuntimeAZURE []RuntimePermission
// Existing IAM bindings from Terraform code
IAMBindings []IAMBinding
}
Sorted is to help split out permission to the relevant auth.
func GetPermission ¶
func GetPermission(result ResourceV2) (Sorted, error)
GetPermission determines the IAM permissions required and returns a list of permission.
func GetPermissionBag ¶ added in v0.3.52
func GetPermissionBag(resources []ResourceV2, prov string, suppressDeprecated bool) Sorted
func MakePermissionBag ¶ added in v0.3.55
func MakePermissionBag(dirName string, file *string, init bool, provider string, suppressDeprecated bool) (Sorted, error)
MakePermissionBag returns the full set of IAM permissions required to deploy the Terraform in dirName (or a single file). Pass init=false for static analysis without running terraform init.
type SplitPolicy ¶ added in v1.0.0
type SplitPolicy struct {
AWS *SplitSet `json:"aws,omitempty"`
GCP *SplitSet `json:"gcp,omitempty"`
AZURE *SplitSet `json:"azure,omitempty"`
}
SplitPolicy is the output of --output split: each present provider has its permissions divided into base (safe) and escalation-class subsets.
func MakeSplitPolicy ¶ added in v1.0.0
func MakeSplitPolicy(bag Sorted) SplitPolicy
MakeSplitPolicy partitions a permission bag into base and escalation-class subsets per provider, for use with --output split.
func (SplitPolicy) String ¶ added in v1.0.0
func (s SplitPolicy) String() string
String renders the split policy as indented JSON.
type SplitSet ¶ added in v1.0.0
SplitSet holds a provider's permissions partitioned into base and escalation-class subsets.
type Statement ¶
type Statement struct {
Sid string `json:"Sid"`
Effect string `json:"Effect"`
Action []string `json:"Action"`
Resource []string `json:"Resource"`
}
Statement is the core of an IAM policy.
type ValidationResult ¶ added in v0.3.86
type ValidationResult struct {
ResourceType string
ResourceName string
ServiceAccount string
Role string
Permissions []string
Status string // "configured", "missing", "partial"
ExistingMember string // If configured, what member string is used
}
ValidationResult tracks the status of an IAM binding requirement.
Source Files
¶
- audit.go
- audit_aws.go
- audit_azure.go
- audit_gcp.go
- aws.go
- aws_datasource.go
- azure.go
- azure_datasource.go
- azure_policy.go
- compare.go
- credentials.go
- data.go
- deletion_sensitive.go
- deprecation.go
- error.go
- escalation.go
- gcp.go
- gcp_datasource.go
- gcp_policy.go
- gitHub.go
- inspect.go
- make.go
- mappingfs.go
- modules.go
- output.go
- parsed.go
- partition.go
- plan.go
- policy.go
- readme.go
- repository.go
- runtime_gcp.go
- scan.go
- secrets.go
- two_role.go
- types.go
- utils.go
- version.go
- watch.go