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
- Call
Client.GetTask(ctx, taskID, false).
- Observe that the request URL has no
includeSecrets query parameter.
- The NVCT controllers apply their
defaultValue = "true" setting.
- 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.
Describe the bug
nvcf-cli task getdefines--include-secretswith a default value offalse, but the client omits theincludeSecretsquery parameter when thatvalue 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 itsresponse even though the user did not opt in. The API returns secret names,
not secret values.
Steps or code to reproduce bug
Client.GetTask(ctx, taskID, false).includeSecretsquery parameter.defaultValue = "true"setting.The existing NVCT integration tests also show that an explicit
includeSecrets=falsesuppresses the names.Expected behavior
The client should always serialize the caller's choice:
includeSecrets=falsewhen--include-secretsis not setincludeSecrets=truewhen--include-secretsis setAdditional 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.