Skip to content

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

Description

Command that triggered the bug

apiops extract

Expected behavior

<set-variablename="workloadBearer"value="@(context.Request.Headers.GetValueOrDefault(&quot;x-api-key&quot;, &quot;&quot;))" />
<set-headername="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-variablename="workloadBearer"value="@(context.Request.Headers.GetValueOrDefault(&quot;x-api-key&quot;, &quot;&quot;))" />
<set-headername="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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions