Logo Python Packaging Security Audit

Python Packaging Security Audit

Tổ chức
opendatahub-io
python-packaging-security-audit

Use this skill to evaluate the security of a Python package repository by orchestrating static analysis, binary scanning, and git history inspection sub-skills in parallel, then combining their results into a unified security report with a risk rating.

Tổng quan

Nhà phát hànhopendatahub-io
Kho mãai-helpers
Tên kỹ năngpython-packaging-security-audit
Sao
39
Bản fork
76
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 là Markdown thuần túy, không phải 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ộ.

  • Đầy đủ trong hướng dẫn

    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 opendatahub-io công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Python Packaging Security Audit 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 thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-python-packaging/skills/python-packaging-security-audit
  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/opendatahub-io/ai-helpers.git /tmp/ai-helpers
mkdir -p .claude/skills
cp -r /tmp/ai-helpers/plugins/odh-python-packaging/skills/python-packaging-security-audit .claude/skills/python-packaging-security-audit
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 Python Packaging Security Audit 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ự tải Python Packaging Security Audit 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 Python Packaging Security Audit không bị giới hạn ở mô hình mà kỹ năng này được viết cho. 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 kỹ năng chưa dùng không tốn chi phí.

  • Đổ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.

Python Packaging Security Audit

Orchestrates a comprehensive pre-onboarding security evaluation of Python packages by dispatching three specialized sub-skills as parallel background agents. Each agent writes its report section to an individual file; the orchestrator reads all files and assembles the unified report.

Inputs

  • repo_path (optional): Local filesystem path to an already-cloned repository
  • package_name (optional): Python package name — the skill will locate and clone the repository
  • hexora_results (optional): File path to pre-computed hexora JSON output (hexora-results.json). Forwarded to the python-packaging-static-audit sub-skill.
  • binary_scan (optional): File path to pre-computed binary scanner JSON output (binary-scan.json). Forwarded to the python-packaging-binary-audit sub-skill.
  • malcontent_results (optional): File path to pre-computed malcontent JSON output (malcontent-results.json). Forwarded to the python-packaging-binary-audit sub-skill.

At least one of repo_path or package_name must be provided. If repo_path is given and points to an existing directory, skip straight to Step 2. Otherwise, use package_name to discover and clone the repository.

When pre-computed scan inputs are provided, repo_path is still needed for triage context (reading source files to understand findings). Always use --depth 50 for cloning because the git-audit sub-skill runs its own git history commands and needs sufficient commit history.

Step 1: Resolve Repository

If you already have a local repository path, skip to Step 2.

Otherwise, use the python-packaging-source-finder skill to locate the upstream repository URL:

text
Skill: python-packaging-source-finder
Args: <package_name>

If the skill returns a URL with high or medium confidence, clone it locally with enough history for the git scan:

bash
CLONE_DIR=$(mktemp -d -t security-audit-XXXXXX)
git clone --depth 50 -- "<repository_url>" "$CLONE_DIR/repo"

Use $CLONE_DIR/repo as the repo path for Step 2.

If source-finder returns low confidence or no URL, stop and return a report with risk rating needs_review stating that the source repository could not be located.

Step 2: Dispatch Parallel Audits

Create a working directory for the report files:

bash
AUDIT_DIR=$(mktemp -d -t security-audit-results-XXXXXX)

Dispatch three background agents in parallel. Each agent invokes one sub-skill and writes its findings to an individual file. The orchestrator does not need the intermediate reasoning context — only the final report sections matter.

When pre-computed scan inputs are available, forward them to the corresponding sub-skill so it skips tool execution and goes straight to triage.

Agent 1 — Static Analysis:

text
Dispatch a background Agent that invokes the python-packaging-static-audit skill
with repo_path=<repo-path> and output_file=$AUDIT_DIR/static-audit.md.
If hexora_results is provided, also pass hexora_results=<path>.
Then exits.

Agent 2 — Binary Scan:

text
Dispatch a background Agent that invokes the python-packaging-binary-audit skill
with repo_path=<repo-path> and output_file=$AUDIT_DIR/binary-audit.md.
If binary_scan is provided, also pass binary_scan=<path>.
If malcontent_results is provided, also pass malcontent_results=<path>.
Then exits.

Agent 3 — Git History:

text
Dispatch a background Agent that invokes the python-packaging-git-audit skill
with repo_path=<repo-path> and output_file=$AUDIT_DIR/git-audit.md, then exits.

Wait for all three agents to complete before proceeding.

Step 3: Combine Results

Read each output file. The first line of each file contains RISK_RATING:<value>. Extract the risk rating and the markdown report section from each file.

If a file is missing or empty, treat that phase as risk_rating = needs_review and state in the report section that the sub-skill did not produce output.

Assign the overall risk rating as the worst (most severe) rating across all phases:

  • no_issues — All sub-skills returned no_issues
  • low_risk — Worst sub-skill rating is low_risk
  • needs_review — At least one sub-skill returned needs_review
  • critical — At least one sub-skill returned critical

Precedence: critical > needs_review > low_risk > no_issues

Step 4: Cleanup

Clean up temporary directories:

bash
rm -rf -- "${AUDIT_DIR}"

if [ -n "${CLONE_DIR}" ] && [[ "${CLONE_DIR}" == "${TMPDIR:-/tmp}"/* ]]; then
  rm -rf -- "${CLONE_DIR}"
else
  echo "ERROR: refusing to delete '${CLONE_DIR}' -- not under temp dir" >&2
fi

Output Format

Produce the following markdown report. When there are no findings, collapse to just the header, risk rating (no_issues), summary, and a statement that no issues were found.

markdown
# Security Assessment: {package-name}

**Risk Rating:** {no_issues | low_risk | needs_review | critical}
**Summary:** {1-2 sentence summary}

{Hexora Static Analysis section from static-audit.md}

{Binary Scan section from binary-audit.md}

{Git History Analysis section from git-audit.md}

## Recommendations

- {Bulleted list of specific actions based on findings across all phases}

Error Handling

Never abort the audit because a single tool is missing. Each sub-skill handles missing tools (hexora, malcontent) by returning a degraded report section with risk_rating = needs_review instead of failing. The orchestrator must always dispatch all three agents and combine whatever results are available.

ScenarioBehavior
Source-finder returns low confidence or no URLStop; report needs_review stating source repo could not be located
git clone failsStop; report needs_review stating repo could not be cloned
A sub-skill output file is missing or emptyInclude a note in that section; treat that phase as needs_review
A sub-skill reports tool unavailableInclude its degraded output in the report; treat that phase as needs_review
All sub-skills return no_issuesReport overall no_issues

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

Kỹ năng AI Python Packaging Security Audit làm được gì?

Use this skill to evaluate the security of a Python package repository by orchestrating static analysis, binary scanning, and git history inspection sub-skills in parallel, then combining their results into a unified security report with a risk rating.

Vì sao nên dùng Python Packaging Security Audit 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. Python Packaging Security Audit 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 Python Packaging Security Audit trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-python-packaging/skills/python-packaging-security-audit. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà 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 Python Packaging Security Audit?

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.

Bạn có thể dùng Python Packaging Security Audit 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 Python Packaging Security Audit 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 Python Packaging Security Audit có miễn phí không?

Có. Kỹ năng này được opendatahub-io 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 cho mô hình các công cụ mới để gọi — mã đượ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à tiêu chí của đầu ra tốt. 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 👇