/aws-secrets-inspector:retrievefrom aws-secrets-inspector
Retrieves a single AWS Secrets Manager secret value to stdout or a restricted 0600-permission file. Enforces safety invariants: no findings cache writes, no value in run logs, and write-to path restricted to ~/.config/claude-grc/secrets/.
Ships in aws-secrets-inspector. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Retrieves a single AWS Secrets Manager secret value and returns it to stdout (default) or to a 0600-permission file under ~/.config/claude-grc/secrets/. This is the only path through the connector that produces a secret value; the inspector mode never reads SecretString or SecretBinary.
node "${CLAUDE_PLUGIN_ROOT}/scripts/collect.js" --retrieve=<secret-name> [options]
--retrieve=<name> — required; the secret's name or full ARN--version-stage=<stage> — AWSCURRENT (default), AWSPREVIOUS, or a custom stage label--version-id=<uuid> — alternative to --version-stage; explicit version UUID--write-to=<path> — write the JSON to a 0600-permission file at <path> (must resolve under ~/.config/claude-grc/secrets/); confirmation line is printed to stdout--region=<region> — region for the get-secret-value call; falls back to the first of --regions, then config.defaults.regions[0], then config.default_region, then AWS_DEFAULT_REGION / AWS_REGION, then us-east-1. Pass this when the secret lives in a region other than the one encoded in your AWS profile.--profile=<name> — override the configured AWS profile--quiet — no stderr progressStdout (default). A single line of JSON:
{"name":"prod-db","arn":"arn:aws:secretsmanager:us-east-1:123456789012:secret:prod-db-AbCdEf","version_id":"a1b2c3d4-...","version_stages":["AWSCURRENT"],"created_at":"2026-04-13T15:10:00Z","secret_string":"<value>"}
For binary secrets, secret_binary is set to the base64 string returned by AWS (text-safe on stdout); secret_string is absent.
File (--write-to). The same JSON is written to <path>, with the file created at mode 0600 and the parent directory at mode 0700. Stdout emits a confirmation:
aws-secrets-inspector:retrieve wrote 247 bytes to ~/.config/claude-grc/secrets/prod-db (sha256=...)
The confirmation does not include the secret value.
This connector enforces three invariants for retrieval runs:
main() and never reaches the cache-writing helpers.runs.log. The retrieval manifest records byte_size and sha256 of the artifact, not the value. Operators and auditors can verify which artifact was produced without storing the value.--write-to is restricted to ~/.config/claude-grc/secrets/. Any path that resolves outside that root — including ../ escapes and absolute paths like /etc/cron.d/evil — is rejected with exit 2 and a clear error. The parent directory is created with mode 0700; the destination file is created with mode 0600 (umask 077 enforced during the write).The retrieval manifest in runs.log looks like:
{"source":"aws-secrets-inspector","run_id":"20260620-...","mode":"retrieve","secret_name":"prod-db","version_id":"a1b2c3d4-...","version_stage":"AWSCURRENT","destination":"~/.config/claude-grc/secrets/prod-db","byte_size":247,"sha256":"...","exit_code":0}
0 success2 usage error (unknown flag, --write-to outside the permitted root)2 auth failure (credentials invalid or expired)2 access denied by IAM, KMS key policy, or the secret's resource policy3 rate-limited5 config missing — run setup6 secret not found in this account/region{
"Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow", "Action": ["secretsmanager:GetSecretValue"], "Resource": "<secret-arn-or-*>" },
{ "Effect": "Allow", "Action": ["kms:Decrypt"], "Resource": "<kms-key-arn>" }
]
}
For cross-account access, configure the standard AWS CLI profile chain in ~/.aws/config and pass --profile=<name> (this connector does NOT implement sts:AssumeRole itself).
# Default: AWSCURRENT to stdout
/aws-secrets-inspector:retrieve --retrieve=prod-db
# Explicit region when the secret lives outside your profile's region
/aws-secrets-inspector:retrieve --retrieve=prod-db --region=eu-west-1
# Previous version, captured into a 0600 file
/aws-secrets-inspector:retrieve --retrieve=prod-db --version-stage=AWSPREVIOUS \
--write-to=~/.config/claude-grc/secrets/prod-db-prev
# Use in a CI step: pipe the JSON into a jq extractor
/aws-secrets-inspector:retrieve --retrieve=prod-db --quiet | jq -r .secret_string
# Cross-account via the profile chain
/aws-secrets-inspector:retrieve --retrieve=prod-db --profile=audit-target
secret get replacementThis connector is a thin wrapper around aws secretsmanager get-secret-value. It adds two things the raw CLI does not:
runs.log, or stderr.--write-to that prevents the operator from accidentally writing the value to a world-readable file.Operators who prefer the raw aws CLI for ad-hoc work can use it directly. Operators who need a CI-friendly secret source should use /aws-secrets-inspector:retrieve so the audit trail is consistent.
What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/aws-secrets-inspector-expertUse when interpreting AWS Secrets Manager connector output, deciding between inspector and retrieve modes, drafting SCF-mapped controls for rotation / KMS / public-access / inactive-access findings, or troubleshooting an aws-secrets-inspector run.
/collectQuery AWS Secrets Manager for compliance-relevant configuration (rotation, KMS, resource policy, access patterns) and emit findings conforming to the v1 contract./setupVerify the aws-secrets-inspector connector's prerequisites and write its config. Idempotent.npx claudepluginhub grcengclub/claude-grc-engineering --plugin aws-secrets-inspectorOther plugins' skills for the same job