definition:
  language:
    python:
      - name: "Boto3 Secrets Manager"
        prefix: "boto3.client"
        rule: "client\\([\"']secretsmanager[\"']"
        provider: SECRETS_MODERN
      - name: "Boto3 SSM Parameter Store"
        prefix: "boto3.client"
        rule: "client\\([\"']ssm[\"']"
        provider: SECRETS_MODERN
      - name: "Env var os.environ"
        prefix: "os.environ"
        provider: SECRETS_LEGACY
        rule: "os\\.environ\\.(?<operation>get|__getitem__|pop)"
      - name: "Dotenv load"
        prefix: "dotenv."
        provider: SECRETS_LEGACY
        rule: "dotenv\\.(?<operation>load_dotenv|dotenv_values)"
    go:
      - name: "AWS Secrets Manager SDK v2"
        prefix: "github.com/aws/aws-sdk-go-v2/service/secretsmanager."
        provider: SECRETS_MODERN
      - name: "AWS SSM SDK v2"
        prefix: "github.com/aws/aws-sdk-go-v2/service/ssm."
        provider: SECRETS_MODERN
      - name: "os.Getenv"
        prefix: "os.Getenv"
        provider: SECRETS_LEGACY
        rule: "os\\.Getenv"
      - name: "Viper config (may hold secrets)"
        prefix: "github.com/spf13/viper."
        provider: SECRETS_LEGACY
        rule: "github\\.com/spf13/viper\\.(?<operation>Get|GetString)"
    java:
      - name: "AWS Secrets Manager Java SDK"
        prefix: "software.amazon.awssdk.services.secretsmanager."
        provider: SECRETS_MODERN
      - name: "Spring Cloud AWS Secrets Manager"
        prefix: "io.awspring.cloud.secretsmanager."
        provider: SECRETS_MODERN
      - name: "System.getenv"
        prefix: "System.getenv"
        provider: SECRETS_LEGACY
        rule: "System\\.getenv"
    javascript:
      - name: "AWS Secrets Manager SDK v3"
        prefix: "@aws-sdk/client-secrets-manager."
        provider: SECRETS_MODERN
      - name: "process.env"
        prefix: "process.env"
        provider: SECRETS_LEGACY
        rule: "process\\.env"

  providers:
    SECRETS_MODERN:
      servicenameMapping:
        "secretsmanager": "secrets-manager"
        "ssm": "parameter-store"
    SECRETS_LEGACY:
      servicenameMapping:
        "environ": "environment-variable"
