Skip to content

Incorrect "Found and redacted inline secret" when exporting #237

Description

Command that triggered the bug

apiops extract

Expected behavior

<set-variable name="workloadBearer" value="@(context.Request.Headers.GetValueOrDefault(&quot;x-api-key&quot;, &quot;&quot;))" />
<set-header name="Authorization" exists-action="override">
    <value>@("Bearer " + (string)context.Variables["workloadBearer"])</value>
</set-header>

Must be exported as is. There is no secret on this code.

Actual behavior

2026-08-10T12:11:40.213Z [WARN] Found and redacted inline secret in products//policies/policy (set-header[authorization]). Publish will fail while '*** REDACTED ***' remains. Update the policy to use a named value: https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-properties

<set-variable name="workloadBearer" value="@(context.Request.Headers.GetValueOrDefault(&quot;x-api-key&quot;, &quot;&quot;))" />
<set-header name="Authorization" exists-action="override">
	<value>*** REDACTED ***</value>
</set-header>

apiops CLI version

0.4.0-alpha.2

Environment details

Ubuntu 24, Node: v24.18.0, bash

CI/CD environment

N/A (running locally)

Is this bug blocking you?

Yes

Activity

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 broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions