Skip to content

WKS-2954 - Add Copilot allowlist gate BEFORE_DOWNLOAD sample - #80

Merged
ehl-jf merged 1 commit into
mainfrom
feature/WKS-2954-copilot-before-download-sample
Oct 12, 2026
Merged

ehl-jf merged 1 commit into
mainfrom
feature/WKS-2954-copilot-before-download-sample

Conversation

@ehl-jf

@ehl-jf ehl-jf commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a new BEFORE_DOWNLOAD sample, samples/artifactory/BEFORE_DOWNLOAD/copilot-allowlist-gate, demonstrating a GitHub Copilot integration pattern per WKS-2954. It's the blocking counterpart to AFTER_DOWNLOAD/copilot-dependency-advisory (#79).

  • Downloads only proceed when <repoKey>/<path> matches a glob in an allowlist file (JSON array) kept in a GitHub repo. * matches within a path segment, ** across segments, ? one character.
  • A blocked artifact gets a GitHub issue assigned to Copilot's coding agent, asking it to vet the dependency and open a PR adding a glob to the allowlist. Merging that PR unblocks the next download, so the allowlist's Git history is the approval log.
  • The issue URL is written onto the artifact (issueProperty, default copilot.allowlist.issue), so later downloads point to the same issue instead of opening new ones.
  • Configured with worker properties, not artifact properties, since an unapproved artifact is exactly one nobody tagged: githubRepo, githubBranch, allowlistPath (supports {repoKey} for one file per Artifactory repo), failMode (WARN/STOP when the allowlist can't be read), issueProperty, githubApiUrl, githubApiVersion.
  • A missing allowlist file is treated as empty, so Copilot's first PR can create it.

Blocks downloads of artifacts not matching a glob in an allowlist file kept in a
GitHub repo, and assigns a review issue to Copilot's coding agent, which proposes
the allowlist entry as a PR. Repo, branch, allowlist path ({repoKey} supported),
fail mode and the issue-tracking artifact property are worker properties.
@ehl-jf
ehl-jf merged commit 4eda300 into main Oct 12, 2026
1 check passed
@ehl-jf
ehl-jf deleted the feature/WKS-2954-copilot-before-download-sample branch October 12, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant