Turbot Guardrails Hub 
Hub
  • Mods
  • Policy Packs
  • Docs
  • Home
ModsPolicy PacksDocsHome
Mods
GCP
Loading policies...

Policy: GCP > CIS v5.0 > 1 - Identity and Access Management > 1.18 - Ensure Secrets are Not Stored in Cloud Functions Environment Variables by Using Secret Manager > Attestation

By setting this policy, you attest that you have manually verified that it complies with the relevant section of the CIS Benchmark.

Determine if confidential information is stored in your functions in cleartext

For each function, review its build and runtime environment variables (the Variables tab in the Cloud Functions console, or gcloud functions describe <function_name>; buildConfig.environmentVariables and serviceConfig.environmentVariables in the Cloud Functions v2 API) and determine whether any of them hold data that should not be publicly accessible, such as passwords, tokens or keys. Secrets should be referenced through Secret Manager instead (serviceConfig.secretEnvironmentVariables or serviceConfig.secretVolumes).

Determine if the Secret Manager API is enabled for your project

Run gcloud services list within the project and check that the Secret Manager API (secretmanager.googleapis.com) is in the list.

Once verified, enter the date that this attestation expires. Note that the date can not be further in the future than is specified in GCP > CIS v5.0 > 1 - Identity and Access Management > Maximum Attestation Duration, which by default follows GCP > CIS v5.0 > Maximum Attestation Duration. Set to a blank value to clear the attestation.

Targets

This policy targets the following resource types:

  • GCP > Functions > Function

Primary Policy

This policy is used with the following primary policy:

  • GCP > CIS v5.0 > 1 - Identity and Access Management > 1.18 - Ensure Secrets are Not Stored in Cloud Functions Environment Variables by Using Secret Manager

Controls

Setting this policy configures this control:

  • GCP > CIS v5.0 > 1 - Identity and Access Management > 1.18 - Ensure Secrets are Not Stored in Cloud Functions Environment Variables by Using Secret Manager

Policy Specification

Schema Type
string

Category

  • CIS > Controls v7 > 16 Account Monitoring and Control > 16.02 Configure Centralized Point of Authentication

In Your Workspace

  • Policy Settings by Type report

Developers

    Category URI
    • tmod:@turbot/cis#/control/categories/v071602
  • Policy Type URI
    • tmod:@turbot/gcp-cisv5-0#/policy/types/r0118Attestation
  • GraphQL
    • query policyType(id: "tmod:@turbot/gcp-cisv5-0#/policy/types/r0118Attestation") { … }
    • query policySettings(filter: "policyTypeId:'tmod:@turbot/gcp-cisv5-0#/policy/types/r0118Attestation'") { … }
    • query policyValues(filter: "policyTypeId:'tmod:@turbot/gcp-cisv5-0#/policy/types/r0118Attestation'") { … }
  • CLI
    • Get Policy Type
    • turbot graphql policy-type --id "tmod:@turbot/gcp-cisv5-0#/policy/types/r0118Attestation"
    • Get Policy Settings
    • turbot graphql policy-settings --filter "policyTypeId:tmod:@turbot/gcp-cisv5-0#/policy/types/r0118Attestation"
Guardrails
Guardrails Hub
  • Hub
  • Docs
  • Blog
  • Changelog
Products
  • GuardrailsGuardrails
  • PipesPipes
  • SteampipeSteampipe
  • PowerpipePowerpipe
  • FlowpipeFlowpipe
  • TailpipeTailpipe
Turbot
  • Home
  • About us
  • We're hiring!
  • Contact us
Community

Our community of practitioners love to discuss cloud governance & security.

Slack logoJoin us on Slack →

System StatusLegalSecurity
Terms of UseSecurityPrivacy
42
Mods
158
Resource Types
2,654
Policies
1,319
Controls
131
Quick Actions
93
IAM