nvcf-cli task get includes secret names without opt-in
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 218
- Forks
- 72
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 427
Description
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
includeSecretsquery 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=falsewhen--include-secretsis not setincludeSecrets=truewhen--include-secretsis 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Client.GetTask(ctx, taskID, false) and the nvcf-cli task get handling for --include-secrets. Review the existing NVCT integration tests, then add a client regression test covering both false and true values. Done means the request reflects the caller's choice in both cases and false prevents secret names from appearing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100