Skip to content

[REVIEW] secrets-management: add AWS STS temporary credential coverage #163

@GiazaiGia

Description

@GiazaiGia

Skill Being Reviewed

Skill name: secrets-management
Skill path: skills/devsecops/secrets-management/

False Positive Analysis

Benign code that should not be treated as an active leaked AWS credential:

env:
  AWS_ACCESS_KEY_ID: "ASIA<temporary-access-key-placeholder>"
  AWS_SECRET_ACCESS_KEY: "<redacted-temporary-secret>"
  AWS_SESSION_TOKEN: "<redacted-session-token>"

Why this is a false positive risk:

Temporary credential examples, redacted values, and documented placeholders should not be counted as active leaked credentials. However, the current skill only documents AKIA* as an AWS access key prefix, so reviewers may overfit on long-lived keys and lack guidance for distinguishing real ASIA* STS credentials from placeholder training examples. The skill should make ASIA* reportable when real, while preserving its existing placeholder and entropy checks.

Coverage Gaps

Missed variant 1: AWS STS temporary access key is leaked in CI logs or artifacts

AWS_ACCESS_KEY_ID=ASIA****************
AWS_SECRET_ACCESS_KEY=<40-character secret>
AWS_SESSION_TOKEN=<long base64-like session token>

Why it should be caught:

AWS STS access keys use the ASIA prefix rather than AKIA. A leaked STS tuple is usable until it expires and may reveal that CI logs, build artifacts, screenshots, or support bundles are exposing credentials. The current sample patterns only call out AKIA, so a reviewer following the skill literally can miss temporary AWS credentials.

Missed variant 2: session token is leaked without the access key in nearby text

aws_session_token=<long base64-like session token>

Why it should be caught:

The session token is part of the credential tuple for temporary AWS credentials. Even if the access key or secret key is elsewhere in the same artifact, a leaked session token is still sensitive evidence and should be recorded as a secret exposure without printing the value.

Missed variant 3: short-lived cloud credentials are dismissed as safe because they expire

Credential source: OIDC exchanged into STS
Token lifetime: 60 minutes
Exposure location: GitHub Actions log retained for 90 days

Why it should be caught:

Short lifetime reduces blast radius, but it does not make the exposure safe. A valid token can be abused within its lifetime, and a retained log proves that the system leaked sensitive material. The finding should verify lifetime, scope, and revocation/session invalidation rather than dismissing it.

Edge Cases

  • ASIA placeholders in documentation should remain non-findings when values are clearly redacted or non-random.
  • STS credentials are usually a tuple; if one part is found, reviewers should check adjacent logs/config for the matching access key, secret key, and session token without reproducing any value.
  • Expired temporary credentials may no longer require key rotation, but still require remediation of the leak path and log/artifact retention.
  • OIDC-based cloud authentication is preferred over long-lived keys, but exchanged temporary credentials can still leak if tooling prints the environment.

Remediation Quality

  • Fix resolves the vulnerability
  • Fix doesn't introduce new security issues
  • Fix doesn't break functionality
  • Issues found: Add AWS STS detection guidance: include ASIA* access keys, aws_session_token / AWS_SESSION_TOKEN / AWS_SECURITY_TOKEN, and explicit guidance that temporary credentials remain reportable secret exposures while valid.

Comparison to Other Tools

Tool Catches this? Notes
Gitleaks Yes Built-in/default rules commonly cover AWS access keys including STS-style prefixes and session token names.
TruffleHog Yes Detects AWS credential material and can verify live credentials when configured to do so safely.
detect-secrets Partial Can catch high-entropy token-like values, but named STS patterns improve precision.
Current skill Partial Covers AKIA and aws_secret_access_key, but not ASIA or AWS session token names.

Overall Assessment

Strengths:

  • Strong guidance on not printing secret values, filtering placeholders, and keeping findings scoped to actual credential material.
  • Good coverage of secret managers, rotation, agent-specific credential handling, and git history scanning.

Needs improvement:

  • Include AWS STS temporary credential patterns, not only long-lived AWS access keys.
  • State explicitly that short-lived credentials are still sensitive while valid.
  • Add triage guidance for expired-but-retained temporary credential leaks.

Priority recommendations:

  1. Expand AWS access key detection from AKIA to AKIA|ASIA.
  2. Add AWS session token variable-name patterns.
  3. Add a false-positive note that redacted ASIA examples are not findings, while real temporary credential leaks still are.

Sources Checked

Bounty Info

  • I have read and agree to the CONTRIBUTING.md bounty terms
  • Preferred payment method: to be provided privately after acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions