Skip to content

Named value transitive dependency not being extracted when used only in backend credentials header #315

Description

@JProvAnt

Command that triggered the bug

apiops extract

Expected behavior

When extracting transitive dependencies from an API a Named Value that is referenced in a Backend credential header should also be extracted.

Example backend:

{
  "id": "redacted",
  "type": "Microsoft.ApiManagement/service/backends",
  "name": "function-backend",
  "properties": {
    "title": null,
    "description": "function app backend",
    "type": "Single",
    "url": "https://function-test.azurewebsites.net/api",
    "protocol": "http",
    "credentials": {
      "query": {},
      "header": {
        "x-functions-key": [
          "{{function-test-key}}"
        ]
      }
    },
    "tls": {
      "validateCertificateChain": false,
      "validateCertificateName": false
    }
  }
}

The Named value function-test-key is not being extracted.

Actual behavior

When running apiops-extract the Backend is being extracted as a transitive dependency, but the Named value function-test-key is not being extracted which is used as header in the backend.

To test this if we add:

<set-variable name="testVar" value="{{ function-test-key }}" />

to the API policy, the Named value will then be automatically extracted as expected.

However it should also extract the Named value even if the only reference is in the Backend credentials.

apiops CLI version

1.0.4

Environment details

Azure devops

CI/CD environment

None

Is this bug blocking you?

None

Activity

  1. added
    staleNo activity for 30+ days — will be closed if no further activity
    on Nov 9, 2026
  2. github-actions commented on Nov 9, 2026

    @github-actions

    ⚠️ Stale issue notice — This issue has had no activity for 30 day(s).

    It will be automatically closed after 60 days of inactivity.

    To keep this issue open:

    • Leave a comment describing the current status, or
    • Remove the stale label.

    This notice was posted automatically by the stale issue workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

staleNo activity for 30+ days — will be closed if no further activitytype:bugSomething broken

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions