Agent Skills › langfuse/langfuse › add-to-dependabot-csv

add-to-dependabot-csv

GitHub

将 GitHub Dependabot 或代码扫描警报追加到本地 CSV 漏洞追踪器。通过 API 验证元数据、去重并映射字段,确保数据准确记录,不执行实际修改操作。

.agents/skills/add-to-dependabot-csv/SKILL.md langfuse/langfuse

Trigger Scenarios

将警报添加到 Dependabot CSV 已忽略的警报需加入列表

Install

npx skills add langfuse/langfuse --skill add-to-dependabot-csv -g -y
More Options

Non-standard path

npx skills add https://github.com/langfuse/langfuse/tree/main/.agents/skills/add-to-dependabot-csv -g -y

Use without installing

npx skills use langfuse/langfuse@add-to-dependabot-csv

指定 Agent (Claude Code)

npx skills add langfuse/langfuse --skill add-to-dependabot-csv -a claude-code -g -y

安装 repo 全部 skill

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

预览 repo 内 skill

npx skills add langfuse/langfuse --list

SKILL.md

Frontmatter
{
    "name": "add-to-dependabot-csv",
    "description": "Append GitHub Dependabot or Snyk\/code-scanning alerts to an existing vulnerability CSV after verifying their API metadata. Use for \"add to Dependabot CSV\" or \"dismissed it, add it to the list\"."
}

Add to Dependabot CSV

Update the local tracker only. Read GitHub; do not dismiss alerts, change dependencies, or commit files as part of this workflow.

1. Locate and inspect

Use the requested CSV. Otherwise look for Dependabot List - CLEAN CURRENT.csv in the working checkout. If absent or ambiguous, ask for the path; do not create or replace a tracker silently.

Read its header and a few recent rows, including a dismissed row. Preserve column order, CSV quoting, encoding, line endings, and timestamp conventions. Snapshot original bytes before writing. Match fields by header, not column position.

Deduplicate against both existing rows and the requested batch using the canonical GitHub html_url (ignore input query strings, fragments, and trailing slashes). Alert numbers and CVEs alone are not unique: Dependabot and code scanning have separate number spaces, and one CVE can have multiple image alerts. Skip an existing URL and report it; updating old rows requires an explicit request.

2. Verify GitHub metadata

Take owner, repository, alert type, and number from each supplied URL. For a bare number, resolve the alert type from context or ask; never guess the endpoint.

gh api 'repos/OWNER/REPO/dependabot/alerts/NUMBER'
gh api 'repos/OWNER/REPO/code-scanning/alerts/NUMBER'
gh api 'advisories?cve_id=CVE-YYYY-NNNNN'
gh api 'advisories/GHSA-XXXX-XXXX-XXXX'

Fetch each distinct requested alert. Reuse embedded Dependabot advisory metadata; for code scanning, query a referenced GHSA or CVE once and match the package and ecosystem, rather than taking the first result. If there is no advisory ID, retain the scanner's available metadata and leave unsupported advisory fields blank. If the user says they dismissed it, verify state, dismissed_at, dismissed_reason, and dismissed_comment. Preserve GitHub's exact reason and comment, including punctuation. Report discrepancies with the user's account; do not silently record an unverified dismissal. If API access fails, stop before appending those rows and state what could not be verified.

3. Map to the existing columns

  • Copy repository, alert number, URL, state, lifecycle timestamps, and dismissal fields from the alert. Keep actual code-scanning URLs even in a Dependabot CSV.
  • For Dependabot, use dependency, security_advisory, and security_vulnerability for package, scope, advisory, and affected/fixed versions.
  • For code scanning, use rule.full_description, rule.description, rule.security_severity_level, rule.tags, and rule.help. Resolve CVSS, advisory dates, references, and package-specific affected/fixed versions from the matching GitHub advisory. Use scanner guidance when GitHub has no package range; include that source in advisory_references.
  • Keep similarly named packages separate (deepmerge versus deepmerge-ts). Do not apply another package's version range or confuse detection dates with advisory publication dates. Leave unavailable fields blank; do not invent classification, dependency scope, scores, or history.
  • Copy the dismissal comment into dismissed_comment_or_delay_reasoning when that matches the existing convention. Use the user's supplied delay reasoning for an open alert only when explicitly provided.
  • Keep API timestamps in their existing UTC format. This tracker uses Europe/Berlin with an explicit offset for dismissed_at_web_ui and state_list_timestamps; use timezone-aware conversion, including DST.
  • Keep dismissed_at as the current API value. This tracker's historical columns use the earliest dismissal for dismissed_at_web_ui and dismissed_reason, and the first non-empty dismissal comment for both comment columns. For an alert just dismissed with no evidence of earlier transitions, use the current API dismissal; do not require a timeline visit to prove no earlier event exists.
  • Pair known state transitions with their event timestamps: creation and current dismissal yield open|dismissed; creation and fix yield open|fixed. Inspect the authenticated timeline when there is evidence of earlier dismissals or reopenings, or a later fix cleared known dismissal fields. If that history is unavailable, preserve known events, leave only unverified historical fields blank, and report the gap. Never claim an incomplete history is exhaustive.
  • Match existing separators: ; for CWEs, | for advisory references, and | for state history and corresponding timestamps.

4. Append and verify

Serialize new rows with a CSV-aware writer and append only. Preserve timestamp strings exactly; spreadsheet tooling may coerce ISO strings into dates and lose the original offset. Check that the file still matches the snapshot immediately before writing. Preserve every original byte, adding a separator newline if needed.

Reparse the saved CSV and verify:

  • Original bytes remain an exact prefix; original rows and header are unchanged.
  • Record count increases by the number of new, unique alert URLs.
  • Every row has the header's column count; new URLs occur exactly once.
  • New fields match their sources: current API state, verified historical dismissal events when applicable, and any explicit user delay reasoning. State timestamps align with their states.

Finish with a short, valid Markdown file link, added/skipped alert numbers, final record/column counts, and confirmation that existing content is unchanged. Mention any unavailable metadata. No application tests are needed for this CSV-only edit.

Version History

  • bde3073 Current 2026-10-20 05:13

Same Skill Collection

.agents/skills/add-model-price/SKILL.md
.agents/skills/agent-setup-maintenance/SKILL.md
.agents/skills/analyze-cloud-costs/SKILL.md
.agents/skills/backend-dev-guidelines/SKILL.md
.agents/skills/changelog-writing/SKILL.md
.agents/skills/clickhouse-best-practices/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/create-repo-agent/SKILL.md
.agents/skills/cursor-agents-workflow/SKILL.md
.agents/skills/datadog-query-recipes/SKILL.md
.agents/skills/debug-issue-with-datadog/SKILL.md
.agents/skills/frontend-browser-review/SKILL.md
.agents/skills/frontend-large-feature-architecture/SKILL.md
.agents/skills/git-workflow/SKILL.md
.agents/skills/grill-me/SKILL.md
.agents/skills/housekeeping/SKILL.md
.agents/skills/incident-alert-tickets/SKILL.md
.agents/skills/infra-scaling/SKILL.md
.agents/skills/langfuse-codebase-navigator/SKILL.md
.agents/skills/langfuse-previews/SKILL.md
.agents/skills/linear-agent-writes/SKILL.md
.agents/skills/linear-bug-triage/SKILL.md
.agents/skills/linear-context-handover/SKILL.md
.agents/skills/pnpm-upgrade-package/SKILL.md
.agents/skills/posthog-instrumentation/SKILL.md
.agents/skills/react-component-cleaner/SKILL.md
.agents/skills/react-component-guidelines/SKILL.md
.agents/skills/refactor-react-effects/SKILL.md
.agents/skills/security-review/SKILL.md
.agents/skills/seed-test-data/SKILL.md
.agents/skills/sentry-instrumentation/SKILL.md
.agents/skills/skill-creator/SKILL.md
.agents/skills/turborepo/SKILL.md
.agents/skills/weekly-production-review/SKILL.md
web/.agents/skills/vercel-composition-patterns/SKILL.md
web/.agents/skills/vercel-react-best-practices/SKILL.md
.agents/skills/linear-work-rhythm/SKILL.md
.agents/skills/storybook/SKILL.md

Metadata

Files
0
Version
bde3073
Hash
52af9876
Indexed
2026-10-20 05:13

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 17:55
浙ICP备14020137号-1