Skip to content

nvcf-cli task get includes secret names without opt-in #460

Description

@goingforstudying-ctrl

Describe the bug

nvcf-cli task get defines --include-secrets with a default value of
false, but the client omits the includeSecrets query parameter when that
value is false. The NVCT task controllers interpret an omitted parameter as
includeSecrets=true.

As a result, nvcf-cli task get <task-id> can include secret names in its
response even though the user did not opt in. The API returns secret names,
not secret values.

Steps or code to reproduce bug

  1. Call Client.GetTask(ctx, taskID, false).
  2. Observe that the request URL has no includeSecrets query parameter.
  3. The NVCT controllers apply their defaultValue = "true" setting.
  4. For a task with secrets, the response includes the secret names.

The existing NVCT integration tests also show that an explicit
includeSecrets=false suppresses the names.

Expected behavior

The client should always serialize the caller's choice:

  • includeSecrets=false when --include-secrets is not set
  • includeSecrets=true when --include-secrets is set

Additional context

A client regression test should cover both values so the server default cannot
override the CLI's opt-in behavior again.


By submitting this issue, you agree to follow our
code of conduct and our
contributing guidelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions