Logo Pixee Migrate Repo Integrations

Pixee Migrate Repo Integrations

Tổ chức
pixee
pixee-migrate-repo-integrations

Chuyển các ánh xạ tích hợp kho mã từ một phiên bản trình quét trong bảng điều khiển quản trị sang một tích hợp Pixee được quản lý.

Tổng quan

Nhà phát hànhpixee
Kho mãpixee-cli
Tên kỹ năngpixee-migrate-repo-integrations
Sao
31
Bản fork
12
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được pixee công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Pixee Migrate Repo Integrations trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/pixee/pixee-cli/tree/main/skills/pixee-migrate-repo-integrations
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pixee/pixee-cli.git /tmp/pixee-cli
mkdir -p .claude/skills
cp -r /tmp/pixee-cli/skills/pixee-migrate-repo-integrations .claude/skills/pixee-migrate-repo-integrations
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Pixee Migrate Repo Integrations trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Pixee Migrate Repo Integrations ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Pixee Migrate Repo Integrations với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Migrate repository integration mappings

PREREQUISITES: Read ../pixee-shared/SKILL.md for global flags, exit codes, and error handling. Sections used below: pixee repo integration and pixee repo view in ../pixee-repo/SKILL.md, pixee integration list in ../pixee-integration/SKILL.md, pixee auth status in ../pixee-auth/SKILL.md, and following a HAL link with pixee api in ../pixee-api/SKILL.md.

A mapping binds one repository to one project on a scanner integration (a Sonar project key, an AppScan application id, and so on). The intended case: an organization configured a scanner in the admin console, which Pixee lists as a read-only system instance (source: system, an id like sonar-default), and has since created a managed instance in the product (source: managed, a UUID id). Repositories keep using the system instance until their mappings move. This skill moves the mappings from the system instance to a managed one. Moving between two managed instances, or back to the system instance, uses the same steps; see Other directions.

Change the mappings and leave the repositories alone: deleting a repository cascades to its scans, SBOMs, patches, and workflows.

Re-pointing a mapping is delete, then create. The API has no update (PATCH and PUT answer 405), a repository holds one mapping per type (a second create answers 409 "Duplicate repository integration"), and the two calls are not atomic. Every step below exists to make that pair safe.

1. Gate on the capability

bash
pixee repo integration --help

Done when the output begins Usage: pixee repo integration and lists create and delete as its commands. An older binary answers this with the parent pixee repo help (usage line pixee repo), which means the feature is missing: upgrade the CLI (install instructions in pixee-shared) and run the gate again.

2. Preflight

Confirm the target before any write; a stored credential can be stale or point at another deployment.

bash
pixee auth status --json

Record server and the identity of the credential in use (credentialInUse). Both go into the plan at the approval gate, where the user confirms them. Create a scratch directory outside any repository checkout for this run and tell the user its path.

3. Resolve the integrations

<type> is the scanner type to migrate (sonar, appscan, black-duck-hub, and so on).

bash
pixee integration list --type <type> --json \
  | jq 'map({id, name, source, health, webhook_secret_configured, self: ._links.self.href})'

Zero integrations for a type the user expects is a stop-and-ask, not a success.

The old integration is the one with source: "system"; the new one is a source: "managed" integration. When several managed instances exist, show their names and ask the user to choose. When the user names other instances, use those. A type with no system instance (black-duck-hub and checkmarx-enterprise have no default instance) goes through Other directions.

Check every new integration before planning, because a failed create after a delete is the expensive failure. health of {"status": "healthy", ...} is good; report anything else to the user, who decides at the approval gate whether to go on.

Sonar and AppScan scanners call back into Pixee, which adds two items. Report webhook_secret_configured: false on the new instance as a side finding. Then, whatever that field says, tell the user the scanner must be pointed at the managed instance's own webhook address (shown when the instance was set up) and ask them to confirm it is; the CLI cannot check the scanner side.

Accept one of two inputs:

  • System to managed. Every mapping of <type> that points at the system instance moves to the new one. This is the default.
  • Explicit map. The user supplies repository to integration pairs. Resolve each repository to a UUID by exact full_name or name match in pixee repo list --json (the protocol in pixee-repo) and stop on an ambiguous or missing match. Move exactly those repositories, each to its own integration, and leave every other mapping alone.

repository_count in integration list reads 0 for these integrations, so it cannot find mappings. Enumerate through repositories (step 4).

4. Enumerate mappings

pixee repo view takes a UUID. Get UUIDs from pixee repo list --json. Read every repository, or only those in the explicit map.

A mapping's integration is its _links.integration.href. Hrefs are opaque; compare them for equality against each integration's own _links.self.href from step 3 and read no id out of one. Fetch the integration list once and reuse it for every repository:

bash
ints=$(pixee integration list --json)
pixee repo view <repo-uuid> --expand repository-integrations --json \
  | jq --argjson ints "$ints" --arg repo <repo-uuid> '._embedded."repository-integrations"[]
      | ._links.integration.href as $h | del(._links)
      | . + {repository: $repo,
             integration: (first($ints[] | select(._links.self.href == $h) | .id)
                           // "UNMATCHED " + $h)}'

Each output record is a whole mapping plus its repository and integration id. Keep the records whose type is the migrating type. An UNMATCHED integration names a mapping whose integration is missing from the list: report it at the approval gate and leave it alone. No output means the repository has no mappings. Zero mappings of a type the user expected is a stop-and-ask.

Done when every repository has been read and every mapping of the type is paired with its current integration. Every target identifier comes from that mapping's record.

5. Approval gate

Show the human the complete plan: the server and identity from step 2, then one row per mapping with repository, mapping id, type, every identifier field the record carries, old integration, new integration, and the new integration's type and health. State that each move is delete then create and is not atomic. Wait for explicit approval. Write nothing to Pixee before it.

Save the approved plan in the scratch directory; a resumed run needs it.

6. Migrate one repository, then the rest

Run the loop for a single repository first and verify it. Continue with the remainder only after that repository passes. Stop at the first failure of any kind. Skip a repository whose mapping already shows the new integration.

For each repository:

  1. Snapshot. Save the repository's mappings and its scan count to the scratch directory and keep them until the audit passes. A snapshot is write-once: when the file exists, go to Resuming an interrupted run instead of overwriting it.
    bash
    pixee repo view <repo-uuid> --expand repository-integrations --json \
      > <scratch>/snapshot-<repo-uuid>.json
    pixee --json api "$(jq -r '._links.scans.href' <scratch>/snapshot-<repo-uuid>.json)" \
      | jq .total > <scratch>/scans-<repo-uuid>.txt
    Done when the snapshot is non-empty, parses as JSON, and contains the mapping about to be deleted, and the count file holds a number. The scans link answers with the first page and a total, so the count costs one request however many scans the repository has; pixee scan list would download every scan. With no writable filesystem, print the snapshot (it holds no credentials) and the count to the user instead; resuming then depends on that transcript.
  2. Delete the old mapping: pixee repo integration delete <repo-uuid> <mapping-id>.
  3. Create it on the new integration with the same target identifier, and every optional identifier the snapshot holds (for example Veracode's --sandbox-guid); flags are in the table below: pixee repo integration create <type> <repo-uuid> --<identifier-flag> <value> --integration-id <new-id>. Pass --integration-id for a managed instance. For the system instance, omit the flag: the CLI rejects the system instance's id (for example sonar-default) with "Unknown integration", and omitting the flag selects it. Touch only the mapping of the migrating type.
  4. Verify. Re-read the repository. The mapping shows the new integration href, every identifier equals the snapshot, and the scan count is at least the snapshot count. Scans can arrive during the move, so an increase is fine. The mapping id changes on re-create; that is expected. When the count drops, stop and tell the user: rollback restores the mapping, not scans.

Resuming an interrupted run

A session can die between a delete and its create. Before continuing, re-read the scratch directory, the saved plan, and each repository's live mappings, and compare them to the snapshots. Stop and ask the user when the scratch directory or the saved plan is missing.

  • Snapshot exists, live repository has no mapping of the type: an interrupted move. Restoring the deleted mapping is permitted without a new approval: recreate it from the snapshot as under When create fails after delete, tell the user, and ask whether to continue the migration.
  • Snapshot exists, live mapping equals the snapshot: not yet moved; continue the loop at step 2.
  • Snapshot exists, live mapping shows the new integration with the snapshot's identifiers: moved; skip it.
  • Anything else, including no snapshot and no mapping, a mapping on a third integration, or identifiers that differ from the snapshot: stop and ask the user.

When create fails after delete

The repository now has no mapping. Recreate the old one from the snapshot: same identifiers and the old integration, with --integration-id handled as in step 3 of the loop. Then re-verify the repository as in step 4 of the loop (the mapping id will differ from the snapshot) and tell the user what failed and where you stopped. When the rollback create also fails, tell the user immediately with the repository, the snapshot path, and the identifiers.

7. Audit

After the last repository, re-enumerate every repository as in step 4, including any UNMATCHED rows. Done when no mapping of the type points at the old integration (apart from repositories the explicit map excluded), no UNMATCHED mapping is new, and every target identifier matches its snapshot.

8. Report

Tell the user, in this order: outcome, repositories moved, anything that failed or was rolled back, what was not verified, side findings (report only; leave them unfixed). Findings and scan attribution were not compared, only mappings and scan counts; suggest the user spot-check one migrated repository in the UI. State that the system instance is still in place: it is read-only and disappears when the operator retires the admin console configuration, and removing anything else is the user's decision.

Other directions

  • Managed to managed. Same steps; the old integration is the one the user names, and the new one is passed with --integration-id.
  • Managed back to the system instance. Same steps; create without --integration-id.
  • A type with no system instance. The old integration is the one the user names.

Create flags by type

--integration-id <id> is optional on every type except black-duck-hub and checkmarx-enterprise, which have no default instance. Omitting it selects the type's system instance.

TypeSubcommandIdentifier flags
Sonarcreate sonar--project-key
AppScancreate appscan--application-id
Arnicacreate arnica--asset-key
Black Duck Hubcreate black-duck-hub--project-id, --version-id, plus required --integration-id
Checkmarxcreate checkmarx--project-id
Checkmarx Enterprisecreate checkmarx-enterprise--project-id (integer), plus required --integration-id
Datadogcreate datadog--repository-id
Polariscreate polaris--polaris-project-id
Veracodecreate veracode--application-guid, optional --sandbox-guid

Each flag mirrors a field on the mapping record (--project-key is project_key). The create <type> --help output is the final word on flags.

Câu hỏi thường gặp

Kỹ năng AI Pixee Migrate Repo Integrations làm được gì?

Chuyển các ánh xạ tích hợp kho mã từ một phiên bản trình quét trong bảng điều khiển quản trị sang một tích hợp Pixee được quản lý.

Vì sao nên dùng Pixee Migrate Repo Integrations trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Pixee Migrate Repo Integrations là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Pixee Migrate Repo Integrations trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/pixee/pixee-cli/tree/main/skills/pixee-migrate-repo-integrations. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Pixee Migrate Repo Integrations?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Pixee Migrate Repo Integrations với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Pixee Migrate Repo Integrations với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Pixee Migrate Repo Integrations có miễn phí không?

Có. Kỹ năng này được pixee phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇