• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
BRNDR

BRNDR

Stuff, things and computers.

  • Blog
  • About
  • Tools

secrets

Finding AWS CLI Secrets in Environment Variables

June 15, 2022 by BRNDR Leave a Comment

While doing a bit of playing around with Hashicorp’s Terraform tutorial, I realized that I was being led to store secrets used to access my AWS account as a local environment variable.

My first question is how to retrieve them because if I can, so can anyone else who gains access to your machine. This doesn’t require admin access to retrieve. How many devs are storing their production keys as a local env variable? You could leverage your EDR solution or create a PowerShell script to test for their existence.

This script will let you return the secrets using a simple one-liner in PowerShell.

There has to be a better way, stay tuned for a future post.

Resource: https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html

Filed Under: Uncategorized Tagged With: aws, cli, secrets, terraform

Primary Sidebar

Recent Posts

  • Finding AWS CLI Secrets in Environment Variables
  • Going Down the MalDoc Rabbit Hole – Part 2
  • Going Down the MalDoc Rabbit Hole – Part 1

Archives

  • June 2022
  • January 2022
  • November 2021

Categories

  • Maldocs
  • Uncategorized
  • GitHub

Copyright © 2025 - BRNDR