Agent Skillsnetdata/netdata › triage-coverity

triage-coverity

GitHub

用于审查和分类 Coverity Scan 缺陷,支持查看保存的 CID 包、获取实时发现及应用验证后的分类决策。

.agents/skills/triage-coverity/SKILL.md netdata/netdata

Trigger Scenarios

审查 Coverity 扫描缺陷 应用分类决策

Install

npx skills add netdata/netdata --skill triage-coverity -g -y
More Options

Non-standard path

npx skills add https://github.com/netdata/netdata/tree/master/.agents/skills/triage-coverity -g -y

Use without installing

npx skills use netdata/netdata@triage-coverity

指定 Agent (Claude Code)

npx skills add netdata/netdata --skill triage-coverity -a claude-code -g -y

安装 repo 全部 skill

npx skills add netdata/netdata --all -g -y

预览 repo 内 skill

npx skills add netdata/netdata --list

SKILL.md

Frontmatter
{
    "name": "triage-coverity",
    "description": "Inspect or review Coverity Scan defects and saved CID bundles; fetch live findings or apply verified triage decisions when requested. Use for Coverity triage helpers, not general scan-build or CI setup."
}

Coverity Scan Triage

Review defects against current source and use the shipped helpers for the project's unofficial browser JSON API. Commands run from the repository root; references starting with ./ are relative to this skill directory.

Pick The Task

Task Load
Review saved defects or explain a CID ./review.md; current source and the saved bundle
Prepare a local review bundle Local Evidence below and ./scripts/prepare-defect.sh
Fetch live tables or defect details ./operations.md#session-setup and ./operations.md#fetch-and-resolve
Apply verified classifications Apply Decisions below, ./review.md#verdicts and ./operations.md
Change or review a helper The helper, its callers and ./scripts/_lib.sh; relevant reference sections

Authorization follows AGENTS.md#when-a-sow-is-required; review scope and evidence follow AGENTS.md#review. A request to inspect or review does not authorize remote triage updates or source fixes. Reuse authorization already provided for the current scope. Loading this skill MUST NOT start live authentication, keepalive or remote updates.

Use the requested CID set and review approach. Ask only for material missing scope or model preferences; do not ask again for decisions already made. A local bundle or source review needs neither cookies nor a keepalive. A small batch SHOULD use a proportionate review. The skill does not prescribe a model pipeline: manual, single-model and multiple-model reviews remain valid under project policy and the user's chosen tools. For an authorized multiple-model review, idea generation, source analysis and independent verification MAY be separate roles.

Local Evidence

Use .local/audits/coverity/ for this workflow. Helpers detect the repository root through Git; fetch helpers also accept explicit output paths. Keep each defect's notes, reports, proposed comment, fix draft and validation evidence under triage/<scope>/cid-<N>/, rather than at the repository root.

The local bundler reads raw/<scope>-all.json and details/<scope>/cid-<N>.json (with a legacy details/cid-<N>.json fallback). Set coverity_cid to the requested positive CID and coverity_scope to its local scope name, such as outstanding:

bash .agents/skills/triage-coverity/scripts/prepare-defect.sh \
  "${coverity_cid:?set the CID}" "${coverity_scope:?set the local scope}"

It creates defect-summary.json (table row), defect-details.json (trace/checker/CWE data), source-context.c (roughly 150 lines around the main event), and TODO.md (notes). Existing files are retained; --force MAY regenerate these outputs when replacement is intended. Scope defaults to outstanding when omitted from this helper. Coverity's displayFile and main-event line are hints: inspect the current function when refactoring has moved it.

Apply Decisions

Use ./review.md#verdicts to choose a supported verdict and record the CID, source evidence and intended attributes. Before an authorized update, confirm the configured project and current defect/classification. For other local scope names (dismissed, fixed, unclassified, etc.), the finalize helper warns and still posts; it does not verify that the old classification disagrees or that the update is authorized.

Set coverity_verdict and coverity_comment_file from the verified decision. Comments MUST be ASCII: use -- and straight quotes. The update helper rejects non-ASCII before posting; the historical WAF observations are in ./operations.md#diagnose-failures.

bash .agents/skills/triage-coverity/scripts/finalize-defect.sh \
  "${coverity_cid:?set the CID}" "${coverity_verdict:?set the verified verdict}" \
  "${coverity_scope:?set the local scope}" "${coverity_comment_file:?set the comment file}"

A confirmed bug defaults to Bug / Fix Required. The optional fifth argument is a fix commit SHA; supply it only when evidence establishes that the fix was submitted. A merely local commit is not submission evidence. For true-bug verdicts, this argument selects Fix Submitted and appends Fix commit: <sha> to the comment. The helper trusts the caller's reference; it does not check submission or whether the fix addresses the CID.

False-positive and cosmetic verdicts keep their Ignore action. CODE_GONE and NEEDS_HUMAN print a skip message and exit without authentication or an update. The attribute enum, JSON value types and low-level explicit-attribute interface belong to ./scripts/update-triage.sh; verdict/action and impact/severity mapping belong to ./scripts/finalize-defect.sh. Follow ./operations.md#update-details for severity inputs and response verification.

Maintaining This Skill

Run python3 .agents/skills/triage-coverity/scripts/test_finalize.py for isolated verdict-to-payload checks. It needs Python 3, Bash, Git and jq; real helper code runs in a disposable repository with synthetic settings and a fake curl. No live account is used. Shell helpers also need a bash -n check when changed.

Operational discovery capture follows AGENTS.md#knowledge-capture. Preserve useful view/endpoint behavior, session and WAF failure clues, analyzer-model exceptions and attribute mappings in the relevant reference or helper owner. Separate local client guarantees from observations that need confirmation against the current service.

Version History

  • 1e97a0f Current 2026-09-23 11:24

Same Skill Collection

.agents/skills/collectors-authoring/SKILL.md
.agents/skills/collectors-go-design/SKILL.md
.agents/skills/collectors-go-framework-v2/SKILL.md
.agents/skills/collectors-metadata-yaml/SKILL.md
.agents/skills/collectors-prometheus-profiles/SKILL.md
.agents/skills/collectors-snmp-profiles/SKILL.md
.agents/skills/collectors-snmp-trap-profiles/SKILL.md
.agents/skills/coverity-audit/SKILL.md
.agents/skills/docs-learn-pr-preview/SKILL.md
.agents/skills/docs-learn-site-structure/SKILL.md
.agents/skills/graphql-audit/SKILL.md
.agents/skills/health-alert-authoring/SKILL.md
.agents/skills/integrations-lifecycle/SKILL.md
.agents/skills/learn-pr-preview/SKILL.md
.agents/skills/packaging-static-installer/SKILL.md
.agents/skills/project-create-topology/SKILL.md
.agents/skills/project-health-alert-authoring/SKILL.md
.agents/skills/project-prometheus-profiles/SKILL.md
.agents/skills/project-query-corpus/SKILL.md
.agents/skills/project-snmp-profiles-authoring/SKILL.md
.agents/skills/project-snmp-trap-profiles-authoring/SKILL.md
.agents/skills/project-writing-go-modules-framework-v2/SKILL.md
.agents/skills/repo-mirror-sources/SKILL.md
.agents/skills/repo-pr-reviews/SKILL.md
.agents/skills/repo-skill-authoring/SKILL.md
.agents/skills/sonarqube-audit/SKILL.md
.agents/skills/tests-query-corpus/SKILL.md
.agents/skills/topology-authoring/SKILL.md
.agents/skills/triage-agent-events/SKILL.md
.agents/skills/triage-codacy/SKILL.md
.agents/skills/triage-codeql/SKILL.md
.agents/skills/triage-snmp-diagnostics/SKILL.md
.agents/skills/triage-sonarqube/SKILL.md
docs/netdata-ai/skills/query-netdata-agents/SKILL.md
docs/netdata-ai/skills/query-netdata-cloud/SKILL.md
docs/netdata-ai/skills/query-snmp-traps/SKILL.md
.agents/skills/codacy-audit/SKILL.md
.agents/skills/learn-site-structure/SKILL.md
.agents/skills/mirror-netdata-repos/SKILL.md
.agents/skills/pr-reviews/SKILL.md
.agents/skills/project-build-static-binary/SKILL.md
.agents/skills/project-writing-collectors/SKILL.md
.agents/skills/query-agent-events/SKILL.md
.agents/skills/triage-support-bundle/SKILL.md

Metadata

Files
0
Version
1e97a0f
Hash
9f5058c3
Indexed
2026-09-23 11:24

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 12:50
浙ICP备14020137号-1