Why it matters
Environment variables are shown in the console and returned by the read API to anyone allowed to view the function, so the secret is not confined to the code that needs it.
How to fix it
Move the value to a secret manager and reference it from the function.
What TrustIvan reads
- Amazon Web Services: the collector reads what this check needs, so it passes or fails.
- Microsoft Azure: the collector does not read this yet, so the check reports not assessed, never a pass.
- Google Cloud: the collector reads what this check needs, so it passes or fails.
Cloud accounts are read with read-only access. These results describe configuration; they are not an attestation that a benchmark is met. The access to grant: Amazon Web Services, Microsoft Azure, Google Cloud.
Benchmark controls
- CIS Google Cloud Platform Foundation Benchmark 3.0.0, control
1.17: Function secrets are not kept in environment variables - CIS Microsoft Azure Foundations Benchmark 2.1.0, control
9.10: Key Vault stores app secrets
Control numbers are the published ones; the titles are TrustIvan's own short descriptions. The benchmarks belong to their publishers, who do not endorse TrustIvan.
Related checks
- The function's deployment package contains a credential
AWSSeverity: High
cloud.function.secret-in-code - The function has a URL anyone can invoke
AWS, Azure, Google CloudSeverity: High
cloud.function.public-url - The function app accepts TLS below 1.2
AzureSeverity: Medium
cloud.function.outdated-tls - The function accepts plain HTTP
Azure, Google CloudSeverity: Medium
cloud.function.http-allowed - The function runs on a deprecated runtime
AWS, Azure, Google CloudSeverity: Medium
cloud.function.deprecated-runtime - The function runs as an identity with administrative rights
AWS, Azure, Google CloudSeverity: High
cloud.function.admin-identity
Terms: CSPM (cloud security posture management), CIS Benchmarks, Least privilege
All cloud posture checks · The whole catalogue · How this works in TrustIvan · Documentation