image-repo-mapping
БесплатноБез исполняемых скриптовНе проверенUse when resolving which GitHub repository to clone for CVE analysis from a container image name in a Jira ticket summary, pscomponent label, or Downstream…
от openshift-eng★ 123 звезды на GitHubОб этом скилле
Image to Repository Mapping
Translates a container image name into the GitHub repository URL to clone for analysis. Image names appear in the ticket summary, pscomponent: labels, and the Downstream Component Name custom field.
When to Use This Skill
Use this skill when:
- An image name has been extracted from a Jira ticket (summary, label, or custom field)
- The user passes
--repo=<image-name>using a short image name rather than a full GitHub URL - Phase 0.7 needs to determine which repository to clone
Resolution Order
Apply these in order and stop at the first match:
- Full GitHub URL supplied (
--repo=https://github.com/...) → use directly, skip this skill. - Exact image name match — look the image name up in the table below.
- Prefix match — strip version suffixes (e.g.
-1-0,-1-12-4,-rhel9,-rhel8) and re-match. - Keyword match — check the per-section keyword rules at the bottom of each group.
- NOT FOUND → Exit immediately with the error message below. Do not guess. Do not proceed with analysis.
Tip: Strip
pkg:oci/prefix before matching (e.g.pkg:oci/ose-ansible-operator→ose-ansible-operator).
Not-Found Exit
If no match is found after all steps above, stop immediately and output:
❌ Repository mapping not found for image: <image_name>
The image "<image_name>" is not in the known mapping table and could not
be resolved automatically.
To proceed, re-run with an explicit repository URL:
--repo=https://github.com/org/repo
Or add the mapping to:
plugins/compliance/skills/image-repo-mapping/SKILL.md
Do NOT continue analysis without a confirmed source repository.
Do NOT fall back to guessing, fuzzy matching, or prompting the user inline. Exit the command at this point.
Two Repository Patterns
Components fall into one of two patterns. The resolution output is different for each.
Pattern A — Direct repo
Clone the mapped repo directly at the mapped branch. Used by: Operator SDK, Ansible Operator, must-gather, Secrets Store CSI.
image → repo URL + branch
Pattern B — Release repo with git submodules
Some components use a dedicated -release repo that aggregates all component repos as git submodules. The release repo branch pins each submodule to the exact commit/tag used for that release. Used by: cert-manager, ZTWIM, ESO.
Resolution steps for Pattern B:
- Clone the release repo at the mapped release branch
- Read
.gitmodulesfrom that branch to find the submodule entry matching the target image - Read the pinned commit from the release repo tree (
git ls-tree HEAD <submodule-path>) — do not clone from the.gitmodulesbranch field alone - Clone the component repo and check out that pinned commit for analysis
# Step 1: Clone release repo at correct branch (per-run path under REPOS_BASE)
RELEASE_CLONE_DIR="${REPOS_BASE}/.release-clones/$(echo "${RELEASE_REPO_URL}" | sed -E 's#^[a-zA-Z]+://github\.com/##; s#\.git$##; s#/$##' | tr '/' '-')-${RELEASE_BRANCH}"
rm -rf "${RELEASE_CLONE_DIR}"
mkdir -p "$(dirname "${RELEASE_CLONE_DIR}")"
git clone --depth=1 -b "${RELEASE_BRANCH}" "${RELEASE_REPO_URL}" "${RELEASE_CLONE_DIR}"
# Step 2: Read .gitmodules
cat "${RELEASE_CLONE_DIR}/.gitmodules"
# Step 3: Extract submodule path + url from .gitmodules
# Step 4: Read pinned commit from release repo tree
PINNED_COMMIT=$(git -C "${RELEASE_CLONE_DIR}" ls-tree HEAD "${SUBMODULE_PATH}" | awk '{print $3}')
if [ -z "${PINNED_COMMIT}" ]; then
echo "ERROR: no pinned commit found for ${SUBMODULE_PATH}"
exit 1
fi
# Step 5: Clone component repo and checkout pinned commit (fetch SHA explicitly — shallow clone alone may miss it)
git clone "${COMPONENT_URL}" "${REPO_DIR}"
git -C "${REPO_DIR}" fetch origin "${PINNED_COMMIT}"
git -C "${REPO_DIR}" checkout "${PINNED_COMMIT}"
Jira branch → release branch naming for Pattern B:
Jira BRANCH value |
Release branch |
|---|---|
cert-manager-X-Y |
release-X.Y in cert-manager-operator-release |
external-secrets-X-Y |
release-X.Y in external-secrets-operator-release |
ztwim-1.0 |
release-1.0.0 in zero-trust-workload-identity-manager-release (one-time exception — team confirmed this was a branching mistake; future releases use release-X.Y) |
ztwim-X.Y (any other) |
release-X.Y in zero-trust-workload-identity-manager-release |
Note: Jira branch values use hyphens for separators (e.g.
external-secrets-1-0) while release branches use dots (e.g.release-1.0). Strip the component prefix and convert the remaining hyphen-separated version to dot notation.
Image → Repository Map
Every image name here has appeared in real ticket summaries or labels. This table is intentionally scoped to the components this command has been validated against — extend it as new components come up (see the not-found exit message above).
cert-manager / jetstack — Pattern B (release re
Установить image-repo-mapping в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл image-repo-mapping?
Use when resolving which GitHub repository to clone for CVE analysis from a container image name in a Jira ticket summary, pscomponent label, or Downstream Component Name field.
Как установить скилл image-repo-mapping?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл image-repo-mapping запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic