shmuelie / shmuelie/powershell-modules

CopilotMarketplace DSC resource passes an unsupported name argument to registration

Open
#261 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug module:dsc theme:testing
Dominant language
PowerShell
Stars
0
Forks
0
Avg merge
21m
Merged PRs (30d)
124

Description

Finding

Severity: Medium. Reviewed commit: 5c38677469756c69f86678c0b907d82e15d0a539.

CopilotMarketplace.Set() calls copilot plugin marketplace add <Name> <Repository>, but the native Copilot CLI contract accepts a single <source> argument, not a custom name followed by a source. The configured Name occupies the source position, so the intended repository is not passed according to the documented command contract.

Source and evidence

  • modules/Shmuelie.Dsc/Shmuelie.Dsc.psm1:417-423.
  • Native GitHub Copilot CLI 1.0.85, read-only plugin marketplace add --help: Usage: copilot plugin marketplace add <source>. The source accepts owner/repo, URL or local path; no custom-name option is listed.
  • Calling the real DSC Set method with only its private CLI helper replaced by a capturing fake produced plugin, marketplace, add, custom-name, owner/catalog for Name=custom-name; Repository=owner/catalog.
  • Existing tests assert the same unsupported two-argument sequence, masking the contract mismatch. No marketplace registration was performed during this review.

Expected behavior / acceptance criteria

  • Pass the configured repository/source in the supported native source position and do not invent a naming option.
  • Clarify how the resource's Name property relates to the marketplace's actual registered identity; align Test/Get so applying the resource can converge.
  • Add deterministic command-contract tests against the documented single-source syntax and preserve native failure reporting and argument validation.
  • Keep validation non-mutating: use captured fake invocations and read-only native help, not real marketplace registration.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at modules/Shmuelie.Dsc/Shmuelie.Dsc.psm1:417-423 and inspect CopilotMarketplace.Set(), then review the existing tests that assert the two-argument command sequence. Compare Set, Test, and Get behavior with the documented single-source syntax using captured fake invocations. Done means the configured source is passed in the supported position, identity semantics are clarified, tests cover convergence and validation, and native failures remain reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, powershell
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.