Skip to content

sec(auth,credentials,oidc,secrets): remaining FOLD-1044 hardening (M1-M7, L1-L6, N4-N5) #1058

Closed

Description

@cristim

Report 03 (auth/OIDC/secrets/credentials review) remaining Medium/Low/Nit findings for PR #1044. See docs/code-review/16-remaining-findings-plan.md FOLD-1044.

Findings:

  • 03-M1 (credentials/cipher.go): add len(key)==32 guard to Encrypt/Decrypt; prevent silent AES-128/192 downgrade
  • 03-M2 (credentials/cipher.go): make multiple-key-env-var config a hard error
  • 03-M3 (secrets/gcp_resolver.go): implement client-side HasPrefix in GCP ListSecrets to match interface doc
  • 03-M5 (auth/service_password.go): rate-limit password reset requests per email
  • 03-M6 (oidc/azure_signer.go): validate Azure public exponent fits int64 and is in range before conversion
  • 03-M7 (oidc/factory.go): emit precise error when exactly one Azure OIDC env var is set
  • 03-L1 (auth/service_password.go): mask domain in redactEmail
  • 03-L2 (auth/service_apikeys.go): guard apiKey[:8] with len check
  • 03-L3 (auth/service_password.go): rename containsSequentialChars to containsRepeatedChars
  • 03-L4 (oidc/lambda_issuer.go, issuer_cache.go): validate URL is absolute https before caching as iss
  • 03-L5 (auth/types.go): document IsUnrestrictedAccess fail-open default prominently
  • 03-L6 (auth/service_group.go): document matchStringListConstraints empty-list semantics
  • 03-N4 (auth/service_helpers.go): generateToken: encode raw bytes directly, drop pointless SHA-256
  • 03-N5 (credentials/resolver.go): validate required fields non-empty after unmarshal

Activity

  1. added 7 commits that reference this issue on Jun 7, 2026
    ef6314c
    dfb66de
    93f352d
    7434c11
    47c3b76
    04b9a99
    8f20d76
  2. added
    pr-createdA PR has been opened for this issue (dedup guard for the auto-PR loop)
    pr-mergedThe PR for this issue has been merged
    on Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingimpact/internalTeam-internal onlypr-createdA PR has been opened for this issue (dedup guard for the auto-PR loop)pr-mergedThe PR for this issue has been mergedpriority/p2Backlog-worthyseverity/mediumModerate harmtriagedItem has been triagedurgency/this-sprintWithin the current sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions